Makefile revision 8b4c68db8b465107cabef8b9cd5b6bc216e1b156
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# hetcats/Makefile
c63ebf815c8a874525cf18670ad74847f7fc7b26Christian Maeder# $Header$
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# Year: 2004
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# This Makefile will compile the new hetcats system and provides also
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# targets for test programs during implementation phases.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# !!! Note: This makefile is written for GNU make !!!
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# (gmake on solaris ; make on linux)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder####################################################################
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder## Some varibles, which control the compilation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederINCLUDE_PATH = ghc:hetcats
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
68d10d143f29fcff3c637ba24f90e983995ceae6Christian MaederCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:utils/inlineAxioms:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:COL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich## set ghc imports properly for your system
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus LuettichLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus LuettichDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
a737caf82de97c1907027c03e4b4509eb492b4b8Christian Maeder
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder# override on commandline for other architectures
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian MaederINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
01e383014b555bbcf639c0ca60c5810b3eff83c0Christian Maeder
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiDRIFT_deps = utils/DrIFT-src/*hs
9dac90ec2be2a72e03893095461960d483fe2fc2Christian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng JiangINLINEAXIOMS_deps = utils/InlineAxioms/*hs
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowski
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederHC = ghc
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederPERL = perl
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHAPPY = happy
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederDRIFT = $(DRIFT_ENV) utils/DrIFT
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian MaederINLINEAXIOMS = utils/outlineAxioms
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederHADDOCK = haddock
8410667510a76409aca9bb24ff0eda0420088274Christian MaederCPPP = cpp
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_FLAGS = -Wall -fglasgow-exts
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder# -fglasgow-exts comes in via ../uni/uni-package.conf
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# but added it here in case of compilation without uni
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder
ad270004874ce1d0697fb30d7309f180553bb315Christian MaederHC_INCLUDE = -i$(INCLUDE_PATH)
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian MaederHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
4cb215739e9ab13447fa21162482ebe485b47455Christian Maeder -package uni-server -DUNI_PACKAGE
8ef75f1cc0437656bf622cec5ac9e8ea221da8f2Christian Maeder
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich### Profiling (only for debugging)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Attention every module must be compiled with profiling or the linker
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maeder### cannot link the various .o files properly. So after switching on
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Profiling, do an 'gmake real_clean; gmake'
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian Maeder### and comment out HC_PACKAGE variable definition above.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### Comment in the following line for switching on profiling.
8d97ef4f234681b11bb5924bd4d03adef858d2d2Christian Maeder#HC_PROF = -prof -auto-all
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHCI_OPTS = $(HC_FLAGS) $(HC_PACKAGE) $(HC_INCLUDE)
e593b89bfd4952698dc37feced21cefe869d87a2Christian MaederHC_OPTS = $(HCI_OPTS) $(HC_PROF)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederDRIFT_OPTS = +RTS -K10m -RTS
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian Maeder### list of directories to run checks in
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell/test
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian Maeder####################################################################
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder## sources for hetcats (semi - manually produced with a perl script)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
c3053d57f642ca507cdf79512e604437c4546cb9Christian Maederifneq ($(MAKECMDGOALS),clean)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederifneq ($(MAKECMDGOALS),bin_clean)
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maederifneq ($(MAKECMDGOALS),d_clean)
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maederifneq ($(MAKECMDGOALS),real_clean)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederifneq ($(MAKECMDGOALS),distclean)
2c9df69accd8924e7cef3bf8f686626958499c7aChristian Maederifneq ($(MAKECMDGOALS),genRules)
c2fcc35abb03cf0b4ca4b050efeb10827f38c322Christian Maederifneq ($(MAKECMDGOALS),utils/genRules)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederifneq ($(MAKECMDGOALS),hets-opt)
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maederifneq ($(MAKECMDGOALS),prob_objs)
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maederifneq ($(MAKECMDGOALS),hets-optimized)
4ed0007ac9caea5b468f202521352d153481423cChristian Maederifneq ($(MAKECMDGOALS),derivedSources)
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maederifneq ($(MAKECMDGOALS),$(INLINEAXIOMS))
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maederifneq ($(MAKECMDGOALS),release)
0206ab93ef846e4e0885996d052b9b73b9dc66b0Christian Maederifneq ($(MAKECMDGOALS),check)
f13d1e86e58da53680e78043e8df182eed867efbChristian Maederifneq ($(MAKECMDGOALS),apache_doc)
c2a4d8ae266aa37cc922eba97077520229a19902Christian Maederifneq ($(MAKECMDGOALS),clean_genRules)
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maederifneq ($(MAKECMDGOALS),atctest2)
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maederifneq ($(MAKECMDGOALS),hetana)
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maederinclude sources_hetcats.mk
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maederendif
757e6c79ec40491d45dc72c82b5eb59a386634b0Jian Chun Wangendif
ecf76bc89d9a2ecd7ac7310d30654b9a79d97d62Klaus Luettichendif
ecf76bc89d9a2ecd7ac7310d30654b9a79d97d62Klaus Luettichendif
ecf76bc89d9a2ecd7ac7310d30654b9a79d97d62Klaus Luettichendif
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettichendif
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettichendif
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettichendif
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng Jiangendif
8cacad2a09782249243b80985f28e9387019fe40Christian Maederendif
363939beade943a02b31004cea09dec34fa8a6d9Christian Maederendif
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian Maederendif
363939beade943a02b31004cea09dec34fa8a6d9Christian Maederendif
8a28707e9155465c6f2236a06eac6580a65c7025Christian Maederendif
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettichendif
797ccd67cb8ae127be097cd43448801b673e3b69Christian Maederendif
797ccd67cb8ae127be097cd43448801b673e3b69Christian Maederendif
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maederendif
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maederobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(gendrifted_files)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedergenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Common/AS_Annotation.der.hs \
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng Jiang Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
a6082d6cfdfbdc6a4e70430bb25638dfa4f0db9bHeng Jiang Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
a6082d6cfdfbdc6a4e70430bb25638dfa4f0db9bHeng Jiang CASL/Sublogic.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder HasCASL/Sublogic.hs \
498aa48bdb931ab50990d3b74318a5db2312186cChristian Maeder Modal/AS_Modal.hs Modal/ModalSign.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder COL/AS_COL.hs COL/COLSign.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder CspCASL/AS_CSP_CASL.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder Static/DevGraph.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Haskell/Hatchet/AnnotatedHsSyn.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder Haskell/Hatchet/MultiModuleBasics.hs \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Haskell/Hatchet/HsSyn.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Haskell/Hatchet/Representation.hs\
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Haskell/Hatchet/Env.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Isabelle/IsaSign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maedergendrifted_files = ATC/Graph.hs ATC/Id.hs ATC/Result.hs ATC/AS_Annotation.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder ATC/AS_Library.hs ATC/GlobalAnnotations.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder ATC/AS_Structured.hs ATC/AS_Architecture.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder ATC/DevGraph.hs \
03a6d8f77f588dc5d3dd6653797fa2362efa1751Christian Maeder CASL/ATC_CASL.hs Haskell/ATC_Haskell.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder HasCASL/ATC_HasCASL.hs CspCASL/ATC_CspCASL.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Modal/ATC_Modal.hs CoCASL/ATC_CoCASL.hs COL/ATC_COL.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ATC/IsaSign.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maedergenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs Comorphisms/Modal2CASL.hs
2d130d212db7208777ca896a7ecad619a8944971Christian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maederhappy_files = Haskell/Hatchet/HsParser.hs
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian Maeder# this variable holds the modules that should be documented
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder# the imported parsec library is not included!
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maedercpp_sources = ./Isabelle/IsaProve.hs ./Isabelle/Logic_Isabelle.hs ./Proofs/Proofs.hs hets.hs
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian Maederdoc_sources = $(filter-out ./Isabelle/IsaSign.hs $(cpp_sources) ,$(sources)) \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(patsubst %.hs, %.hspp, $(cpp_sources))
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder####################################################################
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder### targets
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder.PHONY : clean d_clean real_clean bin_clean check hetana hetpa hetdg \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder clean_genRules genRules
a9b59eb2ce961014974276cdae0e9df4419bd212Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder#.PRECIOUS: sources_hetcats.mk
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederall: hets
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederhets: $(sources)
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maeder $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhets-opt: hetcats/Version.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(MAKE) distclean
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(MAKE) derivedSources
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(MAKE) real_clean
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(MAKE) prob_objs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(MAKE) hets-optimized
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederproblematic_objs = Common/Lib/Rel.o Common/Id.o Common/Lexer.o Common/Lib/Pretty.o Common/GlobalAnnotations.o Common/PPUtils.o
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederifeq ($(MAKECMDGOALS),prob_objs)
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederinclude $(problematic_objs:%.o=%.d)
b568982efd0997d877286faa592d81b03c8c67b8Christian Maederendif
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettichprob_objs: $(problematic_objs)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhets-optimized:
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder strip hets
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maederhets-old: $(objects)
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder $(RM) $@
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder $(HC) -o hets $(HC_OPTS) $(objects)
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maederhets.cgi: $(sources) GUI/hets_cgi.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_OPTS) -O
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files) $(inline_axiom_files) Modal/ModalSystems.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) hetcats-make sources_hetcats.mk
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder###############################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### TAGS files for (x)emacs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder# load them with "M-x" "visit-tags-table" from
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder# "HetCATS/hetcats/hetcats.TAGS"
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# use "M-." to search for a tag
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maederhetcats.TAGS: $(sources)
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
e6d5dbbc3308f05197868806e0b860f4f53875f1Christian Maeder
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder###############################
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### count lines of code
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maedercount: $(sources)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder wc -l $(sources)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder###############################
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich### Documentation via haddock
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederdoc: docs/index.html
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich# index for prelude is missing
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederdocs/index.html: $(doc_sources)
82e29b77f0ef4cccd7ed734692c5e1e93dbbc645Christian Maeder $(HADDOCK) $(doc_sources) -o docs -h \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -i docs/base.haddock \
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maeder -t 'hets -- a heterogenous Specification (CASL) tool set'
b886e9e5db2098d0112cc4f70aeba232962939ddChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederapache_doc:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) docs/*.*
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder cvs up -d
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(MAKE) hets-opt
42b12fba6830ada5057949f825fc27edf5574e5fChristian Maeder $(MAKE) doc
42b12fba6830ada5057949f825fc27edf5574e5fChristian Maeder $(MAKE) post_doc4apache
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederpost_doc4apache:
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(PERL) utils/post_process_docs.pl docs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder 'Common.Lib.Map.html:Common.Lib._Map.html'
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder cp docs/*.* a-docs/
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder###############################
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder### release management
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian MaederderivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files) Modal/ModalSystems.hs
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng Jiangutils/DrIFT: $(DRIFT_deps)
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers strip ../DrIFT)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederutils/genRules: $(GENERATERULES_deps)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder (cd utils/GenerateRules; \
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder $(HC) --make '-i../..:../DrIFT-src' -package text GenerateRules.hs -o ../genRules && \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers strip ../genRules)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs \
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(HC_OPTS) -o $(INLINEAXIOMS)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder strip $(INLINEAXIOMS)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maederrelease:
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(RM) -r HetCATS
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository co HetCATS
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) -r uni
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ln -s ../uni uni
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd HetCATS; $(MAKE) derivedSources; ./clean.sh; \
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder $(RM) clean.*; mv Makefile Makefile.orig; \
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder mv ReleaseMakefile Makefile)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder tar cvf HetCATS.tar HetCATS
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maederinstall-hets:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder chmod g+w hets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cp -p version_nr $(INSTALLDIR)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd $(INSTALLDIR); $(RM) hets; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederinstall: hets-opt install-hets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder#############################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### ATC DrIFT-rule generation
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaedergenRules: $(generated_rule_files) utils/genRules
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
ac34194a668399bb8ef238da77c3a09e93fb253bChristian Maeder$(generated_rule_files): $(genrule_files) utils/genRules #$(genrule_header_files)
ac34194a668399bb8ef238da77c3a09e93fb253bChristian Maeder $(MAKE) clean_genRules
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(foreach file,$(atc_files),$(gen_atc_files))
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder utils/genRules -r $(rule) -o CASL $(casl_files)
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder utils/genRules -r $(rule) -o HasCASL $(hascasl_files)
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder utils/genRules -r $(rule) -o Modal $(modal_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder utils/genRules -r $(rule) -o CoCASL $(cocasl_files)
986d3f255182539098a97ac86da9eeee5b7a72e3Christian Maeder utils/genRules -r $(rule) -o COL $(col_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder utils/genRules -r $(rule) -o CspCASL $(cspcasl_files)
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian Maeder utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(haskell_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Lueckerule = ShATermConvertible
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maedergen_atc_files = if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; then \
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder else \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski utils/genRules -r $(rule) -o ATC $(file); \
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder fi ;
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maederatc_files := $(filter-out CASL/% HasCASL/% Modal/% CoCASL/% COL/% CspCASL/% Haskell/% ,$(genrule_files))
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maedercasl_files := $(filter CASL/% ,$(genrule_files))
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maederhascasl_files := $(filter HasCASL/% ,$(genrule_files))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maedermodal_files := $(filter Modal/% ,$(genrule_files))
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettichcocasl_files := $(filter CoCASL/% ,$(genrule_files))
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettichcol_files := $(filter COL/% ,$(genrule_files))
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng Jiangcspcasl_files := $(filter CspCASL/% ,$(genrule_files))
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettichhaskell_files := $(filter Haskell/%,$(genrule_files))
c70ef4c3b3a62764f715510c9fd67dde3acfe454Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederclean_genRules:
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) $(generated_rule_files)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder###############
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### clean up
b9b960bc75e34658e70c4a0231dbc6a6e7373f2dChristian Maeder
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maeder### removes *.hi and *.o in all include directories
846d851fc0c2c49e949763cd3407634ba0f726c0Christian Maederclean: bin_clean
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder (cd $$p ; $(RM) *.hi *.o *.hspp) ; done
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### remove binaries
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maederbin_clean:
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) hets
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) test_parser
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder $(RM) CASL/capa
d8bebe0559abdfcd912ac68cf0948fe601249a66Christian Maeder $(RM) HasCASL/hacapa
edd1b7f4720bc2eea51fa0685417e1e4f3be4915Klaus Luettich $(RM) Haskell/hapa
9a5fda85e9eaf0e6a18d0dd2b8535805c5135e9aDominik Luecke $(RM) Haskell/hana
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder $(RM) Haskell/wrap
bd54a9917cd87169b8e40bcc5616c537fed85815Christian Maeder $(RM) Syntax/hetpa
be218d4b48c5447b7b08c1e323e048a0cfae2d6eHendrik Iben $(RM) Static/hetana
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(RM) Static/hetana
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(RM) GUI/hetdg
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(RM) hetpa
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) hetana
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(RM) hetdg
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) atctest2
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) atctest
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) Common/annos
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### additonally removes *.d (dependency files) in every include directory
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maeder### also delete *.d.bak (dependency file backups)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederd_clean: clean
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich (cd $$p ; $(RM) *.d *.d.bak) ; done
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### remove files also in own libraries
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maederlib_clean: clean
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder for p in $(subst :, ,$(COMMONLIB_PATH)) . ; do \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder (cd $$p ; $(RM) *.hi *.d *.o) ; done
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maeder
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder### additionally removes the files that define the sources-variable
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnkereal_clean: bin_clean lib_clean
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) hetcats-make sources_hetcats.mk
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### additionally removes files not in CVS tree
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnkedistclean: real_clean clean_genRules d_clean
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) hetcats/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $(drifted_file) $(inline_axiom_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich# $(RM) $(happy_files)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder####################################################################
f443a57f2a8e0ca3daa7431b0c89a18ba52c337aChristian Maeder### test targets
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder####################################################################
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder### a parser to test annotation parser and Id parsers
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maedertest_parser: Common/test_parser
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
7c99e334446bb97120e30e967baeeddfdd1278deKlaus LuettichCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder $(RM) $@
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder### interactive
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maederghci:
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder $(HC)i $(HCI_OPTS)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### christian's target
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### CASL parser
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maedercapa: CASL/capa
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(RM) $@
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### HasCASL parser
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederhacapa: HasCASL/hacapa
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(RM) $@
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder### Haskell parser
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maederhapa: Haskell/hapa
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederHaskell/hapa: Haskell/hapa.hs Haskell/Hatchet/*.hs $(happy_files)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(RM) $@
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder### Haskell analysis
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maederhana: Haskell/hana
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/Hatchet/*.hs $(happy_files)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(RM) $@
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder### HetCASL parser
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederhetpa: Syntax/hetpa.hs Syntax/*.hs
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(RM) $@
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder### HetCASL parser
b886e9e5db2098d0112cc4f70aeba232962939ddChristian Maederhetana: Static/hetana.hs Static/*.hs
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder $(RM) $@
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### ATC test system
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederatctest: ATC/ATCTest.hs ATC/*.hs
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder $(RM) $@
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maederatctest2: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs Common/ATerm/*.hs Common/Lib/*.hs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(RM) $@
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder### ATerm.Lib test system
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maederatermlibtest: Common/ATerm/ATermLibTest.hs Common/ATerm/*.hs Common/SimpPretty.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $@
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### HetCASL with dev graph
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettichhetdg: GUI/hetdg.hs $(drifted_files) *.hs
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(RM) $@
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich### run tests in other directories
a883cd4d01fe39d23219cf5333425f195be24d8bChristian Maedercheck: hetcats
5c69cef4668bbd959d721668313a779126014d1eKlaus Luettich for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich####################################################################
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich## Preparing the version of HetCATS
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettichhetcats/Version.hs: hetcats/Version.in version_nr
5818d884784339c1b8aa6c6d972bad4eafd36ccbKlaus Luettich $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
5818d884784339c1b8aa6c6d972bad4eafd36ccbKlaus Luettich
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich## two hardcoded dependencies for a correct generation of Version.hs
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettichhetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhets.hs: hetcats/Version.hs
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich####################################################################
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich## rules for DrIFT
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich%.hs: %.ly
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HAPPY) $<
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder%.hs: %.der.hs utils/DrIFT
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(DRIFT) $(DRIFT_OPTS) $< > $@
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rules for inlineAxioms
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder%.hs: %.inline.hs $(INLINEAXIOMS)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(INLINEAXIOMS) $< > $@
c1bf9cc3bc3729b0bf925be3be123cbb59bea2a6Christian Maeder
c1bf9cc3bc3729b0bf925be3be123cbb59bea2a6Christian Maeder## rule for cpp and haddock
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder%.hspp: %.hs
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder $(HC) -E -cpp -DUNI_PACKAGE -optP -P $<
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder## compiling rules for object and interface files
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder%.o %.hi: %.hs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(HC) -c $< $(HC_OPTS)
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder%.o %.hi: %.lhs
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich $(HC) -c $< $(HC_OPTS)
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder
c9e197862d9d8ef2585270dd08f5194b3aed4a9dKlaus Luettich## compiling rules for dependencies
e7e1ab2ac3f1fded8611bb92ae00e8f3b8c693fbKlaus Luettich%.d : %.hs
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich%.d : %.lhs
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian MaederModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in utils/genTransMFormFunc.pl $(INLINEAXIOMS)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(PERL) utils/genTransMFormFunc.pl $< $@
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder####################################################################
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder## Setting a global search path (for dependency files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederifneq ($(MAKECMDGOALS),clean)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederifneq ($(MAKECMDGOALS),real_clean)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederifneq ($(MAKECMDGOALS),d_clean)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maederifneq ($(MAKECMDGOALS),real_clean)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederifneq ($(MAKECMDGOALS),distclean)
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maederifneq ($(MAKECMDGOALS),genRules)
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettichifneq ($(MAKECMDGOALS),utils/genRules)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederifneq ($(MAKECMDGOALS),derivedSources)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederifneq ($(MAKECMDGOALS),release)
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maederifneq ($(MAKECMDGOALS),clean_genRules)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederifeq ($(MAKECMDGOALS),hets-old)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## include every .d file in INCLUDE_PATH
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder-include $(objects:.o=.d)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederendif
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maedersources_hetcats.mk: hetcats-make hetcats/Version.hs hets.hs utils/create_sources.pl $(drifted_files) $(happy_files)
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder $(PERL) utils/create_sources.pl hetcats-make sources_hetcats.mk
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maederendif
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maederendif
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowskiendif
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maederendif
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederendif
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maederendif
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maederendif
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederendif
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maederendif
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maederendif
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder