Makefile revision 36f63902db2b3463faa9f59912ad106e2d5aaa24
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# This Makefile will compile the new hets system and provides also
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# targets for test programs during implementation phases.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# !!! Note: This makefile is written for GNU make !!!
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# (gmake on solaris)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## Some varibles, which control the compilation
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederHXT_PATHS = Data Data/Tree Data/Tree/NTree Data/Digest Text Text/XML \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Text/XML/HXT Text/XML/HXT/IO Text/XML/HXT/DOM Text/XML/HXT/Arrow \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Text/XML/HXT/XPath Text/XML/HXT/Validator Text/XML/HXT/Parser \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Text/XML/HXT/RelaxNG Text/XML/HXT/ProtocolHandler Codec Codec/ASN1 \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder Codec/Binary Codec/Encryption Codec/Encryption/RSA System Control \
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowski utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CspCASL ATC Proofs Comorphisms Isabelle Driver \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Taxonomy CASL_DL SPASS OWL_DL OMDoc $(PFE_PATHS) \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder## set ghc imports properly for your system
8410667510a76409aca9bb24ff0eda0420088274Christian MaederGHC_IMPORTS = `$(HC) --print-libdir`/imports
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# import directories for ghc-5.04.2
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder# override on commandline for other architectures
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
d4892fa7401ceef014ea59d2d900773eaf88fcbdChristian MaederINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/Lib/Pretty.hs Common/Keywords.hs Common/Lib/Set.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/Lib/Map.hs Common/Lib/Rel.hs Common/Lib/State.hs Common/Id.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs CASL/ShowMixfix.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder CASL/Utils.hs Common/Lexer.hs Common/Token.hs Common/Anno_Parser.hs \
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich Common/GlobalAnnotations.hs Common/PrettyPrint.hs Common/Partial.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/Print_AS_Annotation.hs Common/PPUtils.hs CASL/LiteralFuns.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CASL/Print_AS_Basic.hs Common/AnnoState.hs CASL/Formula.hs \
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian Maeder CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/ConvertLiteral.hs Common/Earley.hs CASL/MixfixParser.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder CASL/Parse_AS_Basic.hs CASL/Sign.hs CASL/Overload.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CASL/StaticAna.hs Modal/AS_Modal.hs Modal/Parse_AS.hs \
e593b89bfd4952698dc37feced21cefe869d87a2Christian Maeder Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maeder -fallow-overlapping-instances -fallow-undecidable-instances
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# -ddump-minimal-imports
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# flags also come in via ../uni/uni-package.conf
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# but added it here in case of compilation without uni
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS OWL_DL ConstraintCASL
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederTESTTARGETS += test_parser hetpa hetana Test.o wrap isa fromKif \
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# some modules from uni for haddock
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder# if uni/server is included also HaXml sources are needed
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ../uni/reactor ../uni/util ../uni/posixutil
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederTESTTARGETS += hetdg OWL_DL/readAStest taxonomy
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### list of directories to run checks in
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder base/transforms base/transforms/Deriving property \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder property/syntax property/AST property/transforms \
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian 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 \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## rule for appendHaskellPreludeString
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus LuettichOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for ATC generation
d272062059eea4d7479e1c6e8517469f02f61287Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
0cfef6179a1bfec4f07f460686dd629a27b4b778Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederhs_der_files += Haskell/TiATC.hs Haskell/TiDecorateATC.hs Haskell/TiPropATC.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### Profiling (only for debugging)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Attention every module must be compiled with profiling or the linker
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### cannot link the various .o files properly. So after switching on
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maeder### Profiling, do an 'gmake real_clean; gmake'
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### Comment in the following line for switching on profiling.
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian Maeder#HC_PROF = -prof -auto-all -fignore-asserts
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian MaederHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## sources for hets
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersnon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maedersources = hets.hs $(filter-out $(non_sources), \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
e220b2051a2342a9291721e6c7f408860bed01b7Jorina Freya Gerken 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/Id.hs Common/Result.hs OWL_DL/AS.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_der_files = $(foreach file, $(atc_files), \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus LuettichATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
e96a0bf4040fd789339958c01f145c5057d26db6René WagnerATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
43b4c41fbb07705c9df321221ab9cb9832460407Christian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs CoCASL/Sublogic.hs
e5b79e9fe9606fd386dc840ea9f1514e7b9b32b9Christian MaederCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2CFOL.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke# sources that have {-# OPTIONS -cpp #-}
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder hxt/Text/XML/HXT/ProtocolHandler/ProtocolHandler.hs
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder# unused, remove when header files are gone
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettichnondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(genrule_header_files) $(generated_rule_files) \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder $(patsubst %.hs, %.der.hs, $(drifted_files))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
ed9207cf24e96b0d6f59985822054ae28cb69b2eChristian Maeder# this variable holds the modules that should be documented
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichtax_objects = $(patsubst %.hs, %.o, $(tax_sources))
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich####################################################################
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder check capa hacapa wrap isa h2h h2hf clean_genRules genRules \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke taxonomy count doc apache_doc post_doc4apache fromKif \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder derivedSources install_hets install release cgi patch ghci
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_INCLUDE) \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder###############################
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder### TAGS files for (x)emacs
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder# load them with "M-x" "visit-tags-table" from
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder# use "M-." to search for a tag
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
c9e197862d9d8ef2585270dd08f5194b3aed4a9dKlaus Luettich @echo 'File : Maintainer' > $@
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich 'foreach my $$f (@ARGV) { open I, "<$$f"; \
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich print "$$f :"; while (<I>) \
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich print " $$1" ; last} }; print "\n"; close I; }' \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder @echo " done"
d579f5b263e6c73d466c265f2fbfd45b0e69ca64Klaus Luettich###############################
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder### count lines of code
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder### Documentation via haddock
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# generate haddock documentation with links to sources
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# the interface treatment is stolen from uni/mk/suffix.mk
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder cp -r ../uni/www docs/www || mkdir docs/www
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder HINTERFACES0=`find docs/www -name '*.haddock' \
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder -t 'Hets - the Heterogeneous Tool Set' \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder -p Hets-Haddock-Prologue.txt $(doc_sources)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski# sources are not copied here
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(PERL) utils/post_process_docs.pl a-docs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder### release management
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian MaederderivedSources: $(derived_sources) $(hspp_sources)
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers GenerateRules.hs -o ../genRules && strip ../genRules)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# "hssource" for ghc-5.04.2
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder -package hssource -i../.. -o $(INLINEAXIOMS)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder if [ -d ../uni ] ; then ln -s ../uni uni ; fi
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder if [ -d ../programatica ] ; then \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder ln -s ../../programatica/tools programatica/tools ; fi
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###################################
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettichutils/genItCorrections: $(GENITCORRECTIONS_deps)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder @echo -n "Generating pretty/LaTeX_maps.hs ... "
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers gen_it_characters gen_it_words >> LaTeX_maps.hs)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo "ready"
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo "please copy the file manually to Common"
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski#############################
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder### ATC DrIFT-rule generation
26f228bf3a3fea810223396e5794c217a79a8d5bChristian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
ba904a15082557e939db689fcfba0c68c9a4f740Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(HasCASL_files)
6ae5607d2def114f998fd49bac4eef12a2620fafChristian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian MaederSPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### removes *.hi and *.o in all include directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### remove binaries
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### additionally removes the library files
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### additionally removes generated files not in the CVS tree
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich####################################################################
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich### test targets
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### a parser to test annotation parser and Id parsers
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus LuettichCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### interactive
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### christian's target
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### CASL parser
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederCASL/fromKif: CASL/fromKif.hs Common/*.hs CASL/*.hs
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### CASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder### HasCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### Haskell wrapper parser
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederHaskell/wrap: Haskell/wrap.hs Common/*.hs Haskell/Wrapper.hs
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder### Isar parser
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian MaederIsabelle/isa: Isabelle/isa.hs Common/*.hs Isabelle/*.hs
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder### Haskell analysis
88318aafc287e92931dceffbb943d58a9310001dChristian MaederHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell to Isabelle-HOLCF translation
88318aafc287e92931dceffbb943d58a9310001dChristian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### HasCASL to Haskell translation
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus LuettichHaskell/h2h: Haskell/h2h.hs Haskell/*.hs HasCASL/*.hs
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### ATC test system
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettichatctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs \
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettichatermlibtest: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
$(RM) $@
## two hardcoded dependencies for a correct generation of Version.hs
.SUFFIXES:
%: %.hs
%.hs: %.y
$(RM) $@
$(RM) $@
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs
$(RM) $@
$(RM) $@
$(PERL) $+ > $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
$(RM) $@