Makefile revision a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4c
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# This Makefile will compile the new hetcats system and provides also
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# targets for test programs during implementation phases.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# !!! Note: This makefile is written for GNU make !!!
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# (gmake on solaris ; make on linux)
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maeder####################################################################
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder## Some varibles, which control the compilation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCOMMONLIB_PATH = Common/Lib:Common/ATerm:fgl/Data/Graph:fgl/Data/Graph/Inductive:fgl/Data/Graph/Inductive/Aux:fgl/Data/Graph/Inductive/Monad:fgl/Data/Graph/Inductive/Query
d27ad22f77ca7399742b54e9dce2cdceed12d5e0Christian 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:Hatchet:Taxonomy:$(PFE_PATHS)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder## set ghc imports properly for your system
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}:${PFE_PATHS}'
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# override on commandline for other architectures
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederINLINEAXIOMS_deps = utils/InlineAxioms/*hs $(drifted_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederHC_FLAGS = -Wall -fglasgow-exts -fno-monomorphism-restriction \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder -fallow-overlapping-instances -fallow-undecidable-instances
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder# -ddump-minimal-imports
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder# flags also come in via ../uni/uni-package.conf
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder# but added it here in case of compilation without uni
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederHC_INCLUDE = $(addprefix -i, $(subst :, ,$(INCLUDE_PATH)))
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederUNI_PACKAGE_CONF := $(wildcard ../uni/uni-package.conf)
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederlogics = CASL HasCASL Modal CoCASL COL CspCASL Hatchet
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian Maeder# some modules from uni for haddock
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# if uni/server is included also HaXml sources are needed
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederuni_sources = $(wildcard ../uni/davinci/haddock/*.hs) \
a2d6702f18737cc5fff8e8631c08f221f8375c4bChristian MaederPFE_TOOLDIR := $(wildcard ../programatica/tools)
31c49f2fa23d4ac089f35145d80a224deb6ea7e4Till MossakowskiPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/transforms base/transforms/Deriving hs2html pfe property base \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder property/pfe property/syntax property/AST property/transforms \
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_PATH = $(addprefix -i$(PFE_TOOLDIR)/, $(PFE_DIRS))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# add PFE_PATHS to DERIVEPATH if needed
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# but name clashes currently prevent ATC generation in a single file
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederPFE_PATHS = $(subst $(space),:,$(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS)))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederpfe_sources = $(wildcard $(subst :,/*hs , $(PFE_PATHS)))
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederhappy_files = $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### Profiling (only for debugging)
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder### Attention every module must be compiled with profiling or the linker
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder### cannot link the various .o files properly. So after switching on
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder### Profiling, do an 'gmake real_clean; gmake'
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### and comment out HC_PACKAGE variable definition above.
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### Comment in the following line for switching on profiling.
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder#HC_PROF = -prof -auto-all
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### list of directories to run checks in
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## sources for hetcats (semi - manually produced with a perl script)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederSOURCE_PATHS = $(COMMON_LIB_PATH):$(CLEAN_PATH)
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maedersources = $(wildcard $(subst :,/*hs , $(SOURCE_PATHS))/*hs)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian 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 \
88318aafc287e92931dceffbb943d58a9310001dChristian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maederatc_files := Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederatc_der_files = $(foreach file, $(atc_files), \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederCASL_files := CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHasCASL_files := HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederModal_files := Modal/AS_Modal.hs Modal/ModalSign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCoCASL_files := CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederCspCASL_files := CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHatchet_files := Haskell/Hatchet/AnnotatedHsSyn.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian MaederAst_Haskell_files := HsDeclStruct HsExpStruct HsFieldsStruct \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederOther_PFE_files := property/AST/HsPropStruct base/defs/PNT \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder base/defs/UniqueNames base/Modules/TypedIds \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich base/parse2/SourceNames base/syntax/SyntaxRec \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
d272062059eea4d7479e1c6e8517469f02f61287Christian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Comorphisms/Modal2CASL.hs # Comorphisms/CASL2TopSort.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederderived_sources = $(drifted_files) hetcats/Version.hs $(happy_files) \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# sources that have {-# OPTIONS -cpp #-}
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maedercpp_sources = ./Isabelle/Logic_Isabelle.hs \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers ./Proofs/Proofs.hs hets.hs ./CASL/CCC/FreeTypes.hs \
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian Maeder ./Comorphisms/LogicList.hs ./Comorphisms/LogicGraph.hs
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder# this variable holds the modules that should be documented
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersdoc_sources = $(filter-out $(cpp_sources), $(filter-out $(pfe_sources), \
0799b5dc3f06d2640e66e9ab54b8b217348fd719Christian Maeder $(sources))) $(patsubst %.hs, %.hspp, $(cpp_sources))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckerstax_objects = $(patsubst %.hs,%.o,$(tax_sources))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder####################################################################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder.PHONY : all hets-opt hets-optimized clean d_clean real_clean bin_clean \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder lib_clean distclean check capa hacapa h2h clean_genRules genRules \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder taxonomy count doc apache_doc post_doc4apache \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder derivedSources install_hets install release
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder ghc --make -package-conf /home/luettich/ghc-pkg/package.conf \
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_INCLUDE) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedertaxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich###############################
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### TAGS files for (x)emacs
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner# load them with "M-x" "visit-tags-table" from
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# use "M-." to search for a tag
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder###############################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### count lines of code
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski###############################
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### Documentation via haddock
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# generate haddock documentation with links to sources
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian Maeder $(HADDOCK) $(doc_sources) $(uni_sources) -o docs -h -v \
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian Maeder -i docs/base.haddock -i docs/parsec.haddock -s ../ \
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner -t 'hets -- a heterogenous Specification (CASL) tool set'
e2d849b4152a234bc0afaa2ab3a7c17d28de7565Christian Maeder# sources are not copied here
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder###############################
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### release management
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder GenerateRules.hs -o ../genRules && strip ../genRules)
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs \
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
b10267ae0a6523b73113fc2dee9ea628266fce60Christian Maeder -ln -s ../../programatica/tools programatica/tools
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder (cd HetCATS; $(MAKE) derivedSources; ./clean.sh; \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(RM) clean.*; mv Makefile Makefile.orig; \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich#############################
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder### ATC DrIFT-rule generation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder$(atc_der_files): $(atc_files) $(genrule_header_files) utils/genRules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(foreach file,$(atc_files),$(gen_atc_files))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) utils/genRules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder utils/genRules -r $(rule) -o CASL $(CASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) utils/genRules
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder utils/genRules -r $(rule) -o HasCASL $(HasCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) utils/genRules
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich utils/genRules -r $(rule) -o Modal $(Modal_files)
b905126bab9454b89041f92b3c50bb9efc85e427Klaus LuettichCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) utils/genRules
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich utils/genRules -r $(rule) -o CoCASL $(CoCASL_files)
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian MaederCOL/ATC_COL.der.hs: $(COL_files) utils/genRules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder utils/genRules -r $(rule) -o COL $(COL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) utils/genRules
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder utils/genRules -r $(rule) -o CspCASL $(CspCASL_files)
3a7788e09dd23b364a46c9488cbd1522369113dbChristian MaederHatchet/ATC_Hatchet.der.hs: $(Hatchet_files) utils/genRules
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder utils/genRules -r $(rule) -o Hatchet -h ATC/Hatchet.header.hs \
ef67402074be14deb95e4ff564737d5593144130Klaus LuettichHaskell/ATC_Haskell.der.hs: $(Haskell_files) utils/genRules
5958fabb264ec3f5b2125ac5602121bd34814a79Klaus Luettich utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
725a68ec81cba9b8aa8647bebfb5baa449803e7eKlaus Luettich else utils/genRules -r $(rule) -o ATC $(file); fi ;
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder#############################
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder### programatica stuff
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder###############
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### removes *.hi and *.o in all include directories
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder### remove binaries
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### additonally removes *.d (dependency files) in every include directory
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### also delete *.d.bak (dependency file backups)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### remove files also in own libraries
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder for p in $(subst :, ,$(COMMONLIB_PATH)) . ; do \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### additionally removes the files that define the sources-variable
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### additionally removes files not in CVS tree
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederdistclean: real_clean clean_genRules d_clean
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder####################################################################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### test targets
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers####################################################################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### a parser to test annotation parser and Id parsers
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### interactive
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### christian's target
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich### CASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HasCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell analysis
d67a33b40578beef2e255a274f89bb9c34aaf056Christian MaederHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder### HasCASL to Haskell translation
ba904a15082557e939db689fcfba0c68c9a4f740Christian MaederToHaskell/h2h: ToHaskell/h2h.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### ATC test system
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maederatctest2: Common/ATerm/atctest2.hs Common/SimpPretty.hs \
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maederatermlibtest: Common/ATerm/atermlibtest.hs Common/SimpPretty.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder### HetCASL with dev graph
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### run tests in other directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder####################################################################
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder## Preparing the version of HetCATS
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maederhetcats/Version.hs: hetcats/Version.in version_nr
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## two hardcoded dependencies for a correct generation of Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rules for DrIFT
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski## rules for inlineAxioms
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini## rule for appendHaskellPreludeString
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo TorriniHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini## rule for cpp and haddock
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder## compiling rules for object and interface files
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for dependencies
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich# hetcats-make is created as side-effect of hets or hets-optimized
6da66254a8cff186a1e550b4ace23fb7bcac0d90Christian Maedersources_hetcats.mk: hetcats-make utils/create_sources.pl