Makefile revision 89c9d707aa817684b88036a2dad66c3437840677
a34684a59b60a4173c25035d0c627ef17e6dc215rpluem# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
1337c7673efc1f80f634139fbad7cbb98a0dc657ylavic# Year: 2004
1337c7673efc1f80f634139fbad7cbb98a0dc657ylavic# This Makefile will compile the new hets system and provides also
1337c7673efc1f80f634139fbad7cbb98a0dc657ylavic# targets for test programs during implementation phases.
4da61833a1cbbca94094f9653fd970582b97a72etrawick# !!! Note: This makefile is written for GNU make !!!
4da61833a1cbbca94094f9653fd970582b97a72etrawick# (gmake on solaris)
4789804be088bcd86ae637a29cdb7fda25169521jailletc####################################################################
4789804be088bcd86ae637a29cdb7fda25169521jailletc## Some varibles, which control the compilation
e50c3026198fd496f183cda4c32a202925476778covenerINCLUDE_PATH = hxt syb-generics haifa-lite/src hcl/src
e50c3026198fd496f183cda4c32a202925476778covenerHXT_PATHS = Data Data/Tree Data/Tree/NTree Data/Digest Text Text/XML \
e50c3026198fd496f183cda4c32a202925476778covener Text/XML/HXT Text/XML/HXT/IO Text/XML/HXT/DOM Text/XML/HXT/Arrow \
5b88c8507d5ef6d0c4cfbc78230294968175b638minfrin Text/XML/HXT/XPath Text/XML/HXT/Validator Text/XML/HXT/Parser \
5b88c8507d5ef6d0c4cfbc78230294968175b638minfrin Text/XML/HXT/RelaxNG Text/XML/HXT/ProtocolHandler Codec Codec/ASN1 \
6c3b9cebb551140fbb25d58bae08b539b3802133ylavic Codec/Binary Codec/Encryption Codec/Encryption/RSA Network \
6c3b9cebb551140fbb25d58bae08b539b3802133ylavic System/Console System/Console/Shell System/Console/Shell/Backend
4f29b65ab4b547ad5dbe506e2d0ff5d12ead9247ylavicHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
4f29b65ab4b547ad5dbe506e2d0ff5d12ead9247ylavic Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
0a0df13b7f1f4f1a74fe295253d89ca3911b301aylavic Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
69301145375a889e7e37caf7cc7321ac0f91801erpluem utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
69301145375a889e7e37caf7cc7321ac0f91801erpluem Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
69301145375a889e7e37caf7cc7321ac0f91801erpluem Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
506bfe33206b2fece40ef25f695af39dd4130facjkaluza hcl/src/Data syb-generics/Data syb-generics/Data/Generics2 \
d58a848a016d401b965111e50ef829e1641f7834minfrin# the 'replacing spaces' example was taken from the (GNU) Make info manual
17e6c95f3b22d18acdf8380fb26a8d0e10c80767ylavic## set ghc imports properly for your system
17e6c95f3b22d18acdf8380fb26a8d0e10c80767ylavic# import directories for ghc-5.04.2
e8bd80a4bb88199d2f9a24a50345688e52d9c116ylavic DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
e8bd80a4bb88199d2f9a24a50345688e52d9c116ylavic# override on commandline for other architectures
330e16bea8fe9cace4de90c349750c03dfb1fe64ylavic /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
330e16bea8fe9cace4de90c349750c03dfb1fe64ylavicGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
330e16bea8fe9cace4de90c349750c03dfb1fe64ylavicGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
d7205b1a86c51c27b71a2c458dc453fd53a261c1covenerINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
d7205b1a86c51c27b71a2c458dc453fd53a261c1covener Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
44ff304057225e944e220e981d434a046d14cf06covenerGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
032982212dbcc7c3cce95bf89c503bb56e185ac7kbrand# remove -fno-warn-orphans for older ghcs and add -ifgl
caad2986f81ab263f7af41467dd622dc9add17f3ylavic $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
caad2986f81ab263f7af41467dd622dc9add17f3ylavic -fallow-overlapping-instances -fallow-undecidable-instances
caad2986f81ab263f7af41467dd622dc9add17f3ylavic# -ddump-minimal-imports
45a10d38e6051fd7bdf9d742aaae633d97ff02abjailletc# flags also come in via ../uni/uni-package.conf
f7317ff316c2b141feea31bddb74d5d3fa1584edjorton# but added it here in case of compilation without uni
a34684a59b60a4173c25035d0c627ef17e6dc215rpluemlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
1e2d421a36999d292042a5539971070d54aa6c63ylavicTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
fa7ed98b9dc94c5845cf845aea0a44ecacd290c9humbedooh ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
fa7ed98b9dc94c5845cf845aea0a44ecacd290c9humbedooh Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
0b67eb8568cd58bb77082703951679b42cf098actrawick SPASS/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs
0b67eb8568cd58bb77082703951679b42cf098actrawickUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
5ef3c61605a3a021ff71f488983cb0065f8e1a79covenerHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
6502b7b32f980cc2093bb3ebce37e5e4dc68fba4ylavic# some modules from uni for haddock
6502b7b32f980cc2093bb3ebce37e5e4dc68fba4ylavic# if uni/server is included also HaXml sources are needed
3060ce7f798fbda7999cd4ddf89b525d2b294185coveneruni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
c1a63b8fad09c419c1a64f75993feb8a343a6801ylavicuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
e6b4bd1113567627ab6bb6c6a7105e1e01a7d889jailletcTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs
457468b82e59d01eba00dd9d0817309c8f5e414ejim### list of directories to run checks in
04983e3bd1754764eec7d6bb772fe3b0bf391771jortonhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
49dacedb6c387b786b7911082ff35121a45f414bcovenerPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
49dacedb6c387b786b7911082ff35121a45f414bcovener base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
cfd9415521847b2f9394fad04fb701cfb955f503rjung base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
28c31fb73c1264bd1d0ff932573677030b024c7dwrowe property/TI property/defs property/parse2 property/parse2/Parser
28c31fb73c1264bd1d0ff932573677030b024c7dwrowepfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
63b9f1f5880391261705f696d7d65507bbe9ace3covenerhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
49dacedb6c387b786b7911082ff35121a45f414bcovener patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
3c990331fc6702119e4f5b8ba9eae3021aea5265jim echo "{-# OPTIONS -w #-}" > $@
fc42512879dd0504532f52fe5d0d0383dda96a1eniq$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
06b8f183140c8e02e0974e938a05078b511d1603covenerderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
15890c9306ba98f6fc243e15a3c4778ddc7d773erpluemutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
259878293a997ff49f5ddfc53d3739cbdc25444ecovenerAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
b54b024c06a19926832d77d40ba35ad8c41e4d3dminfrin## rule for appendHaskellPreludeString
b54b024c06a19926832d77d40ba35ad8c41e4d3dminfrinHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
8152945ae46857b170cb227e79bb799f4fc7710dminfrinAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
8152945ae46857b170cb227e79bb799f4fc7710dminfrin HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
75f5c2db254c0167a0e396254460de09b775d203trawick#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
4f0358189bfa57b8e75bd6b94db264302a8f336amrumph#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
4f0358189bfa57b8e75bd6b94db264302a8f336amrumphOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
5716f9c6daa92dde5f2f9d11ed63f7c9549c223atrawick base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
54d750a84a175d8e338880514d440773eb986b50covener $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
54d750a84a175d8e338880514d440773eb986b50covener## rule for ATC generation
54d750a84a175d8e338880514d440773eb986b50covenerHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
54d750a84a175d8e338880514d440773eb986b50covener $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
83b50288fa7d306324bba68832011ea08f5c7832covenerTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
5f066f496cd9f20a2a701255bc67d44e7cb46daetrawickTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
5f066f496cd9f20a2a701255bc67d44e7cb46daetrawick### Profiling (only for debugging)
2e15620d724fb8e3a5be183b917359a2fd6e9468covener### Attention every module must be compiled with profiling or the linker
2e15620d724fb8e3a5be183b917359a2fd6e9468covener### cannot link the various .o files properly. So after switching on
2e15620d724fb8e3a5be183b917359a2fd6e9468covener### Profiling, do an 'gmake real_clean; gmake'
2e15620d724fb8e3a5be183b917359a2fd6e9468covener### Comment in the following line for switching on profiling.
1b988c41ee505962781d110a3e4c2c90f1ea0aa4covener#HC_PROF = -prof -auto-all -fignore-asserts
1b988c41ee505962781d110a3e4c2c90f1ea0aa4covenerHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
b8efdc95bec9cf089aa1be0bfd07d46aa1137a7acovener####################################################################
b8efdc95bec9cf089aa1be0bfd07d46aa1137a7acovener## sources for hets
f06e7c4b1bce6b6491e5de0b7998d3f5696b293dchrisdnon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
f06e7c4b1bce6b6491e5de0b7998d3f5696b293dchrisd Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs \
111436a32ba1254291e4883292fb116d15fe8f64covener $(wildcard haifa-lite/src/Org/Xmlsoap/Schemas/Soap/*.hs) \
7b7430e701e9a31ce809da7c220bb8dfcf68c86etrawick $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
273e512f20f262e5e2aa8e0e83371d1929fb76adjkaluzadrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
273e512f20f262e5e2aa8e0e83371d1929fb76adjkaluza Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
fe83f60b41477b14a37edcfcd1f7f5c5a1ebfe44minfrin Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
993d1261a278d7322bccef219101220b7b4fb8c5jkaluzaatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
993d1261a278d7322bccef219101220b7b4fb8c5jkaluza Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
ba050a6f942b9fa0e81ed73437588005c569655ccovener Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
ba050a6f942b9fa0e81ed73437588005c569655ccovener Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
cc5a4a08dc9783fcbc52ce86f11e01c281a43810minfrinATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
9b0076ddd1103e5fa9c1f9bafde4b06ce244fbaecovenerATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
249d09d51808cb7981af99762c3b3736ca126cd5jkaluzaATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
249d09d51808cb7981af99762c3b3736ca126cd5jkaluza $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
56589be3d7a3e9343370df240010c6928cc78b39jkaluzaATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
77ca16c5676da23155311e13cee61e7eaba9fa3ejailletcATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
f87299dab99bc04b51a6b8cad51b6795db862c0atrawickATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
4d12805e6c18253040223ea637acd6b3b3c18f60jorton $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
85eacfc96a04547ef25aabbc06440039715084c2jortonCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
a4df2cd1e1391575a327c2a90ba4315f805a0a78covenerHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
cb666b29f81df1d11d65002250153353568021fccovenerConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
6a80c3c6f4b8ea7ba5e89402b8b779b09ce020e0covenerCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
6a80c3c6f4b8ea7ba5e89402b8b779b09ce020e0covenerCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
75a230a728338d84dcfe81edd375352f34de22d0covenerCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
63a5ea80bddcc84a462e40f402b4f330e0e05411coveneratc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
63a5ea80bddcc84a462e40f402b4f330e0e05411covenergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
65a4e663b82f8bce28ac22ab2edfd7502de36998sfgendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
74e7f6c55fd67b10cb400b3f6d1dc718a303d944minfrin Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
74e7f6c55fd67b10cb400b3f6d1dc718a303d944minfringen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
a511a29faf2ff7ead3b67680154a624effb31aafminfrinderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
a511a29faf2ff7ead3b67680154a624effb31aafminfrin $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
a511a29faf2ff7ead3b67680154a624effb31aafminfrin OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
a511a29faf2ff7ead3b67680154a624effb31aafminfrin# sources that have {-# OPTIONS -cpp #-}
deec48c67d4786bc77112ffbf3a4e70b931097edminfrin SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin hxt/Text/XML/HXT/ProtocolHandler/ProtocolHandler.hs \
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin hxt/System/Console/Shell/Regex.hs PGIP/Common.hs PGIP/Commands.hs \
5c43d2fb853f84497b5ece2d414ef9484aa87e5fsf# unused, remove when header files are gone
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
413ee814748f37be168ff12407fa6dba0ceeabe6trawick Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf# this variable holds the modules that should be documented
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsfdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sftax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
9811aed12bbc71783d2e544ccb5fecd193843eadsf####################################################################
9811aed12bbc71783d2e544ccb5fecd193843eadsf### targets
88fac54d9d64f85bbdab5d7010816f4377f95bd7rjung.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
bd3f5647b96d378d9c75c954e3f13582af32c643sf check capa hacapa h2h h2hf showKP clean_genRules genRules \
bd3f5647b96d378d9c75c954e3f13582af32c643sf derivedSources install_hets install release cgi patch ghci
bd3f5647b96d378d9c75c954e3f13582af32c643sf.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
79c5787b92ac5f0e1cc82393816c77a006399316trawick###############################
79c5787b92ac5f0e1cc82393816c77a006399316trawick### TAGS files for (x)emacs
79c5787b92ac5f0e1cc82393816c77a006399316trawick# load them with "M-x" "visit-tags-table" from
79c5787b92ac5f0e1cc82393816c77a006399316trawick# use "M-." to search for a tag
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton# !!Beware this is somewhat instable, because it uses an absolute path!!
7b395e4e878c28a4784919cfd2e704ddd14a3390jorton /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
e81785da447b469da66f218b3f0244aab507958djorton @echo 'File : Maintainer' > $@
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton 'foreach my $$f (@ARGV) { open I, "<$$f"; \
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton print "$$f :"; while (<I>) \
53e9b27aba029b18be814df40bcf6f0428771d1efuankg { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
53e9b27aba029b18be814df40bcf6f0428771d1efuankg print " $$1" ; last} }; print "\n"; close I; }' \
53e9b27aba029b18be814df40bcf6f0428771d1efuankg @echo " done"
6bb524f1895f30265a1431afc460977d391cb36bsf###############################
6bb524f1895f30265a1431afc460977d391cb36bsf### count lines of code
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin###############################
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin### Documentation via haddock
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin# generate haddock documentation with links to sources
23f1535d6a60817d2846bac0aea230ea475d7dccminfrin# the interface treatment is stolen from uni/mk/suffix.mk
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung -t 'Hets - the Heterogeneous Tool Set' \
0827cb14e550f6f65018431c22c2c913631c8f25kbrand# sources are not copied here
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
-i../.. -o $(INLINEAXIOMS)
if [ -d ../programatica ] ; then \
./clean.sh; \
### Common/LaTeX_maps.hs generation
strip $@
@echo -n "Generating pretty/LaTeX_maps.hs ... "
@(cd pretty >/dev/null; ../utils/genItCorrections \
-o $@ $(OWL_DL_files)
$(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) $@
echo Please do ;\