Makefile revision a02a4eb2a2029d27a11fff2ebcc6c460574a74fc
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# hetcats/Makefile
c63ebf815c8a874525cf18670ad74847f7fc7b26Christian Maeder# $Header$
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# Year: 2004
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# This Makefile will compile the new hetcats system and provides also
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# targets for test programs during implementation phases.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# !!! Note: This makefile is written for GNU make !!!
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# (gmake on solaris ; make on linux)
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder####################################################################
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder## Some varibles, which control the compilation
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederINCLUDE_PATH = ghc:hetcats:fgl
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm:fgl/Data/Graph:fgl/Data/Graph/Inductive:fgl/Data/Graph/Inductive/Aux:fgl/Data/Graph/Inductive/Monad:fgl/Data/Graph/Inductive/Query
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian 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:$(PFE_PATHS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian Maeder## set ghc imports properly for your system
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maederempty:=
4cb215739e9ab13447fa21162482ebe485b47455Christian Maederspace:= $(empty) $(empty)
8ef75f1cc0437656bf622cec5ac9e8ea221da8f2Christian Maeder
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# override on commandline for other architectures
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
74eed04be26f549d2f7ca35c370e1c03879b28b1Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederDRIFT_deps = utils/DrIFT-src/*hs
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
ef9e8535c168d3f774d9e74368a2317a9eda5826Christian MaederINLINEAXIOMS_deps = utils/InlineAxioms/*hs $(drifted_files) $(happy_files) hetcats/Version.hs Modal/ModalSystems.hs
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder
ef9e8535c168d3f774d9e74368a2317a9eda5826Christian MaederHC = ghc
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPERL = perl
e593b89bfd4952698dc37feced21cefe869d87a2Christian MaederHAPPY = happy
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederDRIFT = $(DRIFT_ENV) utils/DrIFT
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederINLINEAXIOMS = utils/outlineAxioms
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian MaederHADDOCK = haddock
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederCPPP = cpp
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
51d769d55d88dfa88bdf54bee78d8fa85a2deba8Christian MaederHC_FLAGS = -Wall -fglasgow-exts
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder# -fallow-overlapping-instances -fallow-incoherent-instances
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian Maeder# -ddump-minimal-imports
51d769d55d88dfa88bdf54bee78d8fa85a2deba8Christian Maeder# flags also come in via ../uni/uni-package.conf
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder# but added it here in case of compilation without uni
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
c3053d57f642ca507cdf79512e604437c4546cb9Christian MaederHC_INCLUDE = -i$(INCLUDE_PATH)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederUNI_PACKAGE_CONF := $(wildcard ../uni/uni-package.conf)
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maederifneq ($(strip $(UNI_PACKAGE_CONF)),)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
05a62e84edac8c64de04f8349dee418598d216b9Christian Maeder -package uni-server -DUNI_PACKAGE
1cd4f6541984962658add5cfaa9f28a93879881bChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder# some modules from uni for haddock
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder# if uni/server is included also HaXml sources are needed
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maederuni_sources = $(wildcard ../uni/davinci/haddock/*.hs) \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder $(wildcard ../uni/graphs/haddock/*.hs) \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder ../uni/htk/toplevel/HTk.hs \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder $(wildcard ../uni/htk/haddock/*/*.hs) \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder $(wildcard ../uni/events/haddock/*.hs) \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(wildcard ../uni/reactor/haddock/*.hs) \
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder $(wildcard ../uni/util/haddock/*.hs) \
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder $(wildcard ../uni/posixutil/haddock/*.hs)
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescuendif
8cacad2a09782249243b80985f28e9387019fe40Christian Maeder
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederPFE_TOOLDIR := $(wildcard ../programatica/tools)
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian Maederifneq ($(strip $(PFE_TOOLDIR)),)
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
014dc30f64ec25e4790cca987d4d1e6635430510Christian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich base/transforms base/transforms/Deriving hs2html \
6aea82c63ba1d2efc0329bc784a14e521469ec20Christian Maeder property/pfe property/syntax property/AST property/transforms \
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser \
feca1d35123d8c31aee238c9ce79947b0bf65494Christian Maeder hs2stratego hs2stratego/AST
431d34c7007a787331c4e5ec997badb0f8190fc7Christian MaederPFE_PATH = $(addprefix -i$(PFE_TOOLDIR)/, $(PFE_DIRS))
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder
498aa48bdb931ab50990d3b74318a5db2312186cChristian Maeder# add PFE_PATHS to DERIVEPATH if needed
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder# but name clashes currently prevent ATC generation in a single file
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian MaederPFE_PATHS = $(subst $(space),:,$(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS)))
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maederpfe_sources = $(wildcard $(subst :,/*hs , $(PFE_PATHS)))
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian MaederPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
23ffcc44ca8612feccbd8fda63fa5be7ab5f9dc3Christian Maeder#-fallow-undecidable-instances -fno-monomorphism-restriction
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederendif
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Profiling (only for debugging)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Attention every module must be compiled with profiling or the linker
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### cannot link the various .o files properly. So after switching on
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Profiling, do an 'gmake real_clean; gmake'
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### and comment out HC_PACKAGE variable definition above.
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### Comment in the following line for switching on profiling.
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder#HC_PROF = -prof -auto-all
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederHC_OPTS = $(HCI_OPTS) $(HC_PROF)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederDRIFT_OPTS = +RTS -K10m -RTS
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder### list of directories to run checks in
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian MaederTESTDIRS = Common CASL HasCASL
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
51d769d55d88dfa88bdf54bee78d8fa85a2deba8Christian Maeder####################################################################
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder## sources for hetcats (semi - manually produced with a perl script)
a42fbfe7becf0eae2d624123eb0db73a794593f0Christian Maeder
a42fbfe7becf0eae2d624123eb0db73a794593f0Christian MaederGHCMAKE_OUTPUT = $(wildcard hetcats-make)
b363eb04791e7f735633b9b4088502c2bc50ebfcChristian Maeder
a42fbfe7becf0eae2d624123eb0db73a794593f0Christian Maederifneq ($(strip $(GHCMAKE_OUTPUT)),)
1cd4f6541984962658add5cfaa9f28a93879881bChristian Maederinclude sources_hetcats.mk
1cd4f6541984962658add5cfaa9f28a93879881bChristian Maederelse
2d130d212db7208777ca896a7ecad619a8944971Christian MaederSOURCE_PATHS = $(COMMON_LIB_PATH):$(CLEAN_PATH)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedersources = $(wildcard $(subst :,/*hs , $(SOURCE_PATHS))/*hs)
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maederendif
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
a9b59eb2ce961014974276cdae0e9df4419bd212Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(gendrifted_files)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maederatc_files := Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
dc679edd4ca027663212afdf00926ae2ce19b555Christian Maeder Common/AS_Annotation.der.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Static/DevGraph.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Proofs/Proofs.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Isabelle/IsaSign.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederatc_der_files = $(foreach file, $(atc_files), \
b568982efd0997d877286faa592d81b03c8c67b8Christian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
0be0db405c49906bd7057255069bf6df53395ac9Klaus LuettichCASL_files := CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder CASL/AS_Basic_CASL.der.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHasCASL_files := HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder HasCASL/Sublogic.hs \
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederModal_files := Modal/AS_Modal.hs Modal/ModalSign.hs
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederCoCASL_files := CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederCOL_files := COL/AS_COL.hs COL/COLSign.hs
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederCspCASL_files := CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederlogics := CASL HasCASL Modal CoCASL COL CspCASL
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Comorphisms/Modal2CASL.hs # Comorphisms/CASL2TopSort.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maederhappy_files =
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder
e6d5dbbc3308f05197868806e0b860f4f53875f1Christian Maederderived_sources = $(drifted_files) $(happy_files) hetcats/Version.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs
e4f4d096e5e6d60dd91c746d0e833d0ac7a29c50Christian Maeder
eb74267cf39e4e95f9eeb5c765f4c8dac33971b4Christian Maeder# sources that have {-# OPTIONS -cpp #-}
eb74267cf39e4e95f9eeb5c765f4c8dac33971b4Christian Maedercpp_sources = ./Isabelle/Logic_Isabelle.hs \
e4f4d096e5e6d60dd91c746d0e833d0ac7a29c50Christian Maeder ./Proofs/Proofs.hs hets.hs ./CASL/CCC/FreeTypes.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder ./Comorphisms/LogicList.hs ./Comorphisms/LogicGraph.hs \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder ./Taxonomy/AbstractGraphView.hs
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder# this variable holds the modules that should be documented
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederdoc_sources = $(filter-out $(cpp_sources), $(filter-out $(pfe_sources), \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder $(sources))) $(patsubst %.hs, %.hspp, $(cpp_sources))
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maedertax_objects = $(patsubst %.hs,%.o,$(tax_sources))
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder
59138b404f12352d103eeffbeaeb3957b90e75fdChristian Maeder
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder####################################################################
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder### targets
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder.PHONY : all hets-opt hets-optimized clean d_clean real_clean bin_clean \
10883d13973c46cac98964b66ace7a52b2d059abChristian Maeder lib_clean distclean check capa hacapa clean_genRules genRules \
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder taxonomy hets.cgi count doc apache_doc post_doc4apache \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder derivedSources install_hets install release
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
0e5b095a19790411e5352fa7cf57cb0388e70472Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder#.PRECIOUS: sources_hetcats.mk
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
f1a913f880e409e7327b5deae95738b5448379a1Christian Maederall: hets
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder
f1a913f880e409e7327b5deae95738b5448379a1Christian Maederhets: $(sources) $(derived_sources)
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maederhets-opt:
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(MAKE) distclean
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(MAKE) derivedSources
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(MAKE) real_clean
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder $(MAKE) hets-optimized
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maederhets-optimized: $(derived_sources)
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
328a85c807f2a95c3f147d10b05927eaf862ebebChristian Maeder strip hets
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng Jiang
06dd4e7c29f33f6122a910719e3bd9062256e397Andy Gimbletthets-old: $(objects)
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder $(RM) $@
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder $(HC) -o hets $(HC_OPTS) $(objects)
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maederhets.cgi: $(sources) GUI/hets_cgi.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers ghc --make -package-conf /home/luettich/ghc-pkg/package.conf \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_INCLUDE) \
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder $(HC_FLAGS) -O
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedertaxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
d6697ad2479099b816203fd2c36f593c72c73c76Christian Maeder $(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder###############################
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder### TAGS files for (x)emacs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# load them with "M-x" "visit-tags-table" from
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# "HetCATS/hetcats/hetcats.TAGS"
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# use "M-." to search for a tag
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederhetcats.TAGS: $(sources)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder###############################
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder### count lines of code
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maedercount: $(sources)
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder wc -l $(sources)
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder###############################
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder### Documentation via haddock
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maederdoc: docs/index.html
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder# generate haddock documentation with links to sources
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maederdocs/index.html: $(doc_sources)
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder $(HADDOCK) $(doc_sources) $(uni_sources) -o docs -h -v \
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder -i docs/base.haddock -i docs/parsec.haddock -s ../ \
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder -t 'hets -- a heterogenous Specification (CASL) tool set'
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder# sources are not copied here
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederapache_doc:
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder $(RM) docs/*.*
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder cvs up -d
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder $(MAKE) hets-opt
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder $(MAKE) doc
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder $(MAKE) post_doc4apache
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder $(MAKE) hets.cgi
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maederpost_doc4apache:
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder $(PERL) utils/post_process_docs.pl docs \
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder 'Common.Lib.Map.html:Common.Lib._Map.html'
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder cp docs/*.* a-docs/
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder###############################
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder### release management
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederderivedSources: $(derived_sources)
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederutils/DrIFT: $(DRIFT_deps)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder strip ../DrIFT)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederutils/genRules: $(GENERATERULES_deps)
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder (cd utils/GenerateRules; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make '-i../..:../DrIFT-src' -package text \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder GenerateRules.hs -o ../genRules && strip ../genRules)
ac34194a668399bb8ef238da77c3a09e93fb253bChristian Maeder
4fc9de0da898448f1d3597ebbd8c04a066464c21Christian Maeder$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC_OPTS) -o $(INLINEAXIOMS)
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder strip $(INLINEAXIOMS)
4fc9de0da898448f1d3597ebbd8c04a066464c21Christian Maeder
df5eb1b8e587946c9d072f4ee6ac7d001719b034Christian Maederrelease:
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder $(RM) -r HetCATS
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder co HetCATS
986d3f255182539098a97ac86da9eeee5b7a72e3Christian Maeder $(RM) -r uni
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder ln -s ../uni uni
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian Maeder (cd HetCATS; $(MAKE) derivedSources; ./clean.sh; \
01e278bdd7dce13b9303ed3d79683d83c89d09f9Liam O'Reilly find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) clean.*; mv Makefile Makefile.orig; \
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke mv ReleaseMakefile Makefile)
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder tar cvf HetCATS.tar HetCATS
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maederinstall-hets:
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu chmod g+w hets
31d6d9286988dc31639d105841296759aeb743e0Jonathan von Schroeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu cp -p version_nr $(INSTALLDIR)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder (cd $(INSTALLDIR); $(RM) hets; \
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroederinstall: hets-opt install-hets
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Luecke
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Luecke#############################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### ATC DrIFT-rule generation
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian MaedergenRules: $(generated_rule_files)
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski$(atc_der_files): $(atc_files) $(genrule_header_files) utils/genRules
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder $(foreach file,$(atc_files),$(gen_atc_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) utils/genRules
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder utils/genRules -r $(rule) -o CASL $(CASL_files)
33bdce26495121cdbce30331ef90a1969126a840Liam O'Reilly
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) utils/genRules
1b3a2f98d1cd01fc9e0591f69507e20526727559Dominik Luecke utils/genRules -r $(rule) -o HasCASL $(HasCASL_files)
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich
247cc88aa55d0a7b6831767cd593ea885c6747a0Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) utils/genRules
e39a1626bee36d6ad13a2c0014a80ef179a65bcbChristian Maeder utils/genRules -r $(rule) -o Modal $(Modal_files)
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian Maeder
ea3bff3e547a1ac714d4db39c5efef95e02b2e7dChristian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) utils/genRules
dd6f22b9dcff2695181b86372e4df03d5b96e92dKristina Sojakova utils/genRules -r $(rule) -o CoCASL $(CoCASL_files)
005e0f0c6b0cc898003b03801158c208f3071fc5Kristina Sojakova
abf2487c3aece95c371ea89ac64319370dcb6483Klaus LuettichCOL/ATC_COL.der.hs: $(COL_files) utils/genRules
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder utils/genRules -r $(rule) -o COL $(COL_files)
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) utils/genRules
76b9b2974795a6fb31f242fd032de3ff66df6204Christian Maeder utils/genRules -r $(rule) -o CspCASL $(CspCASL_files)
76b9b2974795a6fb31f242fd032de3ff66df6204Christian Maeder
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maederrule:= ShATermConvertible
624e6701e0deb7ac6c03c0cba0190fbc5033cf93Ewaryst Schulz
c2e192ace9ef7cfb0e59563f1b24477b2b65cff3Dominik Dietrichgen_atc_files = \
6b75c206b317eb30a08d88a8f27e0295ffeb1546Christian Maeder if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; \
6b75c206b317eb30a08d88a8f27e0295ffeb1546Christian Maeder then utils/genRules -r $(rule) -o ATC -h \
48aa0645e25883048369afc02aac3f49b14a50daChristian Maeder ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder else utils/genRules -r $(rule) -o ATC $(file); fi ;
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederclean_genRules:
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder###############
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### clean up
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### removes *.hi and *.o in all include directories
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederclean: bin_clean
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder (cd $$p ; $(RM) *.hi *.o *.hspp) ; done
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder### remove binaries
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroederbin_clean:
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu $(RM) hets
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu $(RM) test_parser
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu $(RM) CASL/capa
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu $(RM) HasCASL/hacapa
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Haskell/hapa
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Haskell/hana
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Haskell/wrap
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Syntax/hetpa
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Static/hetana
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) GUI/hetdg
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) hetpa
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) hetana
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) hetdg
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) atctest2
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) atctest
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Common/annos
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Haskell/Hatchet/hatch
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) ToHaskell/translateAna
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Taxonomy/taxonomyTool
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### additonally removes *.d (dependency files) in every include directory
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### also delete *.d.bak (dependency file backups)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederd_clean: clean
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder (cd $$p ; $(RM) *.d *.d.bak) ; done
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### remove files also in own libraries
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederlib_clean:
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder for p in $(subst :, ,$(COMMONLIB_PATH)) . ; do \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder (cd $$p ; $(RM) *.hi *.d *.o) ; done
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### additionally removes the files that define the sources-variable
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederreal_clean: bin_clean lib_clean clean
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) hetcats-make sources_hetcats.mk
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder### additionally removes files not in CVS tree
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederdistclean: real_clean clean_genRules d_clean
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) hetcats/Version.hs
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) $(drifted_file) $(inline_axiom_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# $(RM) $(happy_files)
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder####################################################################
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### test targets
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder####################################################################
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova### a parser to test annotation parser and Id parsers
48aa0645e25883048369afc02aac3f49b14a50daChristian Maedertest_parser: Common/test_parser
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova
79834070d6d3c63a098e570b12fa3405c607dc70Kristina SojakovaCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova $(RM) $@
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova $(HC) --make -o $@ $< $(HC_OPTS)
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder### interactive
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maederghci:
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maeder $(HC)i $(HCI_OPTS)
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maeder
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maeder### christian's target
624e6701e0deb7ac6c03c0cba0190fbc5033cf93Ewaryst Schulz### CASL parser
624e6701e0deb7ac6c03c0cba0190fbc5033cf93Ewaryst Schulzcapa: CASL/capa
c2e192ace9ef7cfb0e59563f1b24477b2b65cff3Dominik Dietrich
7165a916d2fa1bf87c4741ec63b253413eebbf69Karl LucCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
7165a916d2fa1bf87c4741ec63b253413eebbf69Karl Luc $(RM) $@
7165a916d2fa1bf87c4741ec63b253413eebbf69Karl Luc $(HC) --make -o $@ $< $(HC_OPTS)
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder### HasCASL parser
01645eac73dbc789392674930adc5745c935f3a0Christian Maederhacapa: HasCASL/hacapa
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
c70ef4c3b3a62764f715510c9fd67dde3acfe454Christian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) $@
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### Haskell parser
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederhapa: Haskell/hapa
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederHaskell/hapa: Haskell/hapa.hs Haskell/Hatchet/*.hs $(happy_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
2b33802ca26124644f4311db4319376ecffdc8d2Christian Maeder### Haskell analysis
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederhana: Haskell/hana
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till MossakowskiHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/Hatchet/*.hs \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(happy_files)
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder $(RM) $@
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhetpa: Syntax/hetpa.hs Syntax/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $@
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(HC) --make -o $@ $< $(HC_OPTS)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
10883d13973c46cac98964b66ace7a52b2d059abChristian Maeder### HetCASL parser
f443a57f2a8e0ca3daa7431b0c89a18ba52c337aChristian Maederhetana: Static/hetana.hs Static/*.hs
e284004f10a315dbdb624c8b2522f65d485eaa48Martin Kühl $(RM) $@
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettich### ATC test system
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederatctest: ATC/ATCTest.hs ATC/*.hs
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder $(RM) $@
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
fc436618ae33856afa329ee53c4f47a2e19100eeChristian Maeder
27785f379d6810811b4e6d23feab18845fde9a98Christian Maederatctest2: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder Common/ATerm/*.hs Common/Lib/*.hs
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder $(RM) $@
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder### ATerm.Lib test system
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederatermlibtest: Common/ATerm/ATermLibTest.hs Common/ATerm/*.hs \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder Common/SimpPretty.hs
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder $(RM) $@
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder### HetCASL with dev graph
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederhetdg: GUI/hetdg.hs $(drifted_files) *.hs
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(RM) $@
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(HC) --make -o $@ $< $(HC_OPTS)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich### run tests in other directories
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettichcheck: hetcats
810746aea00b81c1eec27dae84d73a43599ff056Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
a883cd4d01fe39d23219cf5333425f195be24d8bChristian Maeder
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich####################################################################
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder## Preparing the version of HetCATS
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maederhetcats/Version.hs: hetcats/Version.in version_nr
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maeder
e112e83352048f3db8c8f93ae104193e7338c10fChristian Maeder## two hardcoded dependencies for a correct generation of Version.hs
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maederhetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maederhets.hs: hetcats/Version.hs
22bd26413b512bcc2bd838945e3a56cdbbe01ac3Christian Maeder####################################################################
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maeder## rules for DrIFT
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maeder.SUFFIXES:
a545f813d2f8006ef79617e4fedc841d89195e2dChristian Maeder
a545f813d2f8006ef79617e4fedc841d89195e2dChristian Maeder%.hs: %.ly
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich $(HAPPY) $<
e112e83352048f3db8c8f93ae104193e7338c10fChristian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder%.hs: %.der.hs utils/DrIFT
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maeder $(DRIFT) $(DRIFT_OPTS) $< > $@
e05fd774e0181e93963d4302303b20698603a505Christian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder## rules for inlineAxioms
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maeder%.hs: %.inline.hs $(INLINEAXIOMS)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(INLINEAXIOMS) $< > $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
e05fd774e0181e93963d4302303b20698603a505Christian Maeder## rule for cpp and haddock
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder%.hspp: %.hs
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder $(HC) -E -cpp -DUNI_PACKAGE -optP -P $<
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder## compiling rules for object and interface files
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder%.o %.hi: %.hs
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski $(HC) -c $< $(HC_OPTS)
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder%.o %.hi: %.lhs
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder $(HC) -c $< $(HC_OPTS)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder## compiling rules for dependencies
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder%.d : %.hs
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder%.d : %.lhs
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
c59d1c38ef94b4fb1c8d9fda9573bc1e1d2801e7Christian MaederModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
cd36bffee51c77cdadcb9f916b34fa512e311946Christian Maeder utils/genTransMFormFunc.pl $(INLINEAXIOMS)
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder $(PERL) utils/genTransMFormFunc.pl $< $@
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# hetcats-make is created as side-effect of hets or hets-optimized
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichsources_hetcats.mk: hetcats-make utils/create_sources.pl
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(PERL) utils/create_sources.pl hetcats-make sources_hetcats.mk
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich%::
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) hetcats-make
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich