Makefile revision 124c859ba4741d5e36d5d98634886b430b7af093
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# Author: (c) Klaus Luettich, Christian Maeder, Uni Bremen 2002-2005
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# This Makefile will compile the new hets system and provides also
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# targets for test programs during implementation phases.
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# !!! Note: This makefile is written for GNU make !!!
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# (gmake on solaris)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## Some varibles, which control the compilation
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian MaederHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
ef9e8535c168d3f774d9e74368a2317a9eda5826Christian Maeder CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
bab2d88d650448628730ed3b65c9f99c52500e8cChristian Maeder Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder VSE Interfaces Temporal CspCASLProver DFOL CMDL
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
308834907a120fd8771e18292ed2ca9cd767c12dChristian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian MaederHADDOCKVERSION = $(shell $(HADDOCK) --version)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ../$(SETUP) configure $(SETUPPREFIX) --user; \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ../$(SETUP) build; ../$(SETUP) install --user
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# list glade files
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian MaederGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederlogics = CASL HasCASL Isabelle Modal Temporal CoCASL COL CspCASL CASL_DL \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder SoftFOL ConstraintCASL Propositional OWL RelationalScheme VSE OMDoc DFOL
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
b568982efd0997d877286faa592d81b03c8c67b8Christian Maeder ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### list of directories to run checks in
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maederhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian 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 \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder base/transforms base/transforms/Deriving property \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder property/syntax property/AST property/transforms \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/TI property/defs property/parse2 property/parse2/Parser
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
e6d5dbbc3308f05197868806e0b860f4f53875f1Christian Maederprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
e4f4d096e5e6d60dd91c746d0e833d0ac7a29c50Christian Maeder @if $(HCPKG) field programatica version; then \
eb74267cf39e4e95f9eeb5c765f4c8dac33971b4Christian Maeder echo "of programatica package found"; else \
e4f4d096e5e6d60dd91c746d0e833d0ac7a29c50Christian Maeder -i `pwd`/Haskell/Programatica.patch || exit 0); \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder cp -f utils/programatica.cabal ../programatica/tools; \
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
6cd33d6101fb1b93baa6d86fac158af18a115108Christian Maeder echo "{-# OPTIONS -w #-}" > $@
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
b2ac5a92cf36382e8deea5661c1964566caf72b3Christian Maeder $(HC) --make -fno-monomorphism-restriction -O \
7d0ee72ee91ec305408688b969c43f07b9667c80Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
f1a913f880e409e7327b5deae95738b5448379a1Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
f1a913f880e409e7327b5deae95738b5448379a1Christian Maeder## rule for appendHaskellPreludeString
14c56dc499da4bbeaeebeb558ceb755150ae341cChristian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
06dd4e7c29f33f6122a910719e3bd9062256e397Andy Gimblett#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
140287998aa8592c9c403bd9e308e447ba92ae11Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
c208973c890b8f993297720fd0247bc7481d4304Christian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder## rule for ATC generation
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder# INCLUDE_PATH =
aded505f9b42cc38975559c2a5d175ae95de436bChristian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
aded505f9b42cc38975559c2a5d175ae95de436bChristian Maeder# uncomment for profiling (and comment out packages in var.mk)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder# call resulting binary with a final +RTS -p to get a file <binary>.prof
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian MaederHC_OPTS += $(HC_WARN) $(HC_INCLUDE) $(HC_PROF)
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder# -ddump-minimal-imports
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# uncomment to above line to generate .imports files for displayDependencyGraph
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder####################################################################
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maeder## sources for hets
54ea981a0503c396c2923a1c06421c6235baf27fChristian Maedernon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maedersources = hets.hs $(filter-out $(non_sources), \
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
254df6f22d01eacf7c57b85729e0445747b630d9Christian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_der_files = $(foreach file, $(atc_files), \
ac34194a668399bb8ef238da77c3a09e93fb253bChristian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
c208973c890b8f993297720fd0247bc7481d4304Christian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian MaederATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
0d0278c34a374b29c2d6c58b39b8b56e283d48e8Christian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian MaederATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik LueckeATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai Codescu $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
1535e1d8c82db5f7e2402261983c4c2ef39f4f39Mihai CodescuATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von SchroederATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
7a3fe82695aa32657693e05712f84d7f81672f2eJonathan von Schroeder $(GENRULECALL) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
05a206508bc898f87fe6ab6e069814df3c29d303Dominik LueckeATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
d54cd08a4cfa26256c38d8ed12c343adbfe1a0e3Christian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder $(GENRULECALL) -i ATC.LibName -i ATC.Grothendieck -o $@ $<
5afff1a0f62394414c33b06141175b3ab0b117a5Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
1b3a2f98d1cd01fc9e0591f69507e20526727559Dominik LueckeHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian MaederPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
ea3bff3e547a1ac714d4db39c5efef95e02b2e7dChristian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
abf2487c3aece95c371ea89ac64319370dcb6483Klaus LuettichRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian MaederTemporal_files = Temporal/AS_BASIC_Temporal.hs Temporal/Sign.hs \
8a78868bae2ec6838c87366c35c57e109154c51eChristian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
878a5ecd6acf973907e25e5be6e4a792ea19a05eEwaryst SchulzCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
6b75c206b317eb30a08d88a8f27e0295ffeb1546Christian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
01645eac73dbc789392674930adc5745c935f3a0Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
b5da047a9a875dec3f968b6c0df96af326f90fa9Alexis TsogiasDFOL_files = DFOL/AS_DFOL.hs DFOL/Sign.hs DFOL/Morphism.hs DFOL/Symbol.hs
0a03acf9fa28e6ff00f4d7c9c6acbae64cf09c56Ewaryst Schulzatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
308834907a120fd8771e18292ed2ca9cd767c12dChristian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
7834a982096d93301a4626f444dd9ea5f9fe17eaChristian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
734257b9ea9fcaa18d4e3627f54f5295a99aa1f7Felix Gabriel Manceinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
bab2d88d650448628730ed3b65c9f99c52500e8cChristian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# sources that have {-# OPTIONS -cpp #-}
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# unused, remove when header files are gone
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maedernondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(genrule_header_files) $(generated_rule_files) \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(patsubst %.hs, %.der.hs, $(drifted_files))
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# this variable holds the modules that should be documented
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
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 base64_pkg http_pkg syb_pkg shellac_pkg shread_pkg shcompat_pkg \
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina Sojakova tagsoup_pkg hxt_pkg hxtfilter_pkg haifa_pkg programatica_pkg \
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova check capa hacapa h2h h2hf showKP clean_genRules genRules \
79834070d6d3c63a098e570b12fa3405c607dc70Kristina Sojakova count doc apache_doc post_doc4apache fromKif \
23b4e542dca35852f58d1fb3f7d9078c1de5ab06Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
7165a916d2fa1bf87c4741ec63b253413eebbf69Karl Luc echo "of syb-generics package found"; else \
bff4b3f816be4c1e1d8ded76f1d5af786839e1a9Christian Maeder echo "of HAIFA package found"; else \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo 'File : Maintainer' > $@
b446bf54c1dc78690aa12e86aadc49cdd8585847Christian Maeder @echo " done"
f5c9b1e739228c2a2edf055ac419583412569683Christian Maeder###############################
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder### count lines of code
f5c9b1e739228c2a2edf055ac419583412569683Christian Maeder###############################
f5c9b1e739228c2a2edf055ac419583412569683Christian Maeder### Documentation via haddock
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian MaederHADDOCK_OPTS = $(addprefix --optghc=, $(HC_OPTS))
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder -t 'Hets - the Heterogeneous Tool Set' \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder -p Hets-Haddock-Prologue.txt $(HADDOCK_OPTS) \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder Syntax/ADoc.hs $(filter-out Test.hs, $(wildcard *.hs))
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich# generate haddock documentation with links to sources
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder# the interface treatment is stolen from uni/mk/suffix.mk
a883cd4d01fe39d23219cf5333425f195be24d8bChristian Maeder cp -r -L ../uni/www docs/www || mkdir docs/www
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich HINTERFACES0=`find -L docs/www -name '*.haddock' \
0a5571c8adeddd27548445546491725beb224dddChristian Maeder $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
0a5571c8adeddd27548445546491725beb224dddChristian Maeder -t 'Hets - the Heterogeneous Tool Set' \
0a5571c8adeddd27548445546491725beb224dddChristian Maeder -p Hets-Haddock-Prologue.txt $(doc_sources)
f38b3687c5558128515e34fb85d8b466d22dc300Christian Maeder# sources are not copied here
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder### release management
1dfba1f850f6a43094962b459998d1ea11472461Christian MaederderivedSources: $(derived_sources) $(hspp_sources)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT)
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
c59d1c38ef94b4fb1c8d9fda9573bc1e1d2801e7Christian Maeder# "-package hssource" for ghc-5.04.2
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich if [ -d ../uni ] ; then ln -s ../uni uni ; fi
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich if [ -d ../programatica ] ; then \
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder ln -s ../../programatica/tools programatica/tools ; fi
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
1365c420ef71be3d52796ebd369dc2defdedc822Christian Maeder find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
5f0e3e4cb7dd31033c9682cafa712d2a66b2f3bcChristian Maederpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
5f0e3e4cb7dd31033c9682cafa712d2a66b2f3bcChristian Maeder ## TODO: add more dependencies and use hets-opt
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder# compile $< -b . -k web -o $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederutils/genItCorrections: $(GENITCORRECTIONS_deps)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder @echo -n "Generating pretty/LaTeX_maps.hs ... "
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian Maeder gen_it_characters gen_it_words >> LaTeX_maps.hs)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich @echo "ready"
1365c420ef71be3d52796ebd369dc2defdedc822Christian Maeder @echo "please copy the file manually to Common"
308834907a120fd8771e18292ed2ca9cd767c12dChristian Maeder#############################
1365c420ef71be3d52796ebd369dc2defdedc822Christian Maeder### ATC DrIFT-rule generation
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
cc07a598b995acc9436651e66fd18009509047efChristian MaederRelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
cc07a598b995acc9436651e66fd18009509047efChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
4ba08bfca0cc8d9da65397b8dfd2654fdb4c0e62Christian MaederPropositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
e1559d046eb2c6dde0e6e272b37b6756eac0e8adChristian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
e284004f10a315dbdb624c8b2522f65d485eaa48Martin KühlModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
b446bf54c1dc78690aa12e86aadc49cdd8585847Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
e284004f10a315dbdb624c8b2522f65d485eaa48Martin KühlTemporal/ATC_Temporal.der.hs: $(Temporal_files) $(GENRULES)
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Temporal_files)
50515239e7e190f4a34ca581dd685d002148fbddChristian MaederConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
0b349288edfa50fdf38fda1a14e1562d03f92574Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till MossakowskiCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo TorriniSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian MaederOWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian MaederVSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(GENRULECALL) -x VSE.As.FoldRec -i CASL.ATC_CASL -o $@ $(VSE_files)
47b0e9f3cb008cb7997f4e3bae26e4d62dcc887aChristian MaederOMDoc/ATC_OMDoc.der.hs: $(OMDoc_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i OMDoc.ATerm -o $@ $(OMDoc_files)
431d34c7007a787331c4e5ec997badb0f8190fc7Christian MaederDFOL/ATC_DFOL.der.hs: $(DFOL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(DFOL_files)
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
d5d349836d8b1fa93ea49a59d977b106c6e9233bKlaus Luettich###############
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### removes all *.o, *.hi and *.p_o files in all subdirectories
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maeder find . -name \*.o -o -name \*.hi -o -name \*.p_o \
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maeder -o -name \*.exe -o -name \*.exe.manifest | xargs $(RM)
e112e83352048f3db8c8f93ae104193e7338c10fChristian Maeder### remove binaries
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
f5c9b1e739228c2a2edf055ac419583412569683Christian Maeder### additionally removes the library files
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder### clean user packages
7767474aba4fa2dc51a6c68017d3bcef3b773001Christian Maeder $(HCPKG) unregister programatica --user || exit 0
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder $(HCPKG) unregister syb-generics --user || exit 0
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### additionally removes generated files not in the CVS tree
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### test targets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder### interactive
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder### christian's target
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder### CASL parser
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder### Annos parser
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder### CASL parser
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder### HasCASL parser
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder### Haskell analysis
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder### Haskell to Isabelle-HOLCF translation
bea81dabd203833818cb4a5f3758977c695728cdHeng JiangHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
7834a982096d93301a4626f444dd9ea5f9fe17eaChristian Maeder### HasCASL to Haskell translation
f9442174f64331ccf0bf08178632af7302ccfc96Christian Maeder### test program to check the known provers
53bbc1c9a4e986d1ee9c081d6f0ac7b9546f212bDominik Luecke### run tests in other directories
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke####################################################################
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke## Preparing the version of Hets
bf7b17b0e19362e9228672782218678cab275d1eDominik LueckeDriver/Version.hs: Driver/Version.in version_nr
75b0c0c2cbfb7edd3f4c0555227aabbe6c1aa195Christian Maeder LANG=C $(PERL) utils/build_version.pl version_nr \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## two hardcoded dependencies for a correct generation of Version.hs
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae BungiuDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## two dependencies for avoidence of circular prerequisites
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae BungiuCASL_DEPENDENT_BINARIES= hets CASL/capa CASL/fromKif \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu Common/annos Common/test_parser Comorphisms/test/showKP \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu# CASL_DL/Logic.hs: CASL_DL/PredefinedSign.hs
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu####################################################################
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## rules for DrIFT
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu echo "{-# OPTIONS -w #-}" > $@
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## rules for inlineAxioms
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## rule for cpp and haddock
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## compiling rules for object and interface files
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## compiling rules for dependencies
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu## Rule to generate hs files from glade files. Needed for GTK
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu%.hs: %.glade utils/appendHaskellPreludeString \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
ae3e4689adbf4de67f4e1cdda6db2c0e406027d0Francisc Nicolae Bungiu utils/appendHaskellPreludeString $< > $@
3b5814dc6ac813faf8a12ecddf4b727ca7b666a8Francisc Nicolae Bungiu## generate the inline file for the predefined CASL_DL sign
e7cf29d9f71f4724aed05916d93a0b656d7104e6Francisc Nicolae Bungiu CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
$(RM) $@
$(RM) $@
$(PERL) $+ > $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
$(RM) $@
@echo Please do