Makefile revision b9b960bc75e34658e70c4a0231dbc6a6e7373f2d
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen# This Makefile will compile the new hets system and provides also
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo Sirainen# targets for test programs during implementation phases.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# !!! Note: This makefile is written for GNU make !!!
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# (gmake on solaris)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen####################################################################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen## Some varibles, which control the compilation
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenINCLUDE_PATH = hxt syb-generics haifa-lite/src hcl/src
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHXT_PATHS = Data Data/Tree Data/Tree/NTree Data/Digest Text Text/XML \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Text/XML/HXT Text/XML/HXT/IO Text/XML/HXT/DOM Text/XML/HXT/Arrow \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Text/XML/HXT/XPath Text/XML/HXT/Validator Text/XML/HXT/Parser \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Text/XML/HXT/RelaxNG Text/XML/HXT/ProtocolHandler Codec Codec/ASN1 \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Codec/Binary Codec/Encryption Codec/Encryption/RSA System Control \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen CspCASL ATC Proofs Comorphisms Isabelle Driver \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen Taxonomy CASL_DL SPASS OWL_DL OMDoc $(PFE_PATHS) \
ad850190d946d34966a56838cfdb216e021b5b5fTimo Sirainen hcl/src/Data syb-generics/Data syb-generics/Data/Generics2 \
ad850190d946d34966a56838cfdb216e021b5b5fTimo Sirainen $(addprefix haifa-lite/src/, $(HAIFA_PATHS)) PGIP
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# the 'replacing spaces' example was taken from the (GNU) Make info manual
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen## set ghc imports properly for your system
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# import directories for ghc-5.04.2
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# override on commandline for other architectures
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
1098fc409a45e7603701dc94635927a673bee0c1Timo SirainenGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
1098fc409a45e7603701dc94635927a673bee0c1Timo SirainenGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
1098fc409a45e7603701dc94635927a673bee0c1Timo SirainenINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen# remove -fno-warn-orphans for older ghcs and add -ifgl
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen -fallow-overlapping-instances -fallow-undecidable-instances
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen# -ddump-minimal-imports
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen# flags also come in via ../uni/uni-package.conf
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainen# but added it here in case of compilation without uni
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainenlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo SirainenTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
d9fdacd5fb3e07997e5c389739d2054f0c8441d8Timo SirainenUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
4b231ca0bbe3b536acbd350101e183441ce0247aTimo SirainenHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
4b231ca0bbe3b536acbd350101e183441ce0247aTimo Sirainen# some modules from uni for haddock
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen# if uni/server is included also HaXml sources are needed
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainenuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainenuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo SirainenTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen### list of directories to run checks in
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenPFE_TOOLDIR = $(wildcard ../programatica/tools)
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo SirainenPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen base/transforms base/transforms/Deriving property \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen property/syntax property/AST property/transforms \
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen property/TI property/defs property/parse2 property/parse2/Parser
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo SirainenPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainenpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo SirainenPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainenhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5dTimo Sirainen patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen echo "{-# OPTIONS -w #-}" > $@
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainenderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
a40d26f83af808a0ea1e212c001d682a96d870b0Timo Sirainenutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
a40d26f83af808a0ea1e212c001d682a96d870b0Timo SirainenAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
e192a3b1ca8ae857e7d87298ea507d32977ba570Timo Sirainen## rule for appendHaskellPreludeString
811f2e26d9782d9cb99fdf82e18ffa0a77564fe2Timo SirainenHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo SirainenAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
8b9342aa96b2f297e23afb261f9f7dd859800952Timo Sirainen#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo SirainenOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
a40d26f83af808a0ea1e212c001d682a96d870b0Timo Sirainen base/parse2/SourceNames base/syntax/SyntaxRec \
a40d26f83af808a0ea1e212c001d682a96d870b0Timo Sirainen $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen## rule for ATC generation
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
56f45b3f3ae20e5c933701f4657dda5ef1916855Timo Sirainenhs_der_files += Haskell/TiATC.hs Haskell/TiDecorateATC.hs Haskell/TiPropATC.hs
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo SirainenTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo SirainenTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen### Profiling (only for debugging)
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen### Attention every module must be compiled with profiling or the linker
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen### cannot link the various .o files properly. So after switching on
6b85bc4b03e552cfaeeae872d63c2d8ac5fcb7c4Timo Sirainen### Profiling, do an 'gmake real_clean; gmake'
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen### Comment in the following line for switching on profiling.
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen#HC_PROF = -prof -auto-all -fignore-asserts
1098fc409a45e7603701dc94635927a673bee0c1Timo SirainenHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen####################################################################
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen## sources for hets
1e47cfede3a0b62654105daab00e97b5d660bc6bTimo Sirainennon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
1e47cfede3a0b62654105daab00e97b5d660bc6bTimo Sirainen Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs \
1e47cfede3a0b62654105daab00e97b5d660bc6bTimo Sirainen $(wildcard syb-generics/Data/Generics2/*.hs) \
1e47cfede3a0b62654105daab00e97b5d660bc6bTimo Sirainen $(wildcard haifa-lite/src/Org/W3/N2001/*.hs) \
1e47cfede3a0b62654105daab00e97b5d660bc6bTimo Sirainen $(wildcard haifa-lite/src/Org/Xmlsoap/Schemas/Soap/*.hs) \
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainensources = hets.hs $(filter-out $(non_sources), \
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo Sirainendrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
2f29162743a78434cb38fa1566bbc1e1836c3d8fTimo Sirainen Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo Sirainen Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainenatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainenatc_der_files = $(foreach file, $(atc_files), \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ATC/$(basename $(basename $(notdir $(file)))).der.hs)
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo SirainenATC/Result.der.hs: Common/Result.hs $(GENRULES)
4b231ca0bbe3b536acbd350101e183441ce0247aTimo SirainenATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo SirainenATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
1098fc409a45e7603701dc94635927a673bee0c1Timo SirainenCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo SirainenHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo SirainenConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo SirainenCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo SirainenCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo Sirainengenerated_rule_files = $(atc_der_files) $(atc_logic_files)
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainengendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Siraineninline_axiom_files = Comorphisms/CASL2PCFOL.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
abe7afb8f1766fbcef1b9df513109e43d7d16e49Timo Sirainengen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainenderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen# sources that have {-# OPTIONS -cpp #-}
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen hxt/Text/XML/HXT/ProtocolHandler/ProtocolHandler.hs \
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen# unused, remove when header files are gone
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainengenrule_header_files = $(wildcard ATC/*.header.hs)
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainennondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
f239eb76f77afcbc0bfc97c9b52b4407d1bc3fe6Timo Sirainen $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(genrule_header_files) $(generated_rule_files) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
a835194f9a9dae88528367a791cbc282589f6c01Timo Sirainenhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen# this variable holds the modules that should be documented
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainendoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainentax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
8887bf3757d51d73887dd20b1db3334d867d3817Timo Sirainen Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
13c6532dc104d23061e6901783ceb1ff8872c206Timo Sirainentax_objects = $(patsubst %.hs, %.o, $(tax_sources))
4b231ca0bbe3b536acbd350101e183441ce0247aTimo Sirainen####################################################################
4b231ca0bbe3b536acbd350101e183441ce0247aTimo Sirainen.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen check capa hacapa h2h h2hf clean_genRules genRules \
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen count doc apache_doc post_doc4apache fromKif \
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen derivedSources install_hets install release cgi patch ghci
59151b71059df1190acd75d8717ed04a7920c862Timo Sirainen.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
f239eb76f77afcbc0bfc97c9b52b4407d1bc3fe6Timo Sirainen ghc --make GUI/hets_cgi.hs -o $@ $(HC_INCLUDE) \
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo Sirainen###############################
f239eb76f77afcbc0bfc97c9b52b4407d1bc3fe6Timo Sirainen### TAGS files for (x)emacs
f239eb76f77afcbc0bfc97c9b52b4407d1bc3fe6Timo Sirainen# load them with "M-x" "visit-tags-table" from
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5dTimo Sirainen# use "M-." to search for a tag
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# !!Beware this is somewhat instable, because it uses an absolute path!!
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5dTimo Sirainen /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen @echo 'File : Maintainer' > $@
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen 'foreach my $$f (@ARGV) { open I, "<$$f"; \
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen print "$$f :"; while (<I>) \
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
519e0a461271843833a2b42626ad93f6e7ddc497Timo Sirainen print " $$1" ; last} }; print "\n"; close I; }' \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen @echo " done"
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen###############################
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen### count lines of code
0cea9b1f4fa0495a48f5f097e40492517d67e1baTimo Sirainen###############################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### Documentation via haddock
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# generate haddock documentation with links to sources
2af769daebd83719ac696a440e06f6020471cec0Timo Sirainen# the interface treatment is stolen from uni/mk/suffix.mk
2af769daebd83719ac696a440e06f6020471cec0Timo Sirainen HINTERFACES0=`find docs/www -name '*.haddock' \
d9fdacd5fb3e07997e5c389739d2054f0c8441d8Timo Sirainen $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
13c6532dc104d23061e6901783ceb1ff8872c206Timo Sirainen -t 'Hets - the Heterogeneous Tool Set' \
d9fdacd5fb3e07997e5c389739d2054f0c8441d8Timo Sirainen# sources are not copied here
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen###############################
6a8a4c9f530668cd8961b73d702856ed94f05f80Timo Sirainen### release management
0d0451206a91e9f96e522075dce28a89adc2325dTimo SirainenderivedSources: $(derived_sources) $(hspp_sources)
ba482d3624ca4f1b3d638e6e8470ba5134f21493Timo Sirainen (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5dTimo Sirainen $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen GenerateRules.hs -o ../genRules && strip ../genRules)
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen# "hssource" for ghc-5.04.2
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
21455709020274a628faa9b9bd7839cb8efe3c73Timo Sirainen# set this variable from the command line to i,e. RELEASETAG='-r release-0-60'
2af769daebd83719ac696a440e06f6020471cec0Timo Sirainen cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen if [ -d ../programatica ] ; then \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ln -s ../../programatica/tools programatica/tools ; fi
fd2f5fbc1f07aa93e2214a28cdf02437fb7d06c8Timo Sirainen (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
21455709020274a628faa9b9bd7839cb8efe3c73Timo Sirainen find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
114a0f74e0f825c6bd8aeadfafb248a030762a1fTimo Sirainen cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
114a0f74e0f825c6bd8aeadfafb248a030762a1fTimo Sirainen ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
a817fdcc43aedf423e2134091d5f83f91d64bcc9Timo Sirainenpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen ## TODO: add more dependencies and use hets-opt
1098fc409a45e7603701dc94635927a673bee0c1Timo Sirainen# compile $< -b . -k web -o $@
d5cebe7f98e63d4e2822863ef2faa4971e8b3a5dTimo Sirainen###################################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenutils/genItCorrections: $(GENITCORRECTIONS_deps)
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainenpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen @echo -n "Generating pretty/LaTeX_maps.hs ... "
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen @(cd pretty >/dev/null; ../utils/genItCorrections \
089756ceca55966f1a70e8591f6086026e51015cTimo Sirainen gen_it_characters gen_it_words >> LaTeX_maps.hs)
089756ceca55966f1a70e8591f6086026e51015cTimo Sirainen @echo "ready"
1a21e7049796c98d6d998fcf7a438d7a97193dc4Timo Sirainen @echo "please copy the file manually to Common"
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen#############################
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo Sirainen### ATC DrIFT-rule generation
1a21e7049796c98d6d998fcf7a438d7a97193dc4Timo SirainenCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
1a21e7049796c98d6d998fcf7a438d7a97193dc4Timo Sirainen $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
1a21e7049796c98d6d998fcf7a438d7a97193dc4Timo SirainenHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
58be9d6bcc3800f5b3d76a064ee767fbe31a5a8aTimo Sirainen $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
a817fdcc43aedf423e2134091d5f83f91d64bcc9Timo Sirainen $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
a817fdcc43aedf423e2134091d5f83f91d64bcc9Timo SirainenModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
a817fdcc43aedf423e2134091d5f83f91d64bcc9Timo Sirainen $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
72cbf33ae81fde08384d30c779ff540752d9256cTimo SirainenConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
4bbee99b3aef449a9a2a11a5b5cf1ca486915c49Timo Sirainen $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
4bbee99b3aef449a9a2a11a5b5cf1ca486915c49Timo SirainenCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
62cfc346eb7b0a4fd9e1ab6edd63b98711161229Timo SirainenCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
62cfc346eb7b0a4fd9e1ab6edd63b98711161229Timo Sirainen $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
62cfc346eb7b0a4fd9e1ab6edd63b98711161229Timo Sirainen $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
72cbf33ae81fde08384d30c779ff540752d9256cTimo SirainenCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
a817fdcc43aedf423e2134091d5f83f91d64bcc9Timo SirainenSPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
a817fdcc43aedf423e2134091d5f83f91d64bcc9Timo Sirainen $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
72cbf33ae81fde08384d30c779ff540752d9256cTimo SirainenOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
72cbf33ae81fde08384d30c779ff540752d9256cTimo Sirainen $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
dbd9604da561399cc6255289d5b6f6f662ab2d00Timo Sirainen###############
dbd9604da561399cc6255289d5b6f6f662ab2d00Timo Sirainen### removes *.hi and *.o in all include directories
9566c1b4506d49778659e3dc65997f3c0399cb7eTimo Sirainen### remove binaries
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### additionally removes the library files
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### additionally removes generated files not in the CVS tree
e015e2f7e7f48874495f9df8b0dd192b7ffcb5ccTimo Sirainen $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
4b058f90f9e8a2c6b2eed275de4eb8cc5195a71dTimo Sirainen $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen####################################################################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### test targets
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen####################################################################
4bbee99b3aef449a9a2a11a5b5cf1ca486915c49Timo Sirainen### interactive
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen### christian's target
1b97a59edb073e9a89ac43a21a9abe5d590d4a56Timo Sirainen### CASL parser
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### CASL parser
$(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) $@