Makefile revision 7165a916d2fa1bf87c4741ec63b253413eebbf69
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# Author: (c) Klaus Luettich, Christian Maeder, Uni Bremen 2002-2009
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# This Makefile will compile the 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)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian MaederDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
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
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
bab2d88d650448628730ed3b65c9f99c52500e8cChristian MaederGENRULECALL2 = $(GENRULES) -r Typeable -r ShATermLG \
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder -i Data.Typeable -i ATerm.Lib -i ATC.Grothendieck
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder ../$(SETUP) configure -O -p $(SETUPPREFIX) --user; \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder# list glade files
bab2d88d650448628730ed3b65c9f99c52500e8cChristian MaederGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
bab2d88d650448628730ed3b65c9f99c52500e8cChristian MaederGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder# the list of logics that need ShATermConvertible instances
014dc30f64ec25e4790cca987d4d1e6635430510Christian Maederlogics = CASL HasCASL Isabelle Modal Temporal CoCASL COL CspCASL CASL_DL \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich SoftFOL ConstraintCASL Propositional OWL RelationalScheme VSE OMDoc DFOL \
feca1d35123d8c31aee238c9ce79947b0bf65494Christian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
c8012b9719c73f08418af7a0b4ba28fa1d200631Christian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder Comorphisms/test/sublogicGraph.hs PGIP/ParseProofScript.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder SoftFOL/dfg.hs GUI/displayDependencyGraph.hs
23ffcc44ca8612feccbd8fda63fa5be7ab5f9dc3Christian Maeder### list of directories to run checks in
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
9e748851c150e1022fb952bab3315e869aaf0214Christian 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 \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/syntax property/AST property/transforms \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
2d130d212db7208777ca896a7ecad619a8944971Christian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
a42fbfe7becf0eae2d624123eb0db73a794593f0Christian Maederprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
b363eb04791e7f735633b9b4088502c2bc50ebfcChristian Maeder @if $(HCPKG) field programatica version; then \
a42fbfe7becf0eae2d624123eb0db73a794593f0Christian Maeder echo "of programatica package found"; else \
1cd4f6541984962658add5cfaa9f28a93879881bChristian Maeder -i `pwd`/Haskell/Programatica.patch || exit 0); \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder cp -f utils/programatica.cabal ../programatica/tools; \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
a9b59eb2ce961014974276cdae0e9df4419bd212Christian Maeder echo "{-# OPTIONS -w #-}" > $@
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(HC) --make -fno-monomorphism-restriction -O \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
4017ebc0f692820736d796af3110c3b3018c108aChristian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich## rule for appendHaskellPreludeString
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder## rule for ATC generation
e6d5dbbc3308f05197868806e0b860f4f53875f1Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder# unset this variable from var.mk because the programatica sources
8d178ae08a52d61379e6b8074f61646499bc88bbChristian Maeder# are needed to created our sources!
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder# end of programatica stuff
6cd33d6101fb1b93baa6d86fac158af18a115108Christian MaederTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederHC_WARN = -Wall -fno-warn-orphans $(NO_BIND_WARNING)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
0e5b095a19790411e5352fa7cf57cb0388e70472Christian Maeder# uncomment HC_PROF for profiling (and comment out packages in var.mk)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# call resulting binary with a final +RTS -p to get a file <binary>.prof
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
f1a913f880e409e7327b5deae95738b5448379a1Christian MaederHC_OPTS += $(HC_WARN) $(HC_INCLUDE) $(HC_PROF)
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder# -ddump-minimal-imports
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder# uncomment the above line to generate .imports files for displayDependencyGraph
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder# files generated by DriFT
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
328a85c807f2a95c3f147d10b05927eaf862ebebChristian Maeder RelationalScheme/AS.hs ATC/Grothendieck.hs \
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder# files to extract data types from to generate ShATermConvertible instances
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder Common/Consistency.hs Common/ProofTree.hs Static/DevGraph.hs \
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder Common/Id.hs Common/Result.hs Common/OrderedMap.hs \
d6697ad2479099b816203fd2c36f593c72c73c76Christian Maeder# files generated by genRules as input for DriFT
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maederatc_der_files = $(foreach file, $(atc_files), \
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# the rules to create ATC .der.hs file for DriFT
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederATC/OrderedMap.der.hs: Common/OrderedMap.hs $(GENRULES)
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederATC/Graph.der.hs: Common/Lib/Graph.hs $(GENRULES)
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(GENRULECALL) -i ATC.Id -i Common.ATerm.ConvInstances -o $@ $<
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian MaederATC/Consistency.der.hs: Common/Consistency.hs $(GENRULES)
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder $(GENRULECALL) -x Common.Consistency.ConservativityChecker -o $@ $<
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.Id -i Common.ATerm.ConvInstances -o $@ $<
54ea981a0503c396c2923a1c06421c6235baf27fChristian MaederATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder $(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $<
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian MaederATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder $(GENRULECALL2) -i ATC.AS_Structured -o $@ $<
254df6f22d01eacf7c57b85729e0445747b630d9Christian MaederATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL2) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
254df6f22d01eacf7c57b85729e0445747b630d9Christian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Result -o $@ $<
254df6f22d01eacf7c57b85729e0445747b630d9Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder -i ATC.AS_Annotation -i ATC.OrderedMap -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
ac34194a668399bb8ef238da77c3a09e93fb253bChristian Maeder $(GENRULECALL2) -i ATC.LibName -i ATC.Consistency \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# ATC files for every logic
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
986d3f255182539098a97ac86da9eeee5b7a72e3Christian MaederPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederTemporal_files = Temporal/AS_BASIC_Temporal.hs Temporal/Sign.hs \
31d6d9286988dc31639d105841296759aeb743e0Jonathan von SchroederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai CodescuCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von SchroederCOL_files = COL/AS_COL.hs COL/COLSign.hs
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von SchroederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder CspCASL/SignCSP.hs CspCASL/Morphism.hs
05a206508bc898f87fe6ab6e069814df3c29d303Dominik LueckeCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian MaederOWL_files = OWL/Sign.hs OWL/Sublogic.hs OWL/Morphism.hs
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiDFOL_files = DFOL/AS_DFOL.hs DFOL/Sign.hs DFOL/Morphism.hs DFOL/Symbol.hs
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederMaude_files = Maude/Sign.hs Maude/Morphism.hs Maude/Sentence.hs \
5afff1a0f62394414c33b06141175b3ab0b117a5Christian MaederExtModal_files = ExtModal/AS_ExtModal.hs ExtModal/ExtModalSign.hs \
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus LuettichCommonLogic_files = CommonLogic/AS_CommonLogic.hs CommonLogic/Sign.hs
e39a1626bee36d6ad13a2c0014a80ef179a65bcbChristian Maeder# ATC DrIFT-rule generation for logics
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
ea3bff3e547a1ac714d4db39c5efef95e02b2e7dChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
005e0f0c6b0cc898003b03801158c208f3071fc5Kristina SojakovaRelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederPropositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
76b9b2974795a6fb31f242fd032de3ff66df6204Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
878a5ecd6acf973907e25e5be6e4a792ea19a05eEwaryst SchulzIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
9a4b469ca0a7f44a598e551a973c75195207db58Eugen KuksaModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
48aa0645e25883048369afc02aac3f49b14a50daChristian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
01645eac73dbc789392674930adc5745c935f3a0Christian MaederTemporal/ATC_Temporal.der.hs: $(Temporal_files) $(GENRULES)
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Temporal_files)
1e622ddf5a057555db1924ddc88475c695c6f7f2Alexis TsogiasConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
b5da047a9a875dec3f968b6c0df96af326f90fa9Alexis Tsogias $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst SchulzCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
a604cbad8e2202147b5c6bb9f2e06ae61162d654Felix Gabriel Mance $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
bab2d88d650448628730ed3b65c9f99c52500e8cChristian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von SchroederOWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder $(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu $(GENRULECALL) -x VSE.As.FoldRec -i CASL.ATC_CASL -o $@ $(VSE_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederOMDoc/ATC_OMDoc.der.hs: $(OMDoc_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i OMDoc.ATerm -o $@ $(OMDoc_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederDFOL/ATC_DFOL.der.hs: $(DFOL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(DFOL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(LF_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederMaude/ATC_Maude.der.hs: $(Maude_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Maude_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederExtModal/ATC_ExtModal.der.hs: $(ExtModal_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ExtModal_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederCommonLogic/ATC_CommonLogic.der.hs: $(CommonLogic_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CommonLogic_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# all ATC .der.hs files for all logics
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# a rule to create all .der.hs files
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# the final ATC target files created by DriFT
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# files to be processed by utils/InlineAxioms
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederinline_axiom_files = Comorphisms/Modal2CASL.hs CASL_DL/PredefinedSign.hs
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# all sources that need to be created before ghc can be called
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder####################################################################
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova real_clean bin_clean package_clean distclean packages \
48aa0645e25883048369afc02aac3f49b14a50daChristian Maeder programatica_pkg aterm_pkg maintainer-clean annos \
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova check capa hacapa h2h h2hf showKP clean_genRules genRules \
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova count doc fromKif derivedSources release cgi ghci build
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
c2e192ace9ef7cfb0e59563f1b24477b2b65cff3Dominik Dietrichaterm_sources = $(wildcard atermlib/src/ATerm/*.hs)
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder echo "of aterm package found"; else \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder @echo 'File : Maintainer' > $@
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski @echo " done"
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# count lines of code
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# Documentation via haddock
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederHADDOCK_OPTS = $(addprefix --optghc=, $(HC_OPTS))
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski -t 'Hets - the Heterogeneous Tool Set' \
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettich -p Hets-Haddock-Prologue.txt $(HADDOCK_OPTS) \
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder Syntax/ADoc.hs $(filter-out Test.hs, $(wildcard *.hs)) \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# "-package hssource" for ghc-5.04.2
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettichutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich# release management
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder if [ -d ../uni ] ; then ln -s ../uni uni ; fi
0a5571c8adeddd27548445546491725beb224dddChristian Maeder if [ -d ../programatica ] ; then \
0a5571c8adeddd27548445546491725beb224dddChristian Maeder ln -s ../../programatica/tools programatica/tools ; fi
0a5571c8adeddd27548445546491725beb224dddChristian Maeder (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maeder find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
a545f813d2f8006ef79617e4fedc841d89195e2dChristian Maederutils/genItCorrections: $(GENITCORRECTIONS_deps)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
e05fd774e0181e93963d4302303b20698603a505Christian Maeder @echo -n "Generating pretty/LaTeX_maps.hs ... "
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder gen_it_characters gen_it_words >> LaTeX_maps.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder @echo "ready"
e05fd774e0181e93963d4302303b20698603a505Christian Maeder @echo "please copy the file manually to Common"
483333cb1e873b6d55f5ef0bfbf061861f0493abChristian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder### removes all *.o, *.hi and *.p_o files in all subdirectories
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder find . -name \*.o -o -name \*.hi -o -name \*.p_o \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder -o -name \*.exe -o -name \*.exe.manifest | xargs $(RM)
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder### remove binaries
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### additionally removes the library files
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### clean user packages
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich $(HCPKG) unregister programatica --user || exit 0
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### additionally removes generated files not in the CVS tree
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
810746aea00b81c1eec27dae84d73a43599ff056Christian Maeder $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
1365c420ef71be3d52796ebd369dc2defdedc822Christian Maeder $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
82e29b77f0ef4cccd7ed734692c5e1e93dbbc645Christian Maeder### interactive
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### build only, don't link
d0652648f9879c67a194f8b03baafe2700c68eb4Christian Maeder### Kif parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Annos parser
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### CASL parser
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder### HasCASL parser
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### Haskell analysis
1365c420ef71be3d52796ebd369dc2defdedc822Christian Maeder### Haskell to Isabelle-HOLCF translation
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus LuettichHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder### HasCASL to Haskell translation
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder### test program to check the known provers
c5e3fc166373b0d90f6e36e8aa234396a1dcd879Christian Maeder### run tests in other directories
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder## Preparing the version of Hets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederDriver/Version.hs: Driver/Version.in version_nr
e1559d046eb2c6dde0e6e272b37b6756eac0e8adChristian Maeder LANG=C $(PERL) utils/build_version.pl version_nr \
5580ab3e64410186ccd36cde8a94282d8757ac0dChristian Maeder## two hardcoded dependencies for a correct generation of Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder## two dependencies to avoid circular prerequisites
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederCASL_DEPENDENT_BINARIES = hets CASL/capa CASL/fromKif \
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder Common/annos Common/test_parser Comorphisms/test/showKP \
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder$(CASL_DEPENDENT_BINARIES): $(derived_sources)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## suffix rules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for GHC
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini## rule for HAPPY
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder echo "{-# OPTIONS -w #-}" > $@
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder## rule for DrIFT
e50e41135ece589f7202bd4ef8d6b97531c2a56eKlaus Luettich ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for inlineAxioms
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder## rule for cpp and haddock
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for object and interface files
e112e83352048f3db8c8f93ae104193e7338c10fChristian Maeder## compiling rules for dependencies
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder## Rule to generate hs files from glade files. Needed for GTK
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder%.hs: %.glade utils/appendHaskellPreludeString \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder## generate the inline file for the predefined CASL_DL sign
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder echo " )" >> $@
7767474aba4fa2dc51a6c68017d3bcef3b773001Christian Maeder# Warning: Don't change the order of the depencies!!
88318aafc287e92931dceffbb943d58a9310001dChristian MaederCASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski# uses intransparently utils/outlineAxioms
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# directory for installers
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# or `date +%F`
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# prepare installer creation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder @echo " -> make"
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder# check out java parts for OWL