Makefile revision c3053d57f642ca507cdf79512e604437c4546cb9
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# This Makefile will compile the new hets system and provides also
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo 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 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 \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Taxonomy CASL_DL SPASS OWL_DL OMDoc PGIP $(PFE_PATHS) \
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`
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo 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 \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages; \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# remove -fno-warn-orphans for older ghcs and add -ifgl
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction -fcontext-stack60 \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen -fallow-overlapping-instances -fallow-undecidable-instances
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# -ddump-minimal-imports
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# flags also come in via ../uni/uni-package.conf
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# but added it here in case of compilation without uni
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen SPASS/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen SPASS/tests/soapTest.hs SPASS/tests/soapTest.hs SPASS/tests/CMDL_tests.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# some modules from uni for haddock
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# if uni/server is included also HaXml sources are needed
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### list of directories to run checks in
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenPFE_TOOLDIR = $(wildcard ../programatica/tools)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen base/transforms base/transforms/Deriving property \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen property/syntax property/AST property/transforms \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen property/TI property/defs property/parse2 property/parse2/Parser
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen echo "{-# OPTIONS -w #-}" > $@
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(HC) --make -fno-monomorphism-restriction -O \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen## rule for appendHaskellPreludeString
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen base/parse2/SourceNames base/syntax/SyntaxRec \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen## rule for ATC generation
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### Profiling (only for debugging)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### Attention every module must be compiled with profiling or the linker
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### cannot link the various .o files properly. So after switching on
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### Profiling, do an 'gmake real_clean; gmake'
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### Comment in the following line for switching on profiling.
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#HC_PROF = -prof -auto-all -fignore-asserts
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen####################################################################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen## sources for hets
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainennon_sources = utils/Setup.hs Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(wildcard haifa-lite/src/Org/W3/N2001/*.hs) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(wildcard haifa-lite/src/Org/Xmlsoap/Schemas/Soap/*.hs) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainensources = hets.hs $(filter-out $(non_sources), \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainendrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenatc_der_files = $(foreach file, $(atc_files), \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen ATC/$(basename $(basename $(notdir $(file)))).der.hs)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenATC/Result.der.hs: Common/Result.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo SirainenATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo SirainenATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo SirainenATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo SirainenATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo 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)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainengenerated_rule_files = $(atc_der_files) $(atc_logic_files)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo 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
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainengen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainenderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# sources that have {-# OPTIONS -cpp #-}
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Isabelle/CreateTheories.hs CASL/CompositionTable/CompositionTable.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen hxt/Text/XML/HXT/ProtocolHandler/ProtocolHandler.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# unused, remove when header files are gone
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainengenrule_header_files = $(wildcard ATC/*.header.hs)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainennondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo 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 \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen# this variable holds the modules that should be documented
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainendoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainentax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainentax_objects = $(patsubst %.hs, %.o, $(tax_sources))
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen####################################################################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen real_clean bin_clean package_clean distclean packages \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen check capa hacapa h2h h2hf showKP clean_genRules genRules \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen count doc apache_doc post_doc4apache fromKif \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen derivedSources install_hets install release cgi patch ghci
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainenpackages: http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen echo "of HTTP package found"; else \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen @if $(HCPKG) field syb-generics version; then \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen echo "of syb-generics package found"; else \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen echo "of shellac package found"; else \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen @if $(HCPKG) field Shellac-readline version; then \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen echo "of shellac-readline package found"; else \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen echo "of hxt package found"; else \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen echo "of HAIFA package found"; else \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen @echo 'File : Maintainer' > $@
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen 'foreach my $$f (@ARGV) { open I, "<$$f"; \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen print "$$f :"; while (<I>) \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen print " $$1" ; last} }; print "\n"; close I; }' \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen @echo " done"
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen###############################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### count lines of code
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen###############################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### Documentation via haddock
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen# generate haddock documentation with links to sources
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# the interface treatment is stolen from uni/mk/suffix.mk
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen HINTERFACES0=`find docs/www -name '*.haddock' \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen -t 'Hets - the Heterogeneous Tool Set' \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# sources are not copied here
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen###############################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen### release management
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenderivedSources: $(derived_sources) $(hspp_sources)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen GenerateRules.hs -o ../genRules && strip ../genRules)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# "-package hssource" for ghc-5.04.2
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# set this variable from the command line to i,e. RELEASETAG='-r release-0-60'
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen if [ -d ../programatica ] ; then \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ln -s ../../programatica/tools programatica/tools ; fi
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen ## TODO: add more dependencies and use hets-opt
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen# compile $< -b . -k web -o $@
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen###################################
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenutils/genItCorrections: $(GENITCORRECTIONS_deps)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen @echo -n "Generating pretty/LaTeX_maps.hs ... "
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen @(cd pretty >/dev/null; ../utils/genItCorrections \
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen gen_it_characters gen_it_words >> LaTeX_maps.hs)
da5d50534cfca45d0aaaf0bdac17b287b4588809Timo Sirainen @echo "ready"
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen @echo "please copy the file manually to Common"
-o $@ $(OWL_DL_files)
$(RM) $@
## two hardcoded dependencies for a correct generation of Version.hs
.SUFFIXES:
%.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) $@
@if [ -d $(INSTALLER_DIR) ] ; then \
echo then please \"cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository login\" ;\
echo Please do ;\