Makefile revision 5ad5dffe06818a13e1632b1119fbca7881085fc1
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
a737caf82de97c1907027c03e4b4509eb492b4b8Christian MaederHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
a737caf82de97c1907027c03e4b4509eb492b4b8Christian Maeder Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
a737caf82de97c1907027c03e4b4509eb492b4b8Christian Maeder Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
a737caf82de97c1907027c03e4b4509eb492b4b8Christian Maeder utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
01e383014b555bbcf639c0ca60c5810b3eff83c0Christian Maeder CspCASL ATC Proofs Comorphisms Isabelle Driver \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski Taxonomy CASL_DL SPASS OWL_DL OMDoc PGIP Propositional $(PFE_PATHS) \
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maeder $(addprefix haifa-lite/src/, $(HAIFA_PATHS))
bd54a9917cd87169b8e40bcc5616c537fed85815Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## set ghc imports properly for your system
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGHC_IMPORTS = `$(HC) --print-libdir`/imports
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder# import directories for ghc-5.04.2
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian Maeder# override on commandline for other architectures
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
8410667510a76409aca9bb24ff0eda0420088274Christian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages; \
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
8cacad2a09782249243b80985f28e9387019fe40Christian MaederHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
50515239e7e190f4a34ca581dd685d002148fbddChristian Maederifneq ($(findstring 1.13.2, $(HAXMLVERSION)),)
0206ab93ef846e4e0885996d052b9b73b9dc66b0Christian MaederHAXML_PACKAGE = -package HaXml -DHAXML_PACKAGE
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction -fcontext-stack60 \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder -fallow-overlapping-instances -fallow-undecidable-instances
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# -ddump-minimal-imports
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# flags also come in via ../uni/uni-package.conf
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# but added it here in case of compilation without uni
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
776a1a086df734581431e6edb4343ed4c8d34d55Christian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder SPASS/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder SPASS/tests/soapTest.hs SPASS/tests/soapTest.hs SPASS/tests/CMDL_tests.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# some modules from uni for haddock
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# if uni/server is included also HaXml sources are needed
c0c2380bced8159ff0297ece14eba948bd236471Christian Maederuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ../uni/reactor ../uni/util ../uni/posixutil
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
4017ebc0f692820736d796af3110c3b3018c108aChristian MaederTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder### list of directories to run checks in
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maederhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
4017ebc0f692820736d796af3110c3b3018c108aChristian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/transforms base/transforms/Deriving property \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder property/syntax property/AST property/transforms \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederprogramatica_pkg: patch $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder @if $(HCPKG) field programatica version; then \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder echo "of programatica package found"; else \
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder cp -f utils/programatica.cabal ../programatica/tools; \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder echo "{-# OPTIONS -w #-}" > $@
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -fno-monomorphism-restriction -O \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
89f7631cbfbd1bb99fc152b434bd362a7799d295Christian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maederutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
6b6773cf587b74259178641d811746a235faf056Christian Maeder## rule for appendHaskellPreludeString
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
d272062059eea4d7479e1c6e8517469f02f61287Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
010c56c4cf12dd7977ca36efe85219b91e265ee3Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder## rule for ATC generation
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder### Profiling (only for debugging)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder### Attention every module must be compiled with profiling or the linker
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder### cannot link the various .o files properly. So after switching on
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder### Profiling, do an 'gmake real_clean; gmake'
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### Comment in the following line for switching on profiling.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder#HC_PROF = -prof -auto-all -fignore-asserts
819e29dba060687cf391e444e0f6ff88c1908cc3Christian MaederHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder####################################################################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder## sources for hets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maedernon_sources = utils/Setup.hs Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(wildcard haifa-lite/src/Org/W3/N2001/*.hs) \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(wildcard haifa-lite/src/Org/Xmlsoap/Schemas/Soap/*.hs) \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maedersources = hets.hs $(filter-out $(non_sources), \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian 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\
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettichatc_der_files = $(foreach file, $(atc_files), \
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich ATC/$(basename $(basename $(notdir $(file)))).der.hs)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
18a4d5cb6828f080db9c5f9551785c5151027271Christian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
8d97ef4f234681b11bb5924bd4d03adef858d2d2Christian MaederATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
bd54a9917cd87169b8e40bcc5616c537fed85815Christian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
bd54a9917cd87169b8e40bcc5616c537fed85815Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
e50e41135ece589f7202bd4ef8d6b97531c2a56eKlaus LuettichPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
7fd65519c95c4a8c2e0290ae6346bce134855cadChristian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs CspCASL/SignCSP.hs
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnkeatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichgendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowskigen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maeder OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder# sources that have {-# OPTIONS -cpp #-}
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder Isabelle/CreateTheories.hs CASL/CompositionTable/CompositionTable.hs \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder# unused, remove when header files are gone
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maedernondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(genrule_header_files) $(generated_rule_files) \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# this variable holds the modules that should be documented
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedertax_objects = $(patsubst %.hs, %.o, $(tax_sources))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich real_clean bin_clean package_clean distclean packages \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich check capa hacapa h2h h2hf showKP clean_genRules genRules \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich count doc apache_doc post_doc4apache fromKif \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich derivedSources install_hets install release cgi patch ghci
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichpackages: http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder echo "of HTTP package found"; else \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder @if $(HCPKG) field syb-generics version; then \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder echo "of syb-generics package found"; else \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder echo "of shellac package found"; else \
e7e1ab2ac3f1fded8611bb92ae00e8f3b8c693fbKlaus Luettich @if $(HCPKG) field Shellac-readline version; then \
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich echo "of shellac-readline package found"; else \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder echo "of hxt package found"; else \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder echo "of HAIFA package found"; else \
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder @echo 'File : Maintainer' > $@
94d3aa05411444596b44ede4531f05dd7ac20fdfChristian Maeder 'foreach my $$f (@ARGV) { open I, "<$$f"; \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder print "$$f :"; while (<I>) \
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder print " $$1" ; last} }; print "\n"; close I; }' \
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder @echo " done"
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder###############################
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder### count lines of code
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich###############################
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### Documentation via haddock
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich# generate haddock documentation with links to sources
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich# the interface treatment is stolen from uni/mk/suffix.mk
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich HINTERFACES0=`find docs/www -name '*.haddock' \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich -t 'Hets - the Heterogeneous Tool Set' \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# sources are not copied here
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski $(PERL) utils/post_process_docs.pl a-docs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder###############################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### release management
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederderivedSources: $(derived_sources) $(hspp_sources)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder GenerateRules.hs -o ../genRules && strip ../genRules)
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich# "-package hssource" for ghc-5.04.2
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder# set this variable from the command line to i,e. RELEASETAG='-r release-0-60'
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder if [ -d ../uni ] ; then ln -s ../uni uni ; fi
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder if [ -d ../programatica ] ; then \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ln -s ../../programatica/tools programatica/tools ; fi
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maederpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder ## TODO: add more dependencies and use hets-opt
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder# compile $< -b . -k web -o $@
c5e3fc166373b0d90f6e36e8aa234396a1dcd879Christian Maeder###################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederutils/genItCorrections: $(GENITCORRECTIONS_deps)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich @echo -n "Generating pretty/LaTeX_maps.hs ... "
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich gen_it_characters gen_it_words >> LaTeX_maps.hs)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder @echo "ready"
c5e3fc166373b0d90f6e36e8aa234396a1dcd879Christian Maeder @echo "please copy the file manually to Common"
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich#############################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### ATC DrIFT-rule generation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian MaederPropositional/ATC_Propositional.der.hs: $(Propositional_files) \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ \
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
481d4fe351800ab00fd323db8974559431227305Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederSPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski###############
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini### removes *.hi and *.o in all include directories
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini### remove binaries
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### additionally removes the library files
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### clean user packages
e50e41135ece589f7202bd4ef8d6b97531c2a56eKlaus Luettich $(HCPKG) unregister programatica --user || exit 0
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HCPKG) unregister Shellac-readline --user || exit 0
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(HCPKG) unregister syb-generics --user || exit 0
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### additionally removes generated files not in the CVS tree
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
6da66254a8cff186a1e550b4ace23fb7bcac0d90Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettich####################################################################
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettich### test targets
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettich####################################################################
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### interactive
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder### christian's target
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### CASL parser
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### CASL parser
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder### HasCASL parser
d0652648f9879c67a194f8b03baafe2700c68eb4Christian Maeder### Haskell analysis
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell to Isabelle-HOLCF translation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder $(HC) -O --make -o $@ $< $(HC_FLAGS) $(PFE_FLAGS)
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder### HasCASL to Haskell translation
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### test program to check the known provers
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### run tests in other directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder####################################################################
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder## Preparing the version of HetCATS
fdef3358918491badb0e29e42b5d3b5a01950716Christian MaederDriver/Version.hs: Driver/Version.in version_nr
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder $(PERL) utils/build_version.pl version_nr < Driver/Version.in > $@
fdef3358918491badb0e29e42b5d3b5a01950716Christian Maeder## two hardcoded dependencies for a correct generation of Version.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski## two dependencies for avoidence of circular prerequisites
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian MaederCASL_DEPENDENT_BINARIES= hets CASL/capa CASL/fromKif \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder Common/annos Common/test_parser Comorphisms/test/showKP \
bf76f4fcf07abaebea587df8135de8356c26a363Till Mossakowski CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# CASL_DL/Logic.hs: CASL_DL/PredefinedSign.hs
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettich####################################################################
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich## rules for DrIFT
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo "{-# OPTIONS -w #-}" > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich## rules for inlineAxioms
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich## rule for cpp and haddock
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
2e62113845a35e07cb46db05714627c95450f267Klaus Luettich## compiling rules for object and interface files
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder## compiling rules for dependencies
$(RM) $@
$(RM) $@
$(PERL) $+ > $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
$(RM) $@
@if [ -d $(INSTALLER_DIR) ] ; then \
@echo Please do