Makefile revision 06ba24fa9695b698437546276f37aa5e1924ad1b
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
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 \
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 \
9dac90ec2be2a72e03893095461960d483fe2fc2Christian Maeder CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
5e5d3e82af3bc2834f8718a52d9f45da80220273Dominik Luecke Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian MaederDRIFT_ENV = DERIVEPATH=$(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`
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
ad270004874ce1d0697fb30d7309f180553bb315Christian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian MaederINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
4cb215739e9ab13447fa21162482ebe485b47455Christian Maeder Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
8ef75f1cc0437656bf622cec5ac9e8ea221da8f2Christian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
8d97ef4f234681b11bb5924bd4d03adef858d2d2Christian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
d0279930f87bf39843e0bd2992a4789322662144Christian Maeder ../$(SETUP) configure $(SETUPPREFIX) --user; \
c2fcc35abb03cf0b4ca4b050efeb10827f38c322Christian Maeder ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder# list glade files
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettichlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian Maeder ConstraintCASL Propositional OWL DL RelationalScheme VSE OMDoc
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
8a28707e9155465c6f2236a06eac6580a65c7025Christian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
797ccd67cb8ae127be097cd43448801b673e3b69Christian Maeder SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder### list of directories to run checks in
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maederhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
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)))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maederprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder @if $(HCPKG) field programatica version; then \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder echo "of programatica package found"; else \
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder -i `pwd`/Haskell/Programatica.patch || exit 0); \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder cp -f utils/programatica.cabal ../programatica/tools; \
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 \
a9b59eb2ce961014974276cdae0e9df4419bd212Christian Maeder $(HC) --make -fno-monomorphism-restriction -O \
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)
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# INCLUDE_PATH =
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# uncomment for profiling
13731dfbb4b6a31b35dd210e832e920065b6ac45Christian Maeder# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian MaederHC_OPTS += $(HC_WARN) $(HC_INCLUDE) $(HC_PROF)
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# -ddump-minimal-imports
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# uncomment to above line to generate .imports files for displayDependencyGraph
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder## sources for hets
42b12fba6830ada5057949f825fc27edf5574e5fChristian Maedernon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedersources = hets.hs $(filter-out $(non_sources), \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
06dd4e7c29f33f6122a910719e3bd9062256e397Andy Gimblett CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.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 \
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs Static/DevGraph.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)
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian MaederATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian MaederATC/ExtSign.der.hs: Common/ExtSign.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)
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder $(GENRULECALL) -i ATC.AS_Architecture -i ATC.LibName -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)
ac34194a668399bb8ef238da77c3a09e93fb253bChristian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian MaederATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
4c8d3c5a9e938633f6147b5a595b9b93bfca99e6Christian Maeder $(GENRULECALL) -i ATC.LibName -i ATC.Grothendieck -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik LueckePropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
05a206508bc898f87fe6ab6e069814df3c29d303Dominik LueckeRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
0b349288edfa50fdf38fda1a14e1562d03f92574Christian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
1b3a2f98d1cd01fc9e0591f69507e20526727559Dominik LueckeCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
c70ef4c3b3a62764f715510c9fd67dde3acfe454Christian 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))
b9b960bc75e34658e70c4a0231dbc6a6e7373f2dChristian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
846d851fc0c2c49e949763cd3407634ba0f726c0Christian Maeder 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) \
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# sources that have {-# OPTIONS -cpp #-}
70731e5459a18fc473bdc962ca94d1c12de974afChristian Maeder CASL/Logic_CASL.hs Isabelle/CreateTheories.hs \
edd1b7f4720bc2eea51fa0685417e1e4f3be4915Klaus Luettich SoftFOL/Logic_SoftFOL.hs GUI/Utils.hs Driver/WriteFn.hs \
7809fb14d290d257ed6d46a2dd563227e227fcf3Christian Maeder Propositional/Logic_Propositional.hs GUI/GraphMenu.hs \
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
bd54a9917cd87169b8e40bcc5616c537fed85815Christian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
e059476130210dbb1896e753eb0a5e8c4f219f4aChristian Maeder PGIP/InfoCommands.hs OWL/Logic_OWL11.hs GUI/ShowGraph.hs \
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####################################################################
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder real_clean bin_clean package_clean distclean packages \
368c26b8ad68a4b2c42963626087667000c2eebfChristian Maeder base64_pkg http_pkg syb_pkg shellac_pkg shread_pkg shcompat_pkg \
368c26b8ad68a4b2c42963626087667000c2eebfChristian 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 \
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder derivedSources install_hets install release cgi ghci
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
6d549a835ffd3a11c3ed74e0f8fda30fda6a9528Christian Maederpackages: syb_pkg haifa_pkg programatica_pkg
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder @if $(HCPKG) field syb-generics version; then \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder echo "of syb-generics package found"; else \
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder echo "of HAIFA package found"; else \
a883cd4d01fe39d23219cf5333425f195be24d8bChristian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich @echo 'File : Maintainer' > $@
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
c1bf9cc3bc3729b0bf925be3be123cbb59bea2a6Christian Maeder cp -r -L ../uni/www docs/www || mkdir docs/www
c1bf9cc3bc3729b0bf925be3be123cbb59bea2a6Christian Maeder HINTERFACES0=`find -L 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)
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder# "-package hssource" for ghc-5.04.2
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
1dfba1f850f6a43094962b459998d1ea11472461Christian Maederutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
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
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
c59d1c38ef94b4fb1c8d9fda9573bc1e1d2801e7Christian Maeder find . -name .svn -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)
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maederpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich ## TODO: add more dependencies and use hets-opt
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich# compile $< -b . -k web -o $@
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich###################################
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichutils/genItCorrections: $(GENITCORRECTIONS_deps)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich @echo -n "Generating pretty/LaTeX_maps.hs ... "
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich @(cd pretty >/dev/null; ../utils/genItCorrections \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich gen_it_characters gen_it_words >> LaTeX_maps.hs)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich @echo "ready"
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich @echo "please copy the file manually to Common"
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)
00ccf62b4570513e965eb156ab5916ec816c5d2bDominik Luecke $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(DL_files)
05a206508bc898f87fe6ab6e069814df3c29d303Dominik LueckeRelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Luecke $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
b891e9ad7dd358a7df24b59bf00d51515078497cChristian MaederPropositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
b891e9ad7dd358a7df24b59bf00d51515078497cChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
1c9a63e4f7c6879f51fe0f32154a9116f2c126dbChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
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)
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus LuettichSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
81c15526a787941b48b02ae8786782f9fb578801Christian MaederOWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
b891e9ad7dd358a7df24b59bf00d51515078497cChristian Maeder $(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
e39a1626bee36d6ad13a2c0014a80ef179a65bcbChristian MaederVSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
7868299829c1318b888152243ec2cea4f598b568Christian Maeder $(GENRULECALL) -x VSE.As.FoldRec -i CASL.ATC_CASL -o $@ $(VSE_files)
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian MaederOMDoc/ATC_OMDoc.der.hs: $(OMDoc_files) $(GENRULES)
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian Maeder $(GENRULECALL) -i OMDoc.ATerm -o $@ $(OMDoc_files)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############
82e29b77f0ef4cccd7ed734692c5e1e93dbbc645Christian Maeder### removes all *.o, *.hi and *.p_o files in all subdirectories
13731dfbb4b6a31b35dd210e832e920065b6ac45Christian Maeder find . -name \*.o -o -name \*.hi -o -name \*.p_o | xargs $(RM)
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder### remove binaries
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder### additionally removes the library files
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### clean user packages
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder $(HCPKG) unregister programatica --user || exit 0
d0279930f87bf39843e0bd2992a4789322662144Christian Maeder $(HCPKG) unregister hxt-filter --user || exit 0
d0279930f87bf39843e0bd2992a4789322662144Christian Maeder $(HCPKG) unregister tagsoup --user || exit 0
ba3a7a915740c57c9cb3d2bec46b919fcba12692Christian Maeder $(HCPKG) unregister Shellac-compatline --user || exit 0
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HCPKG) unregister Shellac-readline --user || exit 0
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HCPKG) unregister syb-generics --user || exit 0
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HCPKG) unregister Shellac --user || exit 0
d0279930f87bf39843e0bd2992a4789322662144Christian Maeder $(HCPKG) unregister dataenc --user || exit 0
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)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
e1559d046eb2c6dde0e6e272b37b6756eac0e8adChristian Maeder $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### test targets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### interactive
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### christian's target
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder### CASL parser
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder### Annos parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### CASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HasCASL parser
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski### Haskell analysis
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini### Haskell to Isabelle-HOLCF translation
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder### HasCASL to Haskell translation
e50e41135ece589f7202bd4ef8d6b97531c2a56eKlaus Luettich### 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
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder## Preparing the version of Hets
43b4c41fbb07705c9df321221ab9cb9832460407Christian MaederDriver/Version.hs: Driver/Version.in version_nr
d5d349836d8b1fa93ea49a59d977b106c6e9233bKlaus Luettich LANG=C $(PERL) utils/build_version.pl version_nr \
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
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich## two dependencies for avoidence of circular prerequisites
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus LuettichCASL_DEPENDENT_BINARIES= hets CASL/capa CASL/fromKif \
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich Common/annos Common/test_parser Comorphisms/test/showKP \
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
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
473bc1f3f3443f18e0ee83e4642fab42183470f2Christian Maeder -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for object and interface files
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for dependencies
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder## Rule to generate hs files from glade files. Needed for GTK
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder%.hs: %.glade utils/appendHaskellPreludeString \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich## generate the inline file for the predefined CASL_DL sign
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich echo " )" >> $@
5818d884784339c1b8aa6c6d972bad4eafd36ccbKlaus Luettich# Warning: Don't change the order of the depencies!!
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
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
fd2c22348e5a69231f92fb44e35a9970b47c4e93Christian Maeder# or `date +%F`
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder @echo " -> make"