Makefile revision ed9207cf24e96b0d6f59985822054ae28cb69b2e
1a5f954324f2584984fc9cee7a7a8ebe8ef39aeajim# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
7f4ac5a4cd99a9cae866b5908e358bd932736307chrisd# Year: 2004
df46ff21c57d00f6addccaaf9b1484f2b56b8577pquerna# This Makefile will compile the new hetcats system and provides also
df46ff21c57d00f6addccaaf9b1484f2b56b8577pquerna# targets for test programs during implementation phases.
a5cce34e21a5b472f3806b4526043887bcb7e9eajim# !!! Note: This makefile is written for GNU make !!!
a5cce34e21a5b472f3806b4526043887bcb7e9eajim# (gmake on solaris ; make on linux)
8c3667cd1d0db08647793137c0d1aa7f6526bebfniq####################################################################
8c3667cd1d0db08647793137c0d1aa7f6526bebfniq## Some varibles, which control the compilation
8c3667cd1d0db08647793137c0d1aa7f6526bebfniqCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
8c3667cd1d0db08647793137c0d1aa7f6526bebfniqCLEAN_PATH = Common:Logic:CASL:Syntax:Static:GUI:HasCASL:Haskell:Modal:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:$(INCLUDE_PATH):Haskell/Hatchet
6824182b3b8e045db97a228d3127bdfcbdfeb0bcniq## set ghc imports properly for your system
6824182b3b8e045db97a228d3127bdfcbdfeb0bcniqDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:/home/linux-bkb/ghc/ghc-latest/lib/ghc-6.2/imports:${GHC_IMPORTS}'
f7cec4a86292b160401472286a17497ae0d4df18covenerHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
f7cec4a86292b160401472286a17497ae0d4df18covener### Profiling and Warnings (only for debugging)
1464434c2c104e0ba224644c42552330f5158537covener### Attention every module must be compiled with profiling or the linker
1464434c2c104e0ba224644c42552330f5158537covener### cannot link the various .o files properly. So after switching on
1464434c2c104e0ba224644c42552330f5158537covener### Profiling, do an 'gmake clean; gmake'
1464434c2c104e0ba224644c42552330f5158537covener### If you need Profiling comment out the following line
1464434c2c104e0ba224644c42552330f5158537covener#HC_PROF = -prof -auto-all
7f4ac5a4cd99a9cae866b5908e358bd932736307chrisd#DRIFT_OPTS = +RTS -K10 -RTS
8d574b3ac4185e4f71c8b9aae76e7122a78201c4rpluem### list of directories to run checks in
509111f5f58a9effd4c832f6a0cbd6ad9d549188jorton####################################################################
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrin## sources for hetcats (semi - manually produced with a perl script)
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquernadrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs\
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
19e5deda3a29d71ac1cc4bfecce39f96ea3ab55dcovenergenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
19e5deda3a29d71ac1cc4bfecce39f96ea3ab55dcovener Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
3ec1e3a35106ec4c8bcf8fae6a20cb623aed0b62pquerna Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
3ec1e3a35106ec4c8bcf8fae6a20cb623aed0b62pquerna CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
527fc83e2bf315b2026a9ac6b1e6ce83143609bbcovener Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
99c8705f69fae71940ad9b091bd2f588a7b9f484minfringendrifted_files = ATC/Graph.hs ATC/Id.hs ATC/Result.hs ATC/AS_Annotation.hs \
9376e7dc573bb2721491c79b92f9c06fdfacebe6minfringenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
edaefb8bf78debc86ef7de441c7983d8b05517e1minfrin# this variable holds the modules that should be documented
edaefb8bf78debc86ef7de441c7983d8b05517e1minfrin# the imported parsec library is not included!
b5cbd7bc65a5c0eda246b0cd32e7d9ed124d66c4niq####################################################################
b5cbd7bc65a5c0eda246b0cd32e7d9ed124d66c4niq### targets
6ad55f63504cf5fe5205ed9495664519afeadcd9chrisd.PHONY : clean d_clean real_clean bin_clean check hetana hetpa hetdg \
f436f5cf34615c3c7d49dd229560ba658033f9eachrisd $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
38b062650152074931a68e933461762c5e233cfcniq $(HC) --make -O -o hets hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
63de18ba5e922ffaab500317d7d1d0ad6b27b7e2covenerhetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files)
91ef999a69527d2a64983681c92aaef9270697b4rpluem $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make
cf95511601acd18c75339ef5d90a298e070617ccminfrin###############################
cf95511601acd18c75339ef5d90a298e070617ccminfrin### TAGS files for (x)emacs
cf95511601acd18c75339ef5d90a298e070617ccminfrin# load them with "M-x" "visit-tags-table" from
e82c197ca8872669af89367746826fe6b9955bb3niq# use "M-." to search for a tag
e82c197ca8872669af89367746826fe6b9955bb3niq# !!Beware this is somewhat instable, because it uses an absolute path!!
baef4b5261d84ad9bacb2f4e745b33f35534c25aniq /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
baef4b5261d84ad9bacb2f4e745b33f35534c25aniq###############################
742ec45ed2ac00ab03080e898332352220cc1f13niq### Documentation via haddock
742ec45ed2ac00ab03080e898332352220cc1f13niq# index for prelude is missing
56b7c92bac48127bda06d80bf94952258f7e0bd3minfrin -t 'hets -- a heterogenous Specification (CASL) tool set'
fffe2d3830e52ed28703d042c5049b5e8fa047e2niq###############################
13d29a334cfa69f2995b70a48aeacacc1ac7125frpluem### release management
6951fc02abfd7642e45333902c14855836717fadrpluemderivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs
6951fc02abfd7642e45333902c14855836717fadrpluem (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT)
aced0f6381ba4b9ec6ca8b9f9253f5aeb1a0b1actdonovan $(HC) --make -i../.. -package text GenerateRules.hs -o ../genRules)
db455cbc662c98dbbf53175393c50086ff63370cchrisd cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository co HetCATS
2e242dca7111f99d54dd144b7b8418d88d560032chrisd find . -name CVS -o -name \*.o -o -name \*.hi | xargs -r $(RM) -r; \
eaf6fff54e1bcc02893d1d8a64ba43eb6d89184brpluem $(RM) clean.*; $(RM) Makefile; mv ReleaseMakefile Makefile)
b5d91f803b61ef5b13666e423173eb72d96f8938niq#############################
b5d91f803b61ef5b13666e423173eb72d96f8938niq### ATC DrIFT-rule generation
b6b1df87b7ce62620d48526a7ab630897cdaad90chrisd$(generated_rule_files): $(genrule_files) utils/genRules #$(genrule_header_files)
4cf58054a85830c67dc23890ee613f62e1f7bdc8minfrin utils/genRules -r $(rule) -o CASL -h ATC/CASL.header.hs \
4cf58054a85830c67dc23890ee613f62e1f7bdc8minfrin utils/genRules -r $(rule) -o HasCASL -h ATC/HasCASL.header.hs \
4cf58054a85830c67dc23890ee613f62e1f7bdc8minfrin utils/genRules -r $(rule) -o CspCASL -h ATC/CspCASL.header.hs \
caaa32f2d2e3b28063c745c2632d3979da7f8326minfrin utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
e02cb8f5090d904c054633ff33dfd1111e16e404minfringen_atc_files = if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; then \
e02cb8f5090d904c054633ff33dfd1111e16e404minfrin utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
8a3e2ef19ddfb8addcccdc61da0d1442695a8280rpluematc_files := $(filter-out CASL/% HasCASL/% CspCASL/% Haskell/% ,$(genrule_files))
a449830d5caa5b9900fe64cc383658b3641f9810dirkx###############
a449830d5caa5b9900fe64cc383658b3641f9810dirkx### clean up
a449830d5caa5b9900fe64cc383658b3641f9810dirkx### removes *.hi and *.o in all include directories
06d3a46db9574ad55b65fed36b856fee72bd71a7rpluem### remove binaries
723f9f463f1922eaef3d24d00cb289e10daa73ffminfrin### additonally removes *.d (dependency files) in every include directory
c2213b3a46a2666e2e7606ceec509cc4978f187fminfrin### also delete *.d.bak (dependency file backups)
d4562e99f620170ce0bedddc16887b900b34913bminfrin### remove files also in own libraries
fd279fe992f7171dc3f6d4d40d6db5bb74f2d96eminfrin### additionally removes the files that define the sources-variable
fed63d1b62cc7e56aad77b70ee5b5cc7f5c6aademinfrin### additionally removes files not in CVS tree
abe0d0e38b9705f21a13ac8748bce1e3ed35e488minfrin####################################################################
fb8ee8b7a3a2503b95bf47685f9083e0b9834e6fminfrin### test targets
fb8ee8b7a3a2503b95bf47685f9083e0b9834e6fminfrin####################################################################
fb8ee8b7a3a2503b95bf47685f9083e0b9834e6fminfrin### a parser to test annotation parser and Id parsers
a72211e92bab814bfa28ee086ca9b2a1a6095c92chrisdCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
a72211e92bab814bfa28ee086ca9b2a1a6095c92chrisd### interactive
9582ad6e149d28b118d4e8571101ecb6f85e0191niq### christian's target
9582ad6e149d28b118d4e8571101ecb6f85e0191niq### CASL parser
d64dd2fd4516c2b1b664c5e59c0628d9aff26984covener### HasCASL parser
1e911973bcb9df6701a4c16c037771ecf25ade13niq### Haskell parser
e47d58d5d983426584c8d16416c50f5c58070746dirkxHaskell/hapa: Haskell/hapa.hs Haskell/Hatchet/*.hs $(happy_files)
33aad3911b15cb5d523075f7df829274fe298a13dirkx### HetCASL parser
433dcb1fbaae82d36634f5120bff71a04296904ddirkx### HetCASL parser
d7fcc79b0bee660d71b0cccfe9bbc2765ee6420erederpj### ATC test system
d7fcc79b0bee660d71b0cccfe9bbc2765ee6420erederpjatctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs Common/Lib/*.hs
40beb03c240a9c60805388592f1005d9bf9d2362fuankg### ATerm.Lib test system
65cb7f00eca6689c8a89dc809359991ade1285bcwroweatermlibtest: Common/ATerm/ATermLibTest.hs Common/ATerm/*.hs Common/SimpPretty.hs
65cb7f00eca6689c8a89dc809359991ade1285bcwrowe### HetCASL with dev graph
39c7699ec0799d394d3f67145d4a12ed82f587b8jorton $(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin### run tests in other directories
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin####################################################################
439ccf2a084e1da566548931c585cbcc3a9e7f4cminfrin## Preparing the version of HetCATS
4ede070ca63bd4c48045e35a7192582769770290jorton $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
795c9499a77c25695bcb9710ed67bbe51492e181rpluem## two hardcoded dependencies for a correct generation of Version.hs
795c9499a77c25695bcb9710ed67bbe51492e181rpluemhetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
a72ba68ecbbc61e4b513e50d6000245c33f753dcwrowe####################################################################
7a079e0cd696baca90ac43e325f64582e2945c68wrowe## rules for DrIFT
ecc1538af1c08282fc2773d2eb3f1a54251862f9minfrin## compiling rules for object and interface files
e4b96ba15dc8b2b27d251d53e29b86da32cd5066pquerna## compiling rules for dependencies
108ebbb87b2a46f4416ec507824471a483c39fe1sctemme####################################################################
108ebbb87b2a46f4416ec507824471a483c39fe1sctemme## Setting a global search path (for dependency files)
dd6199828976e6c7850ca6abd7a1ceba99e9ed16chrisd## include every .d file in INCLUDE_PATH
ab43b4a17b2ac31ccb1cf280be8c42a8a314cecbjortonsources_hetcats.mk: hetcats-make hetcats/Version.hs hets.hs utils/create_sources.pl $(drifted_files) $(happy_files)