Makefile revision da8353f130412f98f3c942c2d02ff2bb26babd20
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Author: (c) Klaus Luettich, 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####################################################################
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder## Some varibles, which control the compilation
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus LuettichHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
01e383014b555bbcf639c0ca60c5810b3eff83c0Christian Maeder utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowski Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# override on commandline for other architectures
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
8410667510a76409aca9bb24ff0eda0420088274Christian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
8d97ef4f234681b11bb5924bd4d03adef858d2d2Christian MaederHADDOCKVERSION = $(shell $(HADDOCK) --version)
c3053d57f642ca507cdf79512e604437c4546cb9Christian MaederSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder ../$(SETUP) configure $(SETUPPREFIX) --user; \
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder ../$(SETUP) build; ../$(SETUP) install --user
c2fcc35abb03cf0b4ca4b050efeb10827f38c322Christian Maeder# list glade files
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian MaederGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maederlogics = CASL HasCASL Isabelle Modal Temporal CoCASL COL CspCASL CASL_DL \
0206ab93ef846e4e0885996d052b9b73b9dc66b0Christian Maeder SoftFOL ConstraintCASL Propositional OWL RelationalScheme VSE OMDoc DFOL
c2a4d8ae266aa37cc922eba97077520229a19902Christian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maeder ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
79e80c4b3f0ebb337d84415a50f29ccfc793e68bChristian Maeder SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
757e6c79ec40491d45dc72c82b5eb59a386634b0Jian Chun Wang SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
ecf76bc89d9a2ecd7ac7310d30654b9a79d97d62Klaus Luettich### list of directories to run checks in
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettichhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
8a28707e9155465c6f2236a06eac6580a65c7025Christian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
ea0dd71829400e24c3d8a7b7440cd6b42c34a3b8Christian Maeder base/transforms base/transforms/Deriving property \
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder property/syntax property/AST property/transforms \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/TI property/defs property/parse2 property/parse2/Parser
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder @if $(HCPKG) field programatica version; then \
b886e9e5db2098d0112cc4f70aeba232962939ddChristian Maeder echo "of programatica package found"; else \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder -i `pwd`/Haskell/Programatica.patch || exit 0); \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder cp -f utils/programatica.cabal ../programatica/tools; \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder echo "{-# OPTIONS -w #-}" > $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -fno-monomorphism-restriction -O \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder## rule for appendHaskellPreludeString
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
a9b59eb2ce961014974276cdae0e9df4419bd212Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maeder## rule for ATC generation
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
4017ebc0f692820736d796af3110c3b3018c108aChristian MaederTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
b568982efd0997d877286faa592d81b03c8c67b8Christian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich# INCLUDE_PATH =
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# uncomment for profiling (and comment out packages in var.mk)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# call resulting binary with a final +RTS -p to get a file <binary>.prof
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederHC_OPTS += $(HC_WARN) $(HC_INCLUDE) $(HC_PROF)
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder# -ddump-minimal-imports
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder# uncomment to above line to generate .imports files for displayDependencyGraph
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## sources for hets
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedernon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maedersources = hets.hs $(filter-out $(non_sources), \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettichatc_der_files = $(foreach file, $(atc_files), \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
9df11f85fd7f8c4745d64464876e84ec4e263692Christian MaederATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus LuettichATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(GENRULECALL) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.LibName -i ATC.Grothendieck -o $@ $<
819e29dba060687cf391e444e0f6ff88c1908cc3Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederTemporal_files = Temporal/AS_BASIC_Temporal.hs Temporal/Sign.hs \
ac34194a668399bb8ef238da77c3a09e93fb253bChristian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
ac34194a668399bb8ef238da77c3a09e93fb253bChristian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
1b5b696aa3bc2a6747a4eeac777f850788482c98Dominik LueckeDFOL_files = DFOL/AS_DFOL.hs DFOL/Sign.hs DFOL/Morphism.hs DFOL/Symbol.hs
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowskiatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettichinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettichgen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# sources that have {-# OPTIONS -cpp #-}
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# unused, remove when header files are gone
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian 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 Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder real_clean bin_clean package_clean distclean packages \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich base64_pkg http_pkg syb_pkg shellac_pkg shread_pkg shcompat_pkg \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder tagsoup_pkg hxt_pkg hxtfilter_pkg haifa_pkg programatica_pkg \
f443a57f2a8e0ca3daa7431b0c89a18ba52c337aChristian Maeder check capa hacapa h2h h2hf showKP clean_genRules genRules \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder count doc apache_doc post_doc4apache fromKif \
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder derivedSources install_hets install release cgi ghci
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederpackages: syb_pkg haifa_pkg programatica_pkg
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder @if $(HCPKG) field syb-generics version; then \
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder echo "of syb-generics package found"; else \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder echo "of HAIFA package found"; else \
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder @echo 'File : Maintainer' > $@
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder @echo " done"
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder###############################
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### count lines of code
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder###############################
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder### Documentation via haddock
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederHADDOCK_OPTS = $(addprefix --optghc=, $(HC_OPTS))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -t 'Hets - the Heterogeneous Tool Set' \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder -p Hets-Haddock-Prologue.txt $(HADDOCK_OPTS) \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich Syntax/ADoc.hs $(filter-out Test.hs, $(wildcard *.hs))
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich# generate haddock documentation with links to sources
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich# the interface treatment is stolen from uni/mk/suffix.mk
5c69cef4668bbd959d721668313a779126014d1eKlaus Luettich cp -r -L ../uni/www docs/www || mkdir docs/www
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich HINTERFACES0=`find -L docs/www -name '*.haddock' \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich -t 'Hets - the Heterogeneous Tool Set' \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich# sources are not copied here
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(PERL) utils/post_process_docs.pl a-docs \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder###############################
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder### release management
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian MaederderivedSources: $(derived_sources) $(hspp_sources)
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT)
c9e197862d9d8ef2585270dd08f5194b3aed4a9dKlaus Luettich $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich# "-package hssource" for ghc-5.04.2
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maederutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder if [ -d ../uni ] ; then ln -s ../uni uni ; fi
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder if [ -d ../programatica ] ; then \
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich ln -s ../../programatica/tools programatica/tools ; fi
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder ## TODO: add more dependencies and use hets-opt
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder# compile $< -b . -k web -o $@
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maeder###################################
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian Maederutils/genItCorrections: $(GENITCORRECTIONS_deps)
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maederpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
c59d1c38ef94b4fb1c8d9fda9573bc1e1d2801e7Christian Maeder @echo -n "Generating pretty/LaTeX_maps.hs ... "
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder gen_it_characters gen_it_words >> LaTeX_maps.hs)
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder @echo "ready"
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder @echo "please copy the file manually to Common"
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder#############################
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder### ATC DrIFT-rule generation
8410667510a76409aca9bb24ff0eda0420088274Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus LuettichRelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichPropositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichTemporal/ATC_Temporal.der.hs: $(Temporal_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Temporal_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
18c1d987ce5818ecf0bfc8af3f43aed2ce86e1eaChristian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik LueckeCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
1c9a63e4f7c6879f51fe0f32154a9116f2c126dbChristian MaederSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederOWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederVSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich $(GENRULECALL) -x VSE.As.FoldRec -i CASL.ATC_CASL -o $@ $(VSE_files)
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiOMDoc/ATC_OMDoc.der.hs: $(OMDoc_files) $(GENRULES)
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski $(GENRULECALL) -i OMDoc.ATerm -o $@ $(OMDoc_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederDFOL/ATC_DFOL.der.hs: $(DFOL_files) $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(DFOL_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers###############
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich### removes all *.o, *.hi and *.p_o files in all subdirectories
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich find . -name \*.o -o -name \*.hi -o -name \*.p_o \
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich -o -name \*.exe -o -name \*.exe.manifest | xargs $(RM)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### remove binaries
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich### additionally removes the library files
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder### clean user packages
d0652648f9879c67a194f8b03baafe2700c68eb4Christian Maeder $(HCPKG) unregister programatica --user || exit 0
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(HCPKG) unregister syb-generics --user || exit 0
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder### additionally removes generated files not in the CVS tree
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder####################################################################
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### test targets
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder####################################################################
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### interactive
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder### christian's target
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### CASL parser
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### Annos parser
8451c0f87cd1c53edee413e5154dbe7e44448664Christian Maeder### CASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HasCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell analysis
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maeder### Haskell to Isabelle-HOLCF translation
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder### HasCASL to Haskell translation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### test program to check the known provers
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### run tests in other directories
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski####################################################################
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini## Preparing the version of Hets
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian MaederDriver/Version.hs: Driver/Version.in version_nr
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder LANG=C $(PERL) utils/build_version.pl version_nr \
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder## two hardcoded dependencies for a correct generation of Version.hs
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## two dependencies for avoidence of circular prerequisites
431d34c7007a787331c4e5ec997badb0f8190fc7Christian MaederCASL_DEPENDENT_BINARIES= hets CASL/capa CASL/fromKif \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Common/annos Common/test_parser Comorphisms/test/showKP \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# CASL_DL/Logic.hs: CASL_DL/PredefinedSign.hs
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder####################################################################
d5d349836d8b1fa93ea49a59d977b106c6e9233bKlaus Luettich## rules for DrIFT
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maeder echo "{-# OPTIONS -w #-}" > $@
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rules for inlineAxioms
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder## rule for cpp and haddock
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder## compiling rules for object and interface files
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski## compiling rules for dependencies
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettich## Rule to generate hs files from glade files. Needed for GTK
473bc1f3f3443f18e0ee83e4642fab42183470f2Christian Maeder%.hs: %.glade utils/appendHaskellPreludeString \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## generate the inline file for the predefined CASL_DL sign
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo " )" >> $@
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder# Warning: Don't change the order of the depencies!!
0be0db405c49906bd7057255069bf6df53395ac9Klaus LuettichCASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich# uses intransparently utils/outlineAxioms
0be0db405c49906bd7057255069bf6df53395ac9Klaus LuettichModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# or `date +%F`
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \
af12672e86f22a822a9915a21efbbbc04a01e3c1Heng Jiang @echo " -> make"