Makefile revision c5e10ba19c9854112e5d29f491759e8e89f83652
cc5a4a08dc9783fcbc52ce86f11e01c281a43810minfrin# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
6a80c3c6f4b8ea7ba5e89402b8b779b09ce020e0covener# Year: 2004
6a80c3c6f4b8ea7ba5e89402b8b779b09ce020e0covener# This Makefile will compile the new hetcats system and provides also
45dffe6c346dd73571ccaead10295fc7d53b59a6covener# targets for test programs during implementation phases.
45dffe6c346dd73571ccaead10295fc7d53b59a6covener# !!! Note: This makefile is written for GNU make !!!
75a230a728338d84dcfe81edd375352f34de22d0covener# (gmake on solaris ; make on linux)
75a230a728338d84dcfe81edd375352f34de22d0covener####################################################################
3694b0116c5729804ed6a5ce119bd8efda116c7fcovener## Some varibles, which control the compilation
3694b0116c5729804ed6a5ce119bd8efda116c7fcovenerCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
1f50dc34ae069adeed20b2986e5ffdefa5c410e0covenerCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet
1f50dc34ae069adeed20b2986e5ffdefa5c410e0covener## set ghc imports properly for your system
1f50dc34ae069adeed20b2986e5ffdefa5c410e0covenerLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
63a5ea80bddcc84a462e40f402b4f330e0e05411covenerDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
63a5ea80bddcc84a462e40f402b4f330e0e05411covener# override on commandline for other architectures
63a5ea80bddcc84a462e40f402b4f330e0e05411covenerINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
986f3ea2c314d4d4b3b937149853a0f23f6119aaminfrinGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
cc5a4a08dc9783fcbc52ce86f11e01c281a43810minfrin# -fglasgow-exts comes in via ../uni/uni-package.conf
a77a7d850e4496179e1e0f45d5152865c899d421covenerHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
df6d5653669f1514b4449aaba99cb950c0013e5fcovener### Profiling and Warnings (only for debugging)
df6d5653669f1514b4449aaba99cb950c0013e5fcovener### Attention every module must be compiled with profiling or the linker
509622419be000045d461ef38fb97df778fdf81djailletc### cannot link the various .o files properly. So after switching on
509622419be000045d461ef38fb97df778fdf81djailletc### Profiling, do an 'gmake clean; gmake'
509622419be000045d461ef38fb97df778fdf81djailletc### If you need Profiling comment out the following line
509622419be000045d461ef38fb97df778fdf81djailletc#HC_PROF = -prof -auto-all
2e1a0fb12bdf1c20064ffe900a8f44979ec946fcminfrin### list of directories to run checks in
2e1a0fb12bdf1c20064ffe900a8f44979ec946fcminfrinTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell/test
441d366a564bc6faa7c1eaffbacf8c4f37862199minfrin####################################################################
441d366a564bc6faa7c1eaffbacf8c4f37862199minfrin## sources for hetcats (semi - manually produced with a perl script)
2344a0c1817b88b6df61fc4ed0c6af66bb93ee6bjimdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs\
2344a0c1817b88b6df61fc4ed0c6af66bb93ee6bjim Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
63921358ef93fcb41bc71d9894221ba3d7fbb87bminfringenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
bbb08feeeef547b0908b16df6cbbb65da656b86fminfrin Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
bbb08feeeef547b0908b16df6cbbb65da656b86fminfrin Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
bbb08feeeef547b0908b16df6cbbb65da656b86fminfrin CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
decb536ebd4b7b94c7450c2e1daa491943135abdminfrin Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
2d2c5cedd0559093c6e88bd92702e369ef949336minfringendrifted_files = ATC/Graph.hs ATC/Id.hs ATC/Result.hs ATC/AS_Annotation.hs \
c0da461d68518e8f89f4070a709ba1e56381247cminfrin Modal/ATC_Modal.hs CoCASL/ATC_CoCASL.hs ATC/IsaSign.hs
797fb211307298a8a6984c0edc0d8972b35eeac1minfringenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
f27c90ecdefe634bd5f9c529d8658d3a3b441303minfringen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
80cabec6752622e0db5421af61502bfda95715eaminfrin# this variable holds the modules that should be documented
80cabec6752622e0db5421af61502bfda95715eaminfrin# the imported parsec library is not included!
a2e1bbb77dd09c6a60f2dc18f831000e49add31eminfrindoc_sources = $(filter-out ./Isabelle/IsaSign.hs ,$(sources))
a2e1bbb77dd09c6a60f2dc18f831000e49add31eminfrin####################################################################
a2e1bbb77dd09c6a60f2dc18f831000e49add31eminfrin.PHONY : clean d_clean real_clean bin_clean check hetana hetpa hetdg \
deec48c67d4786bc77112ffbf3a4e70b931097edminfrin.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
40d570cf1420f497bcac59045d4ce477f0b5d891minfrin $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
806e9ba570ef48df4bfd8364e2f4d57381388a11minfrin $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
d3e0a61e1bcc497f2efd7af41a5a9d77090ecc1cminfrinhetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files) $(inline_axiom_files)
1aac1c71105133d669960501bdf2274e63561054minfrin $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make
1aac1c71105133d669960501bdf2274e63561054minfrin###############################
2c487ac43b583db869e743772a7a10b278aa2bcfminfrin### TAGS files for (x)emacs
2c487ac43b583db869e743772a7a10b278aa2bcfminfrin# load them with "M-x" "visit-tags-table" from
2c487ac43b583db869e743772a7a10b278aa2bcfminfrin# use "M-." to search for a tag
2c487ac43b583db869e743772a7a10b278aa2bcfminfrin# !!Beware this is somewhat instable, because it uses an absolute path!!
dbf5f584c62fe6030d81121fdddeb7588b78b867sf /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
691db92094897494d6c31326108da20088bc175etrawick###############################
691db92094897494d6c31326108da20088bc175etrawick### Documentation via haddock
92108a6c4fd7ca6e9acc94d2485920436763e491sf# index for prelude is missing
5c43d2fb853f84497b5ece2d414ef9484aa87e5fsf -t 'hets -- a heterogenous Specification (CASL) tool set'
eeb7898b9c087040d44550f8a6b1a257783c9f0ahumbedooh###############################
eeb7898b9c087040d44550f8a6b1a257783c9f0ahumbedooh### release management
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsfderivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files)
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
4576c1a9ef54cd1e5555ee07d016a7f559f80338sf $(HC) --make '-i../..:../DrIFT-src' -package text GenerateRules.hs -o ../genRules && \
e02ff627c1e63137247e20493f6ef44b3bb1a095sf cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository co HetCATS
88fac54d9d64f85bbdab5d7010816f4377f95bd7rjung find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
2a7beea91d46beb41f043a84eaad060047ee04aafabien cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
2a7beea91d46beb41f043a84eaad060047ee04aafabien ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sf#############################
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sf### ATC DrIFT-rule generation
f6b9c755a0b793e8a3a3aebd327ca20a86478117sf$(generated_rule_files): $(genrule_files) utils/genRules #$(genrule_header_files)
fc1459657a1fde206a847f9028930725d715f8b4trawick utils/genRules -r $(rule) -o HasCASL -h ATC/HasCASL.header.hs \
85eacfc96a04547ef25aabbc06440039715084c2jorton utils/genRules -r $(rule) -o CspCASL $(cspcasl_files)
85eacfc96a04547ef25aabbc06440039715084c2jorton utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
d776b0a2d2889ce1d13494873368f34327a2e1bbtrawickgen_atc_files = if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; then \
d776b0a2d2889ce1d13494873368f34327a2e1bbtrawick utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawickatc_files := $(filter-out CASL/% HasCASL/% Modal/% CoCASL/% CspCASL/% Haskell/% ,$(genrule_files))
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawickhascasl_files := $(filter HasCASL/% ,$(genrule_files))
985a4368b93c3e9171a57897ad9454c8dbf4cdf6jortoncspcasl_files := $(filter CspCASL/% ,$(genrule_files))
74e7a30182af5e68f14ccb8d57918b22b982db8bhumbedooh###############
10961a2f60207cb873d889bb28b1f0ef707a4311humbedooh### removes *.hi and *.o in all include directories
0448378b899e8df0c060360f17c0af692adf17bchumbedooh### remove binaries
79c5787b92ac5f0e1cc82393816c77a006399316trawick### additonally removes *.d (dependency files) in every include directory
79c5787b92ac5f0e1cc82393816c77a006399316trawick### also delete *.d.bak (dependency file backups)
536e48c08d674acac5d44929318f2ad928edc361jorton### remove files also in own libraries
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton### additionally removes the files that define the sources-variable
53e9b27aba029b18be814df40bcf6f0428771d1efuankg### additionally removes files not in CVS tree
ca61ccd0c306c2c72df153688ba1b49f3eceed80sf# $(RM) $(happy_files)
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin####################################################################
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin### test targets
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin####################################################################
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin### a parser to test annotation parser and Id parsers
23f1535d6a60817d2846bac0aea230ea475d7dccminfrinCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung### interactive
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung### christian's target
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick### CASL parser
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim### HasCASL parser
cfa64348224b66dd1c9979b809406c4d15b1c137fieldingHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
cfa64348224b66dd1c9979b809406c4d15b1c137fielding### Haskell parser
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
### ATerm.Lib test system
$(RM) $@
$(RM) $@
$(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
## two hardcoded dependencies for a correct generation of Version.hs
$(HAPPY) $<
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs