Makefile revision 7fd65519c95c4a8c2e0290ae6346bce134855cad
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
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
01e383014b555bbcf639c0ca60c5810b3eff83c0Christian Maeder Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder CspCASL ATC ToHaskell Proofs Comorphisms Isabelle Driver \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder## set ghc imports properly for your system
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGHC_IMPORTS = `$(HC) --print-libdir`/imports
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder# import directories for ghc-5.04.2
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian Maeder DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder# override on commandline for other architectures
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian MaederINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian 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 \
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder Common/GlobalAnnotations.hs Common/PrettyPrint.hs Common/Partial.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 \
d4892fa7401ceef014ea59d2d900773eaf88fcbdChristian Maeder CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian 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
8d97ef4f234681b11bb5924bd4d03adef858d2d2Christian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
0206ab93ef846e4e0885996d052b9b73b9dc66b0Christian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder -fallow-overlapping-instances -fallow-undecidable-instances
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# -ddump-minimal-imports
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maeder# flags also come in via ../uni/uni-package.conf
31c49f2fa23d4ac089f35145d80a224deb6ea7e4Till Mossakowski# but added it here in case of compilation without uni
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowskilogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS OWL_DL ConstraintCASL
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederTESTTARGETS += test_parser hetpa hetana Test.o wrap isa fromKif \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# some modules from uni for haddock
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# if uni/server is included also HaXml sources are needed
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder ../uni/reactor ../uni/util ../uni/posixutil
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
0206ab93ef846e4e0885996d052b9b73b9dc66b0Christian MaederTESTTARGETS += hetdg OWL_DL/readAStest taxonomy
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder### list of directories to run checks in
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/transforms base/transforms/Deriving property \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/syntax property/AST property/transforms \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/TI property/defs property/parse2 property/parse2/Parser
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
62ea3d19927e5ce1318d62931a8427d8930f1576Christian Maeder patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder echo "{-# OPTIONS -w #-}" > $@
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder## rule for appendHaskellPreludeString
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder## rule for ATC generation
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maederhs_der_files += Haskell/TiATC.hs Haskell/TiDecorateATC.hs Haskell/TiPropATC.hs
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich### Profiling (only for debugging)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Attention every module must be compiled with profiling or the linker
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### cannot link the various .o files properly. So after switching on
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich### Profiling, do an 'gmake real_clean; gmake'
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### Comment in the following line for switching on profiling.
6b6773cf587b74259178641d811746a235faf056Christian Maeder#HC_PROF = -prof -auto-all -fignore-asserts
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian MaederHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder## sources for hets
d272062059eea4d7479e1c6e8517469f02f61287Christian Maedernon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
0cfef6179a1bfec4f07f460686dd629a27b4b778Christian Maeder Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedersources = hets.hs $(filter-out $(non_sources), \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederatc_der_files = $(foreach file, $(atc_files), \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian MaederATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
31db599cbcd9285c3734d16279bc7d88cbc20dc6Christian MaederHasCASL_files = HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
b565cd55a13dbccc4e66c344316da525c961e4caTill MossakowskiCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs CoCASL/Sublogic.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus LuettichCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
b565cd55a13dbccc4e66c344316da525c961e4caTill Mossakowskiinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2CFOL.hs \
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# sources that have {-# OPTIONS -cpp #-}
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian Maeder Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
f77f29e84b3f6e791c82e61b13fbf76582bedd2fChristian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# unused, remove when header files are gone
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedernondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(genrule_header_files) $(generated_rule_files) \
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maeder $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian Maeder $(patsubst %.hs, %.der.hs, $(drifted_files))
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maederhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# this variable holds the modules that should be documented
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnketax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedertax_objects = $(patsubst %.hs, %.o, $(tax_sources))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder.PHONY : all hets-opt hets-optimized clean o_clean real_clean bin_clean \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder distclean check capa hacapa wrap isa h2h h2hf clean_genRules genRules \
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder taxonomy count doc apache_doc post_doc4apache fromKif \
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder derivedSources install_hets install release cgi patch ghci
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
5ea9168eddbfbfe2282ed46dfe107a8962d6727bChristian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_INCLUDE) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############################
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### TAGS files for (x)emacs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# load them with "M-x" "visit-tags-table" from
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# use "M-." to search for a tag
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich @echo 'File : Maintainer' > $@
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich 'foreach my $$f (@ARGV) { open I, "<$$f"; \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich print "$$f :"; while (<I>) \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich print " $$1" ; last} }; print "\n"; close I; }' \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich @echo " done"
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############################
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich### count lines of code
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich###############################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Documentation via haddock
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder# generate haddock documentation with links to sources
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder# the interface treatment is stolen from uni/mk/suffix.mk
68aab98a58d1460c77a1573a86c32a891756a420Christian Maeder cp -r ../uni/www docs/www || mkdir docs/www
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder HINTERFACES0=`find docs/www -name '*.haddock' \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder -t 'Hets - the Heterogeneous Tool Set' \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder -p Hets-Haddock-Prologue.txt $(doc_sources)
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder# sources are not copied here
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder $(PERL) utils/post_process_docs.pl a-docs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder### release management
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian MaederderivedSources: $(derived_sources) $(hspp_sources)
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder GenerateRules.hs -o ../genRules && strip ../genRules)
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder# "hssource" for ghc-5.04.2
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder -package hssource -i../.. -o $(INLINEAXIOMS)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder if [ -d ../uni ] ; then ln -s ../uni uni ; fi
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder if [ -d ../programatica ] ; then \
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian Maeder ln -s ../../programatica/tools programatica/tools ; fi
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich#############################
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich### ATC DrIFT-rule generation
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
18c1d987ce5818ecf0bfc8af3f43aed2ce86e1eaChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(HasCASL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederSPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
abf2487c3aece95c371ea89ac64319370dcb6483Klaus LuettichOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### removes *.hi and *.o in all include directories
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder### remove binaries
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder### additionally removes the library files
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder### additionally removes generated files not in the CVS tree
c5e3fc166373b0d90f6e36e8aa234396a1dcd879Christian Maeder $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### test targets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### a parser to test annotation parser and Id parsers
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian MaederCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### interactive
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### christian's target
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder### CASL parser
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederCASL/fromKif: CASL/fromKif.hs Common/*.hs CASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### CASL parser
481d4fe351800ab00fd323db8974559431227305Christian MaederCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HasCASL parser
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### Haskell wrapper parser
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederHaskell/wrap: Haskell/wrap.hs Common/*.hs Haskell/Wrapper.hs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### Isar parser
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederIsabelle/isa: Isabelle/isa.hs Common/*.hs Isabelle/*.hs
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski### Haskell analysis
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian MaederHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini### Haskell to Isabelle-HOLCF translation
1f63599faaa311cd024d6413f82bff8caae8de24Christian MaederToHaskell/h2hf: ToHaskell/h2hf.hs ToHaskell/*.hs Haskell/*.hs \
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder### HasCASL to Haskell translation
23ab8855c58adfbd03a0730584b917b24c603901Christian MaederToHaskell/h2h: ToHaskell/h2h.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### ATC test system
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederatctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs \
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich### ATerm.Lib test system
6da66254a8cff186a1e550b4ace23fb7bcac0d90Christian Maederatermlibtest: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettichhatermdiff: Common/ATerm/ATermDiffMain.hs Common/SimpPretty.hs \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### OWL_DL test target
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus LuettichOWL_DL/readAStest: OWL_DL/ToHaskellAS.hs Common/ATerm/*.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL with dev graph
1f63599faaa311cd024d6413f82bff8caae8de24Christian MaederTaxonomy/taxonomyTool: Taxonomy/taxonomyTool.hs $(tax_sources)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### run tests in other directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## Preparing the version of HetCATS
43b4c41fbb07705c9df321221ab9cb9832460407Christian MaederDriver/Version.hs: Driver/Version.in version_nr
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder $(PERL) utils/build_version.pl version_nr < Driver/Version.in > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## two hardcoded dependencies for a correct generation of Version.hs
43b4c41fbb07705c9df321221ab9cb9832460407Christian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rules for DrIFT
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder echo "{-# OPTIONS -w #-}" > $@
7767474aba4fa2dc51a6c68017d3bcef3b773001Christian Maeder ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski## rules for inlineAxioms
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder## rule for cpp and haddock
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for object and interface files
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for dependencies
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich## generate the inline file for the predefined CASL_DL sign
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich# Warning: Don't change the order of the depencies!!
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich echo " )" >> $@
0be0db405c49906bd7057255069bf6df53395ac9Klaus LuettichCASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettich## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# uses intransparently utils/outlineAxioms