Makefile revision 4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62
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
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
ef9e8535c168d3f774d9e74368a2317a9eda5826Christian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENRULECALL2 = $(GENRULES) -r Typeable -r ShATermLG \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -i Data.Typeable -i ATerm.Lib -i ATC.Grothendieck
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroederifneq ($(findstring SunOS, $(OSBYUNAME)),)
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
308834907a120fd8771e18292ed2ca9cd767c12dChristian Maeder# list glade files
bab2d88d650448628730ed3b65c9f99c52500e8cChristian MaederGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
1f9274bb2aa44ea236327814dce99946be52e348Felix Gabriel ManceGTK_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 \
6aea82c63ba1d2efc0329bc784a14e521469ec20Christian Maeder LF Framework Maude ExtModal CommonLogic CSL QBF Adl
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 \
f5c0884429b01e74c6e658ded921fb2e16dfb478Christian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs \
db675e8302ddb0d6528088ce68f5e98a00e890e3Christian Maeder SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder Comorphisms/test/sublogicGraph.hs PGIP/ParseProofScript.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder Common/testxupdate.hs Common/testxpath.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder SoftFOL/dfg.hs Adl/adl.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 \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maeder base/transforms base/transforms/Deriving property \
dc679edd4ca027663212afdf00926ae2ce19b555Christian Maeder property/syntax property/AST property/transforms \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/TI property/defs property/parse2 property/parse2/Parser
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettichprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder @if $(HCPKG) field programatica version; then \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder echo "of programatica package found"; else \
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder -i `pwd`/Haskell/Programatica.patch || exit 0); \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder cp -f utils/programatica.cabal $(PFE_TOOLDIR); \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder echo "{-# OPTIONS -w #-}" > $@
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -fno-monomorphism-restriction -O \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
eb74267cf39e4e95f9eeb5c765f4c8dac33971b4Christian Maeder## rule for appendHaskellPreludeString
e4f4d096e5e6d60dd91c746d0e833d0ac7a29c50Christian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
7d0ee72ee91ec305408688b969c43f07b9667c80Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
7d0ee72ee91ec305408688b969c43f07b9667c80Christian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder## rule for ATC generation
f1a913f880e409e7327b5deae95738b5448379a1Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
14c56dc499da4bbeaeebeb558ceb755150ae341cChristian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder# unset this variable from var.mk because the programatica sources
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder# are needed to created our sources!
06dd4e7c29f33f6122a910719e3bd9062256e397Andy Gimblett# end of programatica stuff
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian MaederTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_WARN = -Wall -fno-warn-orphans $(NO_BIND_WARNING)
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
3554301a34639efb6c9961a8571775d0061284c9Christian Maeder# uncomment HC_PROF for profiling (and comment out packages in var.mk)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# call resulting binary with a final +RTS -p to get a file <binary>.prof
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_OPTS += $(HC_WARN) $(HC_INCLUDE) $(HC_PROF)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# -ddump-minimal-imports
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# uncomment the above line to generate .imports files for displayDependencyGraph
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder# files generated by DriFT
3554301a34639efb6c9961a8571775d0061284c9Christian Maeder Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder RelationalScheme/AS.hs ATC/Grothendieck.hs \
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder ExtModal/AS_ExtModal.hs QBF/AS_BASIC_QBF.hs \
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder# files to extract data types from to generate ShATermConvertible instances
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
3554301a34639efb6c9961a8571775d0061284c9Christian Maeder Common/Consistency.hs Common/ProofTree.hs Static/DevGraph.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/Id.hs Common/Result.hs Common/OrderedMap.hs \
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder# files generated by genRules as input for DriFT
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maederatc_der_files = $(foreach file, $(atc_files), \
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder# the rules to create ATC .der.hs file for DriFT
819e29dba060687cf391e444e0f6ff88c1908cc3Christian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
254df6f22d01eacf7c57b85729e0445747b630d9Christian MaederATC/OrderedMap.der.hs: Common/OrderedMap.hs $(GENRULES)
254df6f22d01eacf7c57b85729e0445747b630d9Christian MaederATC/Graph.der.hs: Common/Lib/Graph.hs $(GENRULES)
254df6f22d01eacf7c57b85729e0445747b630d9Christian MaederATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -i ATC.Id -i Common.ATerm.ConvInstances -o $@ $<
ac34194a668399bb8ef238da77c3a09e93fb253bChristian MaederATC/Consistency.der.hs: Common/Consistency.hs $(GENRULES)
4fc9de0da898448f1d3597ebbd8c04a066464c21Christian Maeder $(GENRULECALL) -x Common.Consistency.ConservativityChecker -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
c208973c890b8f993297720fd0247bc7481d4304Christian Maeder $(GENRULECALL) -i ATC.Id -i Common.ATerm.ConvInstances -o $@ $<
c208973c890b8f993297720fd0247bc7481d4304Christian MaederATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian Maeder $(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $<
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian MaederATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
986d3f255182539098a97ac86da9eeee5b7a72e3Christian MaederATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL2) -i ATC.AS_Structured -o $@ $<
01e278bdd7dce13b9303ed3d79683d83c89d09f9Liam O'ReillyATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL2) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Result -o $@ $<
31d6d9286988dc31639d105841296759aeb743e0Jonathan von Schroeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder -i ATC.AS_Annotation -i ATC.OrderedMap -o $@ $<
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von SchroederATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder $(GENRULECALL2) -i ATC.LibName -i ATC.Consistency \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# ATC files for every logic
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederQBF_files = Propositional/Sign.hs QBF/Morphism.hs \
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian MaederRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
dd6f22b9dcff2695181b86372e4df03d5b96e92dKristina SojakovaModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
005e0f0c6b0cc898003b03801158c208f3071fc5Kristina SojakovaTemporal_files = Temporal/AS_BASIC_Temporal.hs Temporal/Sign.hs \
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
8a78868bae2ec6838c87366c35c57e109154c51eChristian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
c2e192ace9ef7cfb0e59563f1b24477b2b65cff3Dominik DietrichCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
9a4b469ca0a7f44a598e551a973c75195207db58Eugen KuksaOWL_files = OWL/Sign.hs OWL/Sublogic.hs OWL/Morphism.hs
01645eac73dbc789392674930adc5745c935f3a0Christian MaederDFOL_files = DFOL/AS_DFOL.hs DFOL/Sign.hs DFOL/Morphism.hs DFOL/Symbol.hs
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian MaederLF_files = LF/Sign.hs LF/Morphism.hs LF/AS.hs
b5da047a9a875dec3f968b6c0df96af326f90fa9Alexis TsogiasMaude_files = Maude/Sign.hs Maude/Morphism.hs Maude/Sentence.hs \
a604cbad8e2202147b5c6bb9f2e06ae61162d654Felix Gabriel ManceExtModal_files = ExtModal/AS_ExtModal.hs ExtModal/ExtModalSign.hs \
7834a982096d93301a4626f444dd9ea5f9fe17eaChristian MaederCSL_files = CSL/Sign.hs CSL/Morphism.hs CSL/AS_BASIC_CSL.hs CSL/Symbol.hs
1f9274bb2aa44ea236327814dce99946be52e348Felix Gabriel ManceCommonLogic_files = CommonLogic/AS_CommonLogic.hs CommonLogic/Sign.hs \
bab2d88d650448628730ed3b65c9f99c52500e8cChristian Maeder CommonLogic/Symbol.hs CommonLogic/Morphism.hs
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# ATC DrIFT-rule generation for logics
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederRelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von SchroederPropositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(QBF_files)
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai CodescuHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederTemporal/ATC_Temporal.der.hs: $(Temporal_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Temporal_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian 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)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederOWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederVSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(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)
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(DFOL_files)
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(LF_files)
79834070d6d3c63a098e570b12fa3405c607dc70Kristina SojakovaFramework/ATC_Framework.der.hs: $(Framework_files) $(GENRULES)
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Framework_files)
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederMaude/ATC_Maude.der.hs: $(Maude_files) $(GENRULES)
8a78868bae2ec6838c87366c35c57e109154c51eChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Maude_files)
8a78868bae2ec6838c87366c35c57e109154c51eChristian MaederExtModal/ATC_ExtModal.der.hs: $(ExtModal_files) $(GENRULES)
624e6701e0deb7ac6c03c0cba0190fbc5033cf93Ewaryst Schulz $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ExtModal_files)
c2e192ace9ef7cfb0e59563f1b24477b2b65cff3Dominik DietrichCSL/ATC_CSL.der.hs: $(CSL_files) $(GENRULES)
7165a916d2fa1bf87c4741ec63b253413eebbf69Karl Luc $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CSL_files)
7165a916d2fa1bf87c4741ec63b253413eebbf69Karl LucCommonLogic/ATC_CommonLogic.der.hs: $(CommonLogic_files) $(GENRULES)
01645eac73dbc789392674930adc5745c935f3a0Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CommonLogic_files)
01645eac73dbc789392674930adc5745c935f3a0Christian MaederAdl/ATC_Adl.der.hs: $(Adl_files) $(GENRULES)
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Adl_files)
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder# all ATC .der.hs files for all logics
b5da047a9a875dec3f968b6c0df96af326f90fa9Alexis Tsogiasatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
b5da047a9a875dec3f968b6c0df96af326f90fa9Alexis Tsogiasgenerated_rule_files = $(atc_der_files) $(atc_logic_files)
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst Schulz# a rule to create all .der.hs files
18d370f8341357f5d6a4068f4bb6981173ece70fFelix Gabriel Mance# the final ATC target files created by DriFT
7834a982096d93301a4626f444dd9ea5f9fe17eaChristian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
ed1b8e97e72b2e3e92edaf2eb22a4b5373d705f1Felix Gabriel Mance# files to be processed by utils/InlineAxioms
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst Schulzinline_axiom_files = Comorphisms/Modal2CASL.hs CASL_DL/PredefinedSign.hs
c70ef4c3b3a62764f715510c9fd67dde3acfe454Christian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# all sources that need to be created before ghc can be called
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder real_clean bin_clean package_clean distclean packages \
cc07a598b995acc9436651e66fd18009509047efChristian Maeder programatica_pkg aterm_pkg maintainer-clean annos \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder check capa hacapa h2h h2hf showKP clean_genRules genRules \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder count doc fromKif derivedSources release cgi ghci build
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
f5c9b1e739228c2a2edf055ac419583412569683Christian Maederaterm_sources = $(wildcard atermlib/src/ATerm/*.hs)
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder echo "of aterm package found"; else \
0a5571c8adeddd27548445546491725beb224dddChristian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
e112e83352048f3db8c8f93ae104193e7338c10fChristian Maeder# Documentation via haddock
e642ad0e782f9bb9ba310164358220402eec8cd8Christian MaederHADDOCK_OPTS = $(addprefix --optghc=, $(HC_OPTS))
e112e83352048f3db8c8f93ae104193e7338c10fChristian Maeder -t 'Hets - the Heterogeneous Tool Set' \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder -p Hets-Haddock-Prologue.txt $(HADDOCK_OPTS) \
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maeder Syntax/ADoc.hs $(filter-out Test.hs, $(wildcard *.hs)) \
825a1e4ca1e768de4b4883c65a6cb1dce6aa0002Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT)
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder$(GENRULES): $(DRIFT) $(GENERATERULES_deps)
3dde4051c307b609159a097f08a05108fdd036efJonathan von Schroeder $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder# "-package hssource" for ghc-5.04.2
e05fd774e0181e93963d4302303b20698603a505Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
1dfba1f850f6a43094962b459998d1ea11472461Christian Maederutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder# release management
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
cd36bffee51c77cdadcb9f916b34fa512e311946Christian Maeder find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
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
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich @echo -n "Generating pretty/LaTeX_maps.hs ... "
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus 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"
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) \
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich### removes all *.o, *.hi and *.p_o files in all subdirectories
5f0e3e4cb7dd31033c9682cafa712d2a66b2f3bcChristian Maeder find . -name \*.o -o -name \*.hi -o -name \*.p_o \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -o -name \*.exe -o -name \*.exe.manifest | xargs $(RM)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### remove binaries
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder $(RM) test/*/*.{thy,pp.het,pp.tex,th,dfg.c,xml,log,dvi,aux,sty}
1365c420ef71be3d52796ebd369dc2defdedc822Christian Maeder $(RM) doc/UserGuide.{log,aux,bbl,blg,out,pdf}
308834907a120fd8771e18292ed2ca9cd767c12dChristian Maeder### additionally removes the library files
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich### clean user packages
e420b3848a0e15a9e074b08c413996cbeb5ab06dChristian Maeder $(HCPKG) unregister programatica --user || exit 0
cc07a598b995acc9436651e66fd18009509047efChristian Maeder### additionally removes generated files not in the CVS tree
825a1e4ca1e768de4b4883c65a6cb1dce6aa0002Christian Maeder $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) CASL_DL/PredefinedSign.inline.hs CASL_DL/PredDatatypes.het
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
b446bf54c1dc78690aa12e86aadc49cdd8585847Christian Maeder### interactive
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder### build only, don't link
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder### Kif parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Annos parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### CASL parser
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski### HasCASL parser
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini### Haskell analysis
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder### Haskell to Isabelle-HOLCF translation
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HasCASL to Haskell translation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### test program to check the known provers
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### run tests in other directories
d5d349836d8b1fa93ea49a59d977b106c6e9233bKlaus Luettich for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder## Preparing the version of Hets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederDriver/Version.hs: Driver/Version.in version_nr
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder LANG=C $(PERL) utils/build_version.pl version_nr \
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maeder## two hardcoded dependencies for a correct generation of Version.hs
e112e83352048f3db8c8f93ae104193e7338c10fChristian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder## two dependencies to avoid circular prerequisites
e112e83352048f3db8c8f93ae104193e7338c10fChristian MaederCASL_DEPENDENT_BINARIES = hets CASL/capa CASL/fromKif \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder Common/annos Common/test_parser Comorphisms/test/showKP \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder$(CASL_DEPENDENT_BINARIES): $(derived_sources)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder## suffix rules
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder## rule for GHC
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for HAPPY
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich echo "{-# OPTIONS -w #-}" > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for DrIFT
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for inlineAxioms
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder## rule for cpp and haddock
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder## compiling rules for object and interface files
89c9d707aa817684b88036a2dad66c3437840677Heng Jiang## compiling rules for dependencies
bea81dabd203833818cb4a5f3758977c695728cdHeng Jiang## Rule to generate hs files from glade files. Needed for GTK
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke%.hs: %.glade utils/appendHaskellPreludeString \
7834a982096d93301a4626f444dd9ea5f9fe17eaChristian Maeder cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
f9442174f64331ccf0bf08178632af7302ccfc96Christian Maeder## generate the inline file for the predefined CASL_DL sign
c802a1041ed9251f8ad79139454267e802900e2aChristian Maeder CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke echo " )" >> $@
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke# Warning: Don't change the order of the depencies!!
75b0c0c2cbfb7edd3f4c0555227aabbe6c1aa195Christian MaederCASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu# uses intransparently utils/outlineAxioms
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae BungiuModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu utils/genTransMFormFunc.pl $(INLINEAXIOMS)
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu $(PERL) utils/genTransMFormFunc.pl $< $@
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu# directory for installers
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu# prepare installer creation
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu @echo " -> make"
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu# check out java parts for OWL