Makefile revision 55adfe57a4de1f36adc3e3bfc16f342e44a7d444
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# This Makefile will compile the new hets 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)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## Some varibles, which control the compilation
c90087f49069855bf684b699f9ca1e2d65eac20bChristian MaederCOMMONLIB_PATH = Common/Lib Common/ATerm fgl/Data/Graph \
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder fgl/Data/Graph/Inductive fgl/Data/Graph/Inductive/Internal \
01e383014b555bbcf639c0ca60c5810b3eff83c0Christian Maeder fgl/Data/Graph/Inductive/Monad fgl/Data/Graph/Inductive/Query
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCLEAN_PATH = . utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder Logic CASL CASL/CCC Syntax Static GUI HasCASL Haskell Modal CoCASL COL \
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich CspCASL ATC ToHaskell Proofs Comorphisms Isabelle Driver $(INCLUDE_PATH) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## set ghc imports properly for your system
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederGHC_IMPORTS = `$(HC) --print-libdir`/imports
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder DERIVEPATH=.:ghc:$(GHC_IMPORTS):$(subst $(space),:,$(PFE_PATHS))
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder# override on commandline for other architectures
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder Common/Lib/Pretty.hs Common/Keywords.hs Common/Lib/Set.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/Lib/Map.hs Common/Lib/Rel.hs Common/Lib/State.hs Common/Id.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs CASL/ShowMixfix.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder CASL/Utils.hs Common/Lexer.hs Common/Token.hs Common/Anno_Parser.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/GlobalAnnotations.hs Common/PrettyPrint.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/Print_AS_Annotation.hs Common/PPUtils.hs CASL/LiteralFuns.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder CASL/Print_AS_Basic.hs Common/AnnoState.hs CASL/Formula.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
d4892fa7401ceef014ea59d2d900773eaf88fcbdChristian Maeder Common/ConvertLiteral.hs Common/Earley.hs CASL/MixfixParser.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder CASL/Parse_AS_Basic.hs CASL/Sign.hs CASL/Overload.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder CASL/StaticAna.hs Modal/AS_Modal.hs Modal/Parse_AS.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_FLAGS = $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -fallow-overlapping-instances -fallow-undecidable-instances
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder# -ddump-minimal-imports
f13d1e86e58da53680e78043e8df182eed867efbChristian Maeder# flags also come in via ../uni/uni-package.conf
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder# but added it here in case of compilation without uni
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maederlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus LuettichUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder# some modules from uni for haddock
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder# if uni/server is included also HaXml sources are needed
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maederuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ../uni/reactor ../uni/util ../uni/posixutil
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### list of directories to run checks in
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder base/transforms base/transforms/Deriving property \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder property/syntax property/AST property/transforms \
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder patch -sNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder## rule for appendHaskellPreludeString
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder base/defs/UniqueNames base/Modules/TypedIds base/TI/TiKinds \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## rule for ATC generation
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) ATC/Haskell.header.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Profiling (only for debugging)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder### Attention every module must be compiled with profiling or the linker
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder### cannot link the various .o files properly. So after switching on
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### Profiling, do an 'gmake real_clean; gmake'
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### and comment out HC_PACKAGE variable definition above.
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder### Comment in the following line for switching on profiling.
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder#HC_PROF = -prof -auto-all
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian MaederHC_OPTS = $(HCI_OPTS) $(HC_PROF) -DCASLEXTENSIONS
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich## sources for hets
6b6773cf587b74259178641d811746a235faf056Christian Maedernon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Static/LogicStructured.hs Common/CaslLanguage.hs ./Test.hs
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian MaederSOURCE_PATHS = $(COMMONLIB_PATH) $(CLEAN_PATH)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedersources = hets.hs $(filter-out $(non_sources), \
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian 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 \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
010c56c4cf12dd7977ca36efe85219b91e265ee3Christian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich Static/DevGraph.hs Logic/Prover.hs Proofs/Proofs.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersatc_der_files = $(foreach file, $(atc_files), \
0799b5dc3f06d2640e66e9ab54b8b217348fd719Christian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederHasCASL_files = HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# sources that have {-# OPTIONS -cpp #-}
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Isabelle/Logic_Isabelle.hs Isabelle/CreateTheories.hs \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs $(happy_files)
e96a0bf4040fd789339958c01f145c5057d26db6René Wagnernondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(genrule_header_files) $(generated_rule_files) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder hxt/HXT.hs hxt/Net.hs $(patsubst %.hs, %.der.hs, $(drifted_files))
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maeder# this variable holds the modules that should be documented
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources)) \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(patsubst %.hs, %.hspp, $(cpp_sources)) $(uni_sources)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowskitax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maedertax_objects = $(patsubst %.hs, %.o, $(tax_sources))
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder####################################################################
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder.PHONY : all hets-opt hets-optimized clean d_clean real_clean bin_clean \
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder lib_clean distclean check capa hacapa h2h clean_genRules genRules \
cceeb4255dbd4c3385c860da40b0c10ca3218425Klaus Luettich taxonomy count doc apache_doc post_doc4apache \
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder derivedSources install_hets install release patch
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ghc --make -package-conf /home/luettich/ghc-pkg/package.conf \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_INCLUDE) \
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maedertaxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder $(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder###############################
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder### TAGS files for (x)emacs
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski# load them with "M-x" "visit-tags-table" from
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder# use "M-." to search for a tag
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder### count lines of code
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder###############################
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### Documentation via haddock
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder# generate haddock documentation with links to sources
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder -i docs/base.haddock -i docs/parsec.haddock -s ../ \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -t 'Hets - the Heterogeneous Tool Set' \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich# sources are not copied here
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### release management
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich GenerateRules.hs -o ../genRules && strip ../genRules)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder if [ -d ../uni ] ; then ln -s ../uni uni ; fi
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder if [ -d ../programatica ] ; then \
68aab98a58d1460c77a1573a86c32a891756a420Christian Maeder ln -s ../../programatica/tools programatica/tools ; fi
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder (cd HetCATS; $(MAKE) derivedSources; $(MAKE) real_clean; \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich#############################
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich### ATC DrIFT-rule generation
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder else utils/genRules -r $(rule) -o ATC $(file); fi ;
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder$(atc_der_files): $(atc_files) $(genrule_header_files) utils/genRules
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(foreach file, $(atc_files), $(gen_atc_files))
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichCASL/ATC_CASL.der.hs: $(CASL_files) utils/genRules
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich utils/genRules -r $(rule) -o CASL $(CASL_files)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) utils/genRules
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich utils/genRules -r $(rule) -o HasCASL $(HasCASL_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) utils/genRules
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder utils/genRules -r $(rule) -o Isabelle $(Isabelle_files)
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) utils/genRules
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder utils/genRules -r $(rule) -o Modal $(Modal_files)
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) utils/genRules
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder utils/genRules -r $(rule) -o CASL_DL $(CASL_DL_files)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) utils/genRules
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder utils/genRules -r $(rule) -o CoCASL $(CoCASL_files)
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian MaederCOL/ATC_COL.der.hs: $(COL_files) utils/genRules
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder utils/genRules -r $(rule) -o COL $(COL_files)
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) utils/genRules
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder utils/genRules -r $(rule) -o CspCASL $(CspCASL_files)
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian MaederSPASS/ATC_SPASS.der.hs: $(SPASS_files) utils/genRules
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder utils/genRules -r $(rule) -o SPASS $(SPASS_files)
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder### removes *.hi and *.o in all include directories
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich### remove binaries
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### additonally removes *.d (dependency files) in every include directory
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### also delete *.d.bak (dependency file backups)
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner### remove files also in own libraries
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich### additionally removes the files that define the sources-variable
ba0ec5e897ef99d420c8c14c2374e0f32b7043dbKlaus Luettich### additionally removes files not in CVS tree
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederdistclean: real_clean clean_genRules d_clean
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### test targets
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### a parser to test annotation parser and Id parsers
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder### interactive
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### christian's target
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### CASL parser
d0652648f9879c67a194f8b03baafe2700c68eb4Christian MaederCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder### HasCASL parser
ba904a15082557e939db689fcfba0c68c9a4f740Christian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder### Haskell analysis
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell to Isabelle-HOLCF translation
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederToHaskell/h2hf: ToHaskell/h2hf.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs Isabelle/*.hs Common/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HasCASL to Haskell translation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederToHaskell/h2h: ToHaskell/h2h.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### ATC test system
481d4fe351800ab00fd323db8974559431227305Christian Maederatctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederatermlibtest: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowskihatermdiff: Common/ATerm/ATermDiffMain.hs Common/SimpPretty.hs \
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder### OWL_DL test target
23ab8855c58adfbd03a0730584b917b24c603901Christian MaederOWL_DL/readAStest: OWL_DL/ToHaskellAS.hs Common/ATerm/*.hs \
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder### HetCASL with dev graph
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder### run tests in other directories
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski####################################################################
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski## Preparing the version of HetCATS
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederDriver/Version.hs: Driver/Version.in version_nr
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(PERL) utils/build_version.pl version_nr < Driver/Version.in > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## two hardcoded dependencies for a correct generation of Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rules for DrIFT
6da66254a8cff186a1e550b4ace23fb7bcac0d90Christian Maeder ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $(DRIFT_OPTS) $< > $@)
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder## rules for inlineAxioms
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder## rule for cpp and haddock
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich## compiling rules for object and interface files
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder## compiling rules for dependencies
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for Modal/ModalSystems.hs needed for ModalLogic Translation