Makefile revision 81c15526a787941b48b02ae8786782f9fb578801
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# Author: (c) Klaus L�ttich, 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.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# !!! Note: This makefile is written for GNU make !!!
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# (gmake on solaris)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder## Some varibles, which control the compilation
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till MossakowskiHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
760ae19a92dde8249679a674f93f58d26a7c5f6bChristian Maeder Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# override on commandline for other architectures
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
e593b89bfd4952698dc37feced21cefe869d87a2Christian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus LuettichINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus LuettichGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus LuettichSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich ../$(SETUP) configure -p $(SETUPPREFIX) --user; \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus LuettichHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederifneq ($(findstring 1.13.2, $(HAXMLVERSION)),)
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederHAXML_PACKAGE = -package HaXml -DHAXML_PACKAGE
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC_WARN) -fglasgow-exts -fallow-overlapping-instances \
97812b7ce9860bf514a8822a63503451795dbc65Klaus Luettich# -ddump-minimal-imports
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# uncomment to above line to generate .imports files for displayDependencyGraph
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHC_OPTS_MAC := $(if $(findstring Darwin,$(shell uname -s)), \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -optl-F$(HOME)/Library/Frameworks -optl-framework -optlGNUreadline,)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckerslogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
ce50fe187cdae64e75e510daafb78156280bdb91Christian Maeder SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
ebe517300051f765f2ed856a789dd5613d681ab0Klaus Luettich SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
6ae5607d2def114f998fd49bac4eef12a2620fafChristian MaederUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# some modules from uni for haddock
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# if uni/server is included also HaXml sources are needed
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder Taxonomy/taxonomyTool.hs SoftFOL/tests/CMDL_tests.hs \
4e7050bcbcf0f372a5bad32ecd0282bccabf0983Klaus Luettich### list of directories to run checks in
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maederhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers base/transforms base/transforms/Deriving property \
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich property/syntax property/AST property/transforms \
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich property/TI property/defs property/parse2 property/parse2/Parser
c432483b64662e8db604a58758cd18ea7fa65659Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian MaederPFE_FLAGS = -package programatica -DPROGRAMATICA
e8d782e6e650b71a2b0ee8461fd8d9fa31525591Christian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
88c66e48620750c42b94db9feb01b42ae23dba97Till Mossakowskiprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
b3dca469a9e267d6d71acfdeca7bf284d0581dc7Till Mossakowski @if $(HCPKG) field programatica version; then \
8659594bb40eb5f3da5439692f0908300947191eSonja Gröning echo "of programatica package found"; else \
eeb419aa20c97b4af973e97ee6ae77a8eed29e15Till Mossakowski -i `pwd`/Haskell/Programatica.patch || exit 0); \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers cp -f utils/programatica.cabal ../programatica/tools; \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
7d09621f989f5e6dfbf603b36b2fccbacf639a3cTill Mossakowski echo "{-# OPTIONS -w #-}" > $@
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -fno-monomorphism-restriction -O \
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
a348b2eb46eb51f376c910d6dd4415fdab6713bdChristian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder## rule for appendHaskellPreludeString
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
88c800932dd7053322501ea2039d9f234be6866cKlaus Luettich## rule for ATC generation
ed9207cf24e96b0d6f59985822054ae28cb69b2eChristian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
05a8b581f98b928baca6dab60cd20277659ac760Christian MaederTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder### Profiling (only for debugging)
b49276c9f50038e0bd499ad49f7bd6444566a834Christian 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
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder### Profiling, do an 'gmake real_clean; gmake'
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Comment in the following line for switching on profiling.
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich# HC_PROF = -prof -auto-all -fignore-asserts -osuf p_o +RTS -K100m -RTS
b905126bab9454b89041f92b3c50bb9efc85e427Klaus LuettichHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
f29371d8bd5a232c974e736b06d0d8a655d320fbKlaus Luettich####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## sources for hets
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maedernon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedersources = hets.hs $(filter-out $(non_sources), \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder CoCASL/AS_CoCASL.hs COL/AS_COL.hs ConstraintCASL/AS_ConstraintCASL.hs \
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Logic/Prover.hs Common/ExtSign.hs Static/DevGraph.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederatc_der_files = $(foreach file, $(atc_files), \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
ef67402074be14deb95e4ff564737d5593144130Klaus LuettichATC/Result.der.hs: Common/Result.hs $(GENRULES)
e7e1ab2ac3f1fded8611bb92ae00e8f3b8c693fbKlaus LuettichATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus LuettichATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
d579f5b263e6c73d466c265f2fbfd45b0e69ca64Klaus LuettichATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
438f9bd974c8e668203e636b0f2bc80c589af043Klaus LuettichATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
4e7050bcbcf0f372a5bad32ecd0282bccabf0983Klaus Luettich $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
4e7050bcbcf0f372a5bad32ecd0282bccabf0983Klaus LuettichATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian MaederATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder $(GENRULECALL) -i ATC.AS_Library -i ATC.Grothendieck -o $@ $<
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
94d3aa05411444596b44ede4531f05dd7ac20fdfChristian MaederPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
dc929508a3bd3c666e9b0182d56898fcafb5d66fChristian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
8410667510a76409aca9bb24ff0eda0420088274Christian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
8410667510a76409aca9bb24ff0eda0420088274Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersgenerated_rule_files = $(atc_der_files) $(atc_logic_files)
ba0ec5e897ef99d420c8c14c2374e0f32b7043dbKlaus Luettichgendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
d17834302eaa101395b4b806cd73670fd864445fChristian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowskigen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich# sources that have {-# OPTIONS -cpp #-}
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers SoftFOL/Logic_SoftFOL.hs GUI/Utils.hs Driver/WriteFn.hs \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder# unused, remove when header files are gone
88c66e48620750c42b94db9feb01b42ae23dba97Till Mossakowskigenrule_header_files = $(wildcard ATC/*.header.hs)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersnondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
ba0ec5e897ef99d420c8c14c2374e0f32b7043dbKlaus Luettich $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(genrule_header_files) $(generated_rule_files) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder $(patsubst %.hs, %.der.hs, $(drifted_files))
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettichhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder# this variable holds the modules that should be documented
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckerstax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maedertax_objects = $(patsubst %.hs, %.o, $(tax_sources))
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder####################################################################
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder real_clean bin_clean package_clean distclean packages \
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder check capa hacapa h2h h2hf showKP clean_genRules genRules \
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder count doc apache_doc post_doc4apache fromKif \
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder derivedSources install_hets install release cgi ghci
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederpackages: http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder echo "of HTTP package found"; else \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @if $(HCPKG) field syb-generics version; then \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo "of syb-generics package found"; else \
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder echo "of shellac package found"; else \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedershread_pkg: utils/shread.tgz $(SETUP) shellac_pkg
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @if $(HCPKG) field Shellac-readline version; then \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo "of shellac-readline package found"; else \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo "of hxt package found"; else \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo "of HAIFA package found"; else \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo 'File : Maintainer' > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo " done"
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers###############################
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### count lines of code
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers###############################
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder### Documentation via haddock
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich# generate haddock documentation with links to sources
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich# the interface treatment is stolen from uni/mk/suffix.mk
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers cp -r -L ../uni/www docs/www || mkdir docs/www
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder HINTERFACES0=`find -L docs/www -name '*.haddock' \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -t 'Hets - the Heterogeneous Tool Set' \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -p Hets-Haddock-Prologue.txt $(doc_sources)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# sources are not copied here
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############################
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski### release management
bf76f4fcf07abaebea587df8135de8356c26a363Till MossakowskiderivedSources: $(derived_sources) $(hspp_sources)
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettich (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder GenerateRules.hs -o ../genRules && strip ../genRules)
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich# "-package hssource" for ghc-5.04.2
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettich svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettich if [ -d ../uni ] ; then ln -s ../uni uni ; fi
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettich if [ -d ../programatica ] ; then \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ln -s ../../programatica/tools programatica/tools ; fi
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
f29371d8bd5a232c974e736b06d0d8a655d320fbKlaus Luettichpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
f29371d8bd5a232c974e736b06d0d8a655d320fbKlaus Luettich ## TODO: add more dependencies and use hets-opt
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# compile $< -b . -k web -o $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###################################
88c800932dd7053322501ea2039d9f234be6866cKlaus Luettichutils/genItCorrections: $(GENITCORRECTIONS_deps)
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maederpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
@echo -n "Generating pretty/LaTeX_maps.hs ... "
@(cd pretty >/dev/null; ../utils/genItCorrections \
$(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 \
sed "s/^\(SPASS_DIR_MAC=\).*/\1`ls utils/SPASS-ppc-mac/ | grep SPASS`/" Makefile.inst > Makefile.inst2 ;\
@echo Please do