Makefile revision 79e80c4b3f0ebb337d84415a50f29ccfc793e68b
c80e152862cc3e3207dc837fde7116bd4c0e4b9dTinderbox User# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
d77cb075aae5595e460e3299bfc1e8ea5d42b560Evan Hunt# This Makefile will compile the new hets system and provides also
d77cb075aae5595e460e3299bfc1e8ea5d42b560Evan Hunt# targets for test programs during implementation phases.
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# !!! Note: This makefile is written for GNU make !!!
30ca20f720ad0887772a79e7abb25b4fa0e4b5b0Mark Andrews# (gmake on solaris)
7ec97ae74e42ec21b354fd2d1366313b41d947d6Evan Hunt####################################################################
701a93f5a592e4652343e049aa495d409c3ee133Mark Andrews## Some varibles, which control the compilation
002f1373374a0b72fc0329baa682917929bef168Tony FinchHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
8f1ed05dc0aae7ae6c3da6ec6d405df61257a61eMark Andrews Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
73cf0ba4e82c6baef638ecc4e31321223f841d28Mark Andrews utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
73cf0ba4e82c6baef638ecc4e31321223f841d28Mark Andrews Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
73cf0ba4e82c6baef638ecc4e31321223f841d28Mark Andrews Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
d8351dfc9b725b0d727be7acab6247d7d501d9a0Mark Andrews CspCASL ATC Proofs Comorphisms Isabelle Driver \
d8351dfc9b725b0d727be7acab6247d7d501d9a0Mark Andrews Taxonomy CASL_DL SoftFOL OWL_DL OMDoc PGIP Propositional
3a29ce9c08dd31709c73e7187aebda0d360c537bEvan Hunt# the 'replacing spaces' example was taken from the (GNU) Make info manual
f1740da065d4555039fe8bb53beb4153e3f94de3Mark Andrews## set ghc imports properly for your system
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews# import directories for ghc-5.04.2
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark AndrewsGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
ad309e8dfa0601d6053aaa12770a98a6940f89deEvan Hunt# override on commandline for other architectures
635e4351b04fd61ca6d853bdac6268c090b55129Mark Andrews /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
fc04365d2f83f197c8a54545dd9cd4ce6a209940Mark AndrewsGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark AndrewsGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark AndrewsINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
7cbac360bf98c0a52b2d6866ad887616c32d4d3aMark Andrews Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
1cf118a656f5fd210787908b845362077fc507f8Evan Hunt Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
1cf118a656f5fd210787908b845362077fc507f8Evan HuntGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan HuntSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
4221d9cd1d02311fbf9b5f08a038f5af78b10b4aEvan Hunt ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis DupontHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis Dupontifneq ($(findstring 1.13.2, $(HAXMLVERSION)),)
f9c410d93711fbf312a0162f1e2d3f2a5ede69afFrancis DupontHAXML_PACKAGE = -package HaXml -DHAXML_PACKAGE
e526027287b849f0b6ab6e069156697cbafa22c1Michał Kępień# remove -fno-warn-orphans for older ghcs and add -ifgl
929329d2d66a7e1083c70a9c918381935bf12799Mukund Sivaraman $(HC_WARN) -fglasgow-exts -fallow-overlapping-instances \
929329d2d66a7e1083c70a9c918381935bf12799Mukund Sivaraman# -ddump-minimal-imports
7e1a62eea2e4ba9d6c3fc718e679b965fa514f69Mark Andrews# uncomment to above line to generate .imports files for displayDependencyGraph
afefd754734f896bf3e0590177fff83e7cdfdf35Mark AndrewsHC_OPTS_MAC := $(if $(findstring Darwin,$(shell uname -s)), \
afefd754734f896bf3e0590177fff83e7cdfdf35Mark Andrews -optl-F$(HOME)/Library/Frameworks -optl-framework -optlGNUreadline,)
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Huntlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan HuntTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
7ff28f5befbee76048a23e504dcd3f9a44ce6209Evan Hunt SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark AndrewsUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
cad79077bd5b2616bc4a7a6b3cbc0953bef8917fMark AndrewsHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
adfe58e8e5cd1890585e92b67f1fd01989a1fa7dMark Andrews# some modules from uni for haddock
adfe58e8e5cd1890585e92b67f1fd01989a1fa7dMark Andrews# if uni/server is included also HaXml sources are needed
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrewsuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
c3237dec879f82855403ff7e3ba87b298172efd5Mark Andrewsuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
cb616c6d5c2ece1fac37fa6e0bca2b53d4043098Mark AndrewsTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs \
c0a2210466dec0cc81ebf2ffbe21693b57b9c29cMark Andrews### list of directories to run checks in
534057c9f91a3eb6e0541f3526459c716239b337Mark Andrewshs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
534057c9f91a3eb6e0541f3526459c716239b337Mark Andrews Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
0f14b041328c062b1fa391887376388dfc8b2fe5Mark AndrewsPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
f7f4730e563a2749629fe7fef4cd9513cd2bfab7Mark Andrews base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
f7f4730e563a2749629fe7fef4cd9513cd2bfab7Mark Andrews base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
1848d38f441ebf70ab21f6151bc3487a92d25b63Mark Andrews base/transforms base/transforms/Deriving property \
1848d38f441ebf70ab21f6151bc3487a92d25b63Mark Andrews property/syntax property/AST property/transforms \
2d82ed9456e72dc4373bea19d63411afe1c48962Mark Andrews property/TI property/defs property/parse2 property/parse2/Parser
2d82ed9456e72dc4373bea19d63411afe1c48962Mark AndrewsPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
a5a1cbece45e6ca68aafe3b9b995eac6b0f45dd2Mark Andrewspfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark AndrewsPFE_FLAGS = -package programatica -DPROGRAMATICA
0d6328ce5f6b799f8e7c6cbbb3b965cf29bfb7baMark Andrewshappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
677f507de7c546c187c1505c48bc7b440545485cMark Andrewsprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
124cc0660c7eff8021c2422fb47441e9ca08b3f9Tinderbox User @if $(HCPKG) field programatica version; then \
e01ef6f01c7e8f80122cd80a2e011425a0135489Mark Andrews echo "of programatica package found"; else \
677f507de7c546c187c1505c48bc7b440545485cMark Andrews -i `pwd`/Haskell/Programatica.patch || exit 0); \
677f507de7c546c187c1505c48bc7b440545485cMark Andrews cp -f utils/programatica.cabal ../programatica/tools; \
677f507de7c546c187c1505c48bc7b440545485cMark Andrews echo "{-# OPTIONS -w #-}" > $@
bf459d24a117ae2c54c37016430b41cd6d73491cMark Andrews$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
64d7fa3ec4785b390665860aa6bdae304b3c1d24Mark Andrewsderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
64d7fa3ec4785b390665860aa6bdae304b3c1d24Mark Andrewsutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
75505befa93c993aa5d2df24a2b64eac0c34cbffMark AndrewsAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
a38f07c73790170842e4523b4a474d01ca0dede1Michał Kępień## rule for appendHaskellPreludeString
a38f07c73790170842e4523b4a474d01ca0dede1Michał KępieńHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
1f4a3c7088594d1b64cd734eb69e1fd023fde8bfMichał KępieńAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
1f4a3c7088594d1b64cd734eb69e1fd023fde8bfMichał Kępień HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
91827e6fd3851a5fe129ef5409ff45833ca01a0eMark Andrews#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
35aae5884f410180706a89a9715bf9a85eeeb4b7Michał Kępień#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
57b1d64d9ae12d56973716e96f9743a00d47af4aMichał KępieńOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
57b1d64d9ae12d56973716e96f9743a00d47af4aMichał Kępień base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
57b1d64d9ae12d56973716e96f9743a00d47af4aMichał Kępień base/parse2/SourceNames base/syntax/SyntaxRec \
09c3efda414314d7edcfb2aed9463fb935fc95a6Mark Andrews $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
09c3efda414314d7edcfb2aed9463fb935fc95a6Mark Andrews $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
86d2f9abc8493321aacb0d540485de4d562fb734Mark Andrews## rule for ATC generation
86d2f9abc8493321aacb0d540485de4d562fb734Mark AndrewsHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
86d2f9abc8493321aacb0d540485de4d562fb734Mark Andrews $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
09c3efda414314d7edcfb2aed9463fb935fc95a6Mark AndrewsTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
c7e57ce1b0bca9bc7da14bec485f7a7e3e4c761fMichał KępieńTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
3ed16e796dba90c96933c8a8a3f5b9404d8d3e61Mark Andrews### Profiling (only for debugging)
3ed16e796dba90c96933c8a8a3f5b9404d8d3e61Mark Andrews### Attention every module must be compiled with profiling or the linker
3ed16e796dba90c96933c8a8a3f5b9404d8d3e61Mark Andrews### cannot link the various .o files properly. So after switching on
14d8a144779b54b103d2da741a2242bf5f9052f7Mark Andrews### Profiling, do an 'gmake real_clean; gmake'
14d8a144779b54b103d2da741a2242bf5f9052f7Mark Andrews### Comment in the following line for switching on profiling.
14d8a144779b54b103d2da741a2242bf5f9052f7Mark Andrews#HC_PROF = -prof -auto-all -fignore-asserts
70e041bea19b6ad9522b89c2299ad315a2deaafdMark AndrewsHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews####################################################################
eeb919b6f572e033d97cf001e4cd44aaff54e5dcMichał Kępień## sources for hets
eeb919b6f572e033d97cf001e4cd44aaff54e5dcMichał Kępieńnon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
a55438eda32ecebf43ead45b216662b7923a465fMark Andrewssources = hets.hs $(filter-out $(non_sources), \
8de17f83cafa91a5720dd0b8c1aee5f47f6d7f09Evan Hunt $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
9789e54e55b61b669fb31a8b70e9655e8357dda2Mark Andrewsdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
f8362536c647625e602c8450a778a2b7ba90c9f4Mark Andrews Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
f8362536c647625e602c8450a778a2b7ba90c9f4Mark Andrews Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
4b669b69bae7dedda2faa09a7ade247499c1d49cMichał Kępieńatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
4b669b69bae7dedda2faa09a7ade247499c1d49cMichał Kępień Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
4b669b69bae7dedda2faa09a7ade247499c1d49cMichał Kępień Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
4b669b69bae7dedda2faa09a7ade247499c1d49cMichał Kępień Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
eb11b39981689e4a20fbe95e533577eacab992b4Mukund Sivaramanatc_der_files = $(foreach file, $(atc_files), \
eb11b39981689e4a20fbe95e533577eacab992b4Mukund Sivaraman ATC/$(basename $(basename $(notdir $(file)))).der.hs)
575e9d9e4b6beaae688f107814a320b91243a4b2Mark AndrewsATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
575e9d9e4b6beaae688f107814a320b91243a4b2Mark AndrewsATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
7c442d7fe06bc95432af7513764e5cc85e133648Evan HuntATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
7c442d7fe06bc95432af7513764e5cc85e133648Evan Hunt $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
5e1ca7a326741a8f74e6f2b907c7e1fbf428bf80Michał KępieńATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
ba93bc80a7bce5ba07b2f98e68f0f57402f2459cMark AndrewsATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
ba93bc80a7bce5ba07b2f98e68f0f57402f2459cMark AndrewsATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
5f103158280fb2e814db305f917aa42040221623Mark Andrews $(GENRULECALL) -x Logic.Prover.ProverTemplate \
b7b76d6b855cd4c1152c26d34fb61af05f965c5eEvan HuntCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
b7b76d6b855cd4c1152c26d34fb61af05f965c5eEvan HuntHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
764e2f3413ca89d09abffb3eb228c8c820bf08b8Mark AndrewsPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
a06198688faca5c7bc1a35ec0ec18bc68c07691cEvan Hunt Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs\
50433a667cf0ed3ac7807768b745b0d870ff8c8bMark AndrewsConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
50433a667cf0ed3ac7807768b745b0d870ff8c8bMark AndrewsCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
3c12bec945ee71a38c5ba6f624abd12e2da7eea5Mark AndrewsCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
f44202ab640d22e17b4c74bdad7817622918bd27Mark AndrewsCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
5d7d67f82a8913fae5f1098e111fe50edb86cd5bEvan Huntatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
6216df5ccded056abd5db4abac4e5cbd78c73f45Evan Huntgenerated_rule_files = $(atc_der_files) $(atc_logic_files)
6216df5ccded056abd5db4abac4e5cbd78c73f45Evan Huntgendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
6216df5ccded056abd5db4abac4e5cbd78c73f45Evan Hunt Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
6216df5ccded056abd5db4abac4e5cbd78c73f45Evan Hunt Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Huntgen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Huntderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
56e30ebae6fdb0bdf94419caff3a43fb2d16c5dfEvan Hunt $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
c85920c0b4b2d4dc605c0b1d355881925bf410afMark Andrews OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
0612274565d80e0ad87a19920e561cce5bddb05bEvan Hunt# sources that have {-# OPTIONS -cpp #-}
0612274565d80e0ad87a19920e561cce5bddb05bEvan Hunt SoftFOL/Logic_SoftFOL.hs GUI/Utils.hs Driver/WriteFn.hs \
f592d2f76cac7115038124c510d2ba3050334b4dEvan Hunt Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
f592d2f76cac7115038124c510d2ba3050334b4dEvan Hunt Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
4ee1fbe056e812e661b856b4b448296331a40249Michał Kępień# unused, remove when header files are gone
4ee1fbe056e812e661b856b4b448296331a40249Michał Kępieńgenrule_header_files = $(wildcard ATC/*.header.hs)
1c8aa38b53a0494fc7d4c3439594d1913987f264Mark Andrewsnondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
43d53a4e4b2f0f9482485a8ab764137a9898ab32Evan Hunt $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
43d53a4e4b2f0f9482485a8ab764137a9898ab32Evan Hunt $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
b1ce9b3d54cd072adb5275f08a9afac31cfb4c1cMichał Kępień Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
b1ce9b3d54cd072adb5275f08a9afac31cfb4c1cMichał Kępieńhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
b1ce9b3d54cd072adb5275f08a9afac31cfb4c1cMichał Kępień# this variable holds the modules that should be documented
b1ce9b3d54cd072adb5275f08a9afac31cfb4c1cMichał Kępieńdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
5fa4be41a383cfbf5e1d195b18c04bdbf5603710Evan Hunttax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
5fa4be41a383cfbf5e1d195b18c04bdbf5603710Evan Hunt Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
2732d4922c2e72a399204320791acfd2fd3d6c7cMark Andrewstax_objects = $(patsubst %.hs, %.o, $(tax_sources))
24ffba17f06746257d5c009ca8ebfe6043966d20Evan Hunt####################################################################
24ffba17f06746257d5c009ca8ebfe6043966d20Evan Hunt.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
24ffba17f06746257d5c009ca8ebfe6043966d20Evan Hunt real_clean bin_clean package_clean distclean packages \
21d58795b10a13fa7ac306f7146bdcb58b2e5165Mark Andrews http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
21d58795b10a13fa7ac306f7146bdcb58b2e5165Mark Andrews check capa hacapa h2h h2hf showKP clean_genRules genRules \
d5bd8bb71a8970d4ebc4701b3e9ec3efef4954b7Evan Hunt derivedSources install_hets install release cgi ghci
d5bd8bb71a8970d4ebc4701b3e9ec3efef4954b7Evan Hunt.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
9519bb92d7f3f35015aecb84954dd21607cc2c80Evan Huntpackages: http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
1c81aef28ddf0905344cc58dd3ea0ca539ef1414Evan Hunt echo "of HTTP package found"; else \
a8fa3e2d44ce6a8f4069d8f4229d29f5ba6a4a27Mukund Sivaraman @if $(HCPKG) field syb-generics version; then \
a8fa3e2d44ce6a8f4069d8f4229d29f5ba6a4a27Mukund Sivaraman echo "of syb-generics package found"; else \
aae171c5421ac2ba665ff122e004e753e62bac45Mark Andrews echo "of shellac package found"; else \
5a8f2f0cd67a5dd93d95e6a0935d4805721c3a0bMichał Kępieńshread_pkg: utils/shread.tgz $(SETUP) shellac_pkg
5a8f2f0cd67a5dd93d95e6a0935d4805721c3a0bMichał Kępień @if $(HCPKG) field Shellac-readline version; then \
5a8f2f0cd67a5dd93d95e6a0935d4805721c3a0bMichał Kępień echo "of shellac-readline package found"; else \
e446fd29b9c6c4a7b6b5bb0aee3932578c346718Mukund Sivaraman echo "of hxt package found"; else \
b5252fcde512405a68dd4becfe683d9763bd0feaMukund Sivaraman echo "of HAIFA package found"; else \
a2a0100e0fc73c0af67a7c9e3524816954448dc6Evan Hunt @echo 'File : Maintainer' > $@
a2a0100e0fc73c0af67a7c9e3524816954448dc6Evan Hunt 'foreach my $$f (@ARGV) { open I, "<$$f"; \
1feffc6fdb1ba386b22d45ea2d2f1613e717cb9eMark Andrews print "$$f :"; while (<I>) \
1feffc6fdb1ba386b22d45ea2d2f1613e717cb9eMark Andrews { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
1feffc6fdb1ba386b22d45ea2d2f1613e717cb9eMark Andrews print " $$1" ; last} }; print "\n"; close I; }' \
22bed621ef87bc8b6c1fea599b02c4b38dd6bf48Mark Andrews @echo " done"
68d7ff133c9a1b8cfe683c70e997d83395ffd155Evan Hunt###############################
68d7ff133c9a1b8cfe683c70e997d83395ffd155Evan Hunt### count lines of code
e5f5675b1da287ed40aeff081ad2af86090e8d17Evan Hunt###############################
e5f5675b1da287ed40aeff081ad2af86090e8d17Evan Hunt### Documentation via haddock
29f0ced781d745591fd058e530a68a281cd7a510Evan Hunt# generate haddock documentation with links to sources
b9fd54f8d4572fe5dcaf9d4b74f6ecb8027cc450Evan Hunt# the interface treatment is stolen from uni/mk/suffix.mk
fcb5e646e4d775539e348fa21ba13307f2695bf5Mark Andrews HINTERFACES0=`find -L docs/www -name '*.haddock' \
a22c3cf51567651f74aee5c263c597b8d752c2ccMichał Kępień $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
b301c4293c082fcce4ec26218e6fad346976eb9eMark Andrews -t 'Hets - the Heterogeneous Tool Set' \
5c4e0c7800b5c7783e7f8b9ce80a6f8dc47f8856Mark Andrews# sources are not copied here
a64daf673deff2358a91bee26bbf2bf874f47c6eMark Andrews###############################
0aadc6dd7b719539445e7a0a058b15dd9d982a9bMichał Kępień### release management
0aadc6dd7b719539445e7a0a058b15dd9d982a9bMichał KępieńderivedSources: $(derived_sources) $(hspp_sources)
f20ff8b74d21fa3e3f071544f6fd060d015cf27eMichał Kępień (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
7ff682f3c628d785048bbe0242e6a32ea26c6747Michał Kępień $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
7ff682f3c628d785048bbe0242e6a32ea26c6747Michał Kępień GenerateRules.hs -o ../genRules && strip ../genRules)
e02fa56849131911e9554133b17a5325b37d0828Michał Kępień# "-package hssource" for ghc-5.04.2
abcea74291c37abf68be4e06997c59e5494f06adMark Andrews $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
d748d8a4afc200800f6289683361a393b15ba6bfMichał Kępień# set this variable from the command line to i,e. RELEASETAG='-rrelease-0-7'
324b00ad4950b00346f5ba2382a51709bd82afe9Mark Andrews svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/trunk Hets
296f5969a8dd6e3d1bb3761569c6a7070abd2e47Tinderbox User if [ -d ../uni ] ; then ln -s ../uni uni ; fi
4dc6fa1e92af7a62875b6f6f2931beefd58cb4faEvan Hunt if [ -d ../programatica ] ; then \
b81b178ab919bdbd92021cfc7e6e8d971cd38e83Mark Andrews ln -s ../../programatica/tools programatica/tools ; fi
b81b178ab919bdbd92021cfc7e6e8d971cd38e83Mark Andrews (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
7dbeb5e7f067585abfb12fac314a0d2a8f0dd040Evan Hunt find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
6e10f87913db176724e89b52e686b0992898da75Mukund Sivaraman cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
36babd3e630f507843c423207cbbbd4758d7cffaTinderbox User ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
4162d3b36d1a3c25724c7e37ce839f67b2352bbbMark Andrewspack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
ce6f0c122140647b5652c0d4de523c994fcfea08Michał Kępień ## TODO: add more dependencies and use hets-opt
f72f5879424ce4081893b306b8c31f29fe9205e0Evan Hunt# compile $< -b . -k web -o $@
f72f5879424ce4081893b306b8c31f29fe9205e0Evan Hunt###################################
1073e2001caee13cc1fa52de97feddd633d50fd8Evan Huntpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
78608b0a454246d0e1e0169f1d671b8427e48199Francis Dupont pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
11c4e6d8fcc9bc148543c1ee632315e096d2bcf2Michał Kępień @echo -n "Generating pretty/LaTeX_maps.hs ... "
11c4e6d8fcc9bc148543c1ee632315e096d2bcf2Michał Kępień @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
11c4e6d8fcc9bc148543c1ee632315e096d2bcf2Michał Kępień @(cd pretty >/dev/null; ../utils/genItCorrections \
59122481b2aa65de4518677c6949f03711d2553aEvan Hunt @echo "ready"
59122481b2aa65de4518677c6949f03711d2553aEvan Hunt @echo "please copy the file manually to Common"
fe6d2fd8338d6f6ac4c79bea9a8daad903460040Evan Hunt#############################
fe6d2fd8338d6f6ac4c79bea9a8daad903460040Evan Hunt### ATC DrIFT-rule generation
05a456499af940762d6658366abafb220c5053ccMark Andrews $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
cb4e0ef4e2c8a942f99af6ecc6aa564c903b00a0Mark AndrewsPropositional/ATC_Propositional.der.hs: $(Propositional_files) \
cb4e0ef4e2c8a942f99af6ecc6aa564c903b00a0Mark Andrews $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ \
e3efc855f9f0acc9b14bb8e9c833e0fa209068b6Mark AndrewsHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
e56c0854589d936f911e0aac2f2bf53cbc8a6af7Michał Kępień $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
e56c0854589d936f911e0aac2f2bf53cbc8a6af7Michał KępieńIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
6727802528c27484e0d36d70f0b936022d3226e3Michał Kępień $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
6727802528c27484e0d36d70f0b936022d3226e3Michał KępieńModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
6727802528c27484e0d36d70f0b936022d3226e3Michał Kępień $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
4d41be5f9e86c11a6f00e2b005cfc5abae2c1ab3Mark AndrewsConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
bfde61d5194a534d800f3b90008d1f52261922c5Mark Andrews $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
bfde61d5194a534d800f3b90008d1f52261922c5Mark AndrewsCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
42ae02626d05921ca7508ae6f9c48ea699596bc6Mark Andrews $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
6b56350522d18f10edbf2d3778cd0fea74e4f3d2Mark AndrewsCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
42ae02626d05921ca7508ae6f9c48ea699596bc6Mark Andrews $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
16f43564c6875e2bedd346c18c494933ad51e4faMukund SivaramanCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
16f43564c6875e2bedd346c18c494933ad51e4faMukund Sivaraman $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
16f43564c6875e2bedd346c18c494933ad51e4faMukund SivaramanCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
16f43564c6875e2bedd346c18c494933ad51e4faMukund Sivaraman $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
72b322cde0e51c4c87df0c9e3226deac95dfb4ceMark AndrewsSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
28ea558bc80f75e46d77ea0533232bb9d4e644f7Mark Andrews $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
8ed6c49f1a7f06d3ed39bee7731ff91d8dfd8dc7Mark AndrewsOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
8ed6c49f1a7f06d3ed39bee7731ff91d8dfd8dc7Mark Andrews $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
6045abbc9a0d7d449a13b6fbfbf32d419b6bee96Mark Andrews $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
f7d148398ca4511551c737e655b15f7d0d59a783Mark Andrews###############
398834f7559617bdfd6c10ba555609a2f306e3d4Mark Andrews### removes *.hi and *.o in all include directories
398834f7559617bdfd6c10ba555609a2f306e3d4Mark Andrews find . -name \*.o -o -name \*.hi | xargs $(RM) -r
398834f7559617bdfd6c10ba555609a2f306e3d4Mark Andrews### remove binaries
d315545e6db6792692fe2dcb788ac6717a33b75fEvan Hunt### additionally removes the library files
d315545e6db6792692fe2dcb788ac6717a33b75fEvan Hunt### clean user packages
00f131293520b70728cd48840e09953fa45a745bMark Andrews $(HCPKG) unregister programatica --user || exit 0
b2e71853060a384070d422afda6d1c692ff608e3Mark Andrews $(HCPKG) unregister Shellac-readline --user || exit 0
b2e71853060a384070d422afda6d1c692ff608e3Mark Andrews $(HCPKG) unregister syb-generics --user || exit 0
42c1acfa478aacfbda2d298cf74a137de2df4b87Michał Kępień### additionally removes generated files not in the CVS tree
214b53880b6d77359f60feccb91bd2589059300aEvan Hunt $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
dd5375de0a7a515ee4fb2fd217e9577259d38c07Mark Andrews $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
dd5375de0a7a515ee4fb2fd217e9577259d38c07Mark Andrews $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
3a58e1fefb0a9fd5dab11f271a320c6b90473f76Mukund Sivaraman $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
7c67b8c2b076971e6a9f8b0db932201366f13d47Mark Andrews####################################################################
7c67b8c2b076971e6a9f8b0db932201366f13d47Mark Andrews### test targets
5aed5dc329a2bf1340e9ff2256c1cf4e3005ea0bMark Andrews####################################################################
387f5e872d40426acbc739d2e9b2bb37c123dd56Mark Andrews### interactive
387f5e872d40426acbc739d2e9b2bb37c123dd56Mark Andrews### christian's target
3440cf9c60cd5d35634e7f274fd3eccbba2173a5Evan Hunt### CASL parser
387f5e872d40426acbc739d2e9b2bb37c123dd56Mark Andrews### Annos parser
032d2134a4c1808696688db9bf6f20253e5d05b5Mark Andrews### CASL parser
fb9ef31fed818384ef8997f2dc5f27252c6f767eEvan Hunt### HasCASL parser
823ccd1f02802966395d58c916e9f988320fd6eeEvan Hunt### Haskell analysis
b6fa637fc8c92f42a21e6f97259598968717af3dEvan Hunt### Haskell to Isabelle-HOLCF translation
b6fa637fc8c92f42a21e6f97259598968717af3dEvan HuntHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
ace5680c122ef239e64eec1120f13f5a7f087d79Mark Andrews $(HC) -O --make -o $@ $< $(HC_FLAGS) $(PFE_FLAGS)
59d940391ce90963cd3f4b22201b3fca2ffda22aMark Andrews### HasCASL to Haskell translation
6b432e11497f905a6b6f048df3e8a01ce8abbb1eMark Andrews### test program to check the known provers
cb9345c996de9d9c990009f14fc83fbbe9c5e3e6Mark Andrews### run tests in other directories
cb9345c996de9d9c990009f14fc83fbbe9c5e3e6Mark Andrews for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
c935952ede45595a821cfed7f73b57f3b239ca2bMark Andrews####################################################################
c935952ede45595a821cfed7f73b57f3b239ca2bMark Andrews## Preparing the version of Hets
9604a49da0130534f2f4aaa0cbfa78b5f589196fMark Andrews LANG=C $(PERL) utils/build_version.pl version_nr \
c83a3061551c86bd661839be935de061f7322f5cEvan Hunt## two hardcoded dependencies for a correct generation of Version.hs
c83a3061551c86bd661839be935de061f7322f5cEvan HuntDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
ac9072210cea5283e554f1787876b647a08fda96Mark Andrews## two dependencies for avoidence of circular prerequisites
ac9072210cea5283e554f1787876b647a08fda96Mark AndrewsCASL_DEPENDENT_BINARIES= hets CASL/capa CASL/fromKif \
512765ba1e3f0b29e2c1ae4b0138838c6422f2bdEvan Hunt Common/annos Common/test_parser Comorphisms/test/showKP \
512765ba1e3f0b29e2c1ae4b0138838c6422f2bdEvan Hunt CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
27a262bc4d38c7a8230677ac2685ec7a4f509f70Mark Andrews Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
27a262bc4d38c7a8230677ac2685ec7a4f509f70Mark Andrews$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
27a262bc4d38c7a8230677ac2685ec7a4f509f70Mark Andrews####################################################################
3b38e4b8344cb3bb28f2b116d2e39f8371ef8e34Mukund Sivaraman## rules for DrIFT
0d24df5c0b2f9546f403113df8ac4457223bc92fEvan Hunt echo "{-# OPTIONS -w #-}" > $@
9689922a0d936b04feb418fbaf4c1420f745ea58Mark Andrews ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
02989eceeff85cd6c5dd31848a12674f74bba7cfEvan Hunt## rules for inlineAxioms
8b9c4592ed718c4187971f1104381faf538bf4f7Evan Hunt## rule for cpp and haddock
8b9c4592ed718c4187971f1104381faf538bf4f7Evan Hunt -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
264e17e73941059877ccf3c96f26aac15a25500bMukund Sivaraman## compiling rules for object and interface files
eeb16584fbd3564136cb4c950fc5e1b54690de68Mukund Sivaraman## compiling rules for dependencies
9540b42695c15fdd5f01b4c663e21936e6c38c82Mukund Sivaraman## generate the inline file for the predefined CASL_DL sign
9540b42695c15fdd5f01b4c663e21936e6c38c82Mukund Sivaraman# Warning: Don't change the order of the depencies!!
fec9247b8f1ab52e999643ae03f0550387ec359fMukund Sivaraman CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
fec9247b8f1ab52e999643ae03f0550387ec359fMukund Sivaraman utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
0d7548ee341c83c540624a423e2c701b6e9ddc4eEvan Hunt echo " )" >> $@
527163f0e5e8639bcceb7fe52387285042f5b24cEvan HuntCASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
4c432aae90bc9b220725ca7df5a6af40cf4c74b3Mark Andrews## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
4c432aae90bc9b220725ca7df5a6af40cf4c74b3Mark Andrews# uses intransparently utils/outlineAxioms
3195754154292f0651c195433607696a259a98e2Evan HuntModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
fd0d60b3a0139c040fedb0bb765fd9667831412eMark Andrews @if [ -d $(INSTALLER_DIR) ] ; then \
1bce43adcc11d21afaf645cbe466553aabc725b2Mark Andrews @sed "s/^\(HETS_VERSION=\).*/\1`cat version_nr`/" Makefile.installer > Makefile.inst ;\
da4823c08a9a41e7b5ff1f3a83c80007f60fd21cMark Andrews sed "s/^\(SPASS_DIR_MAC=\).*/\1`ls utils/SPASS-ppc-mac/ | grep SPASS`/" Makefile.inst > Makefile.inst2 ;\
52cae869e0296713b764f6065bdad80832d4c493Mark Andrews @echo =========================================================================
52cae869e0296713b764f6065bdad80832d4c493Mark Andrews @echo If you have not logged in \'cvs.haskell.org\' and \'cvs-agbkb.informatik.uni-bremen.de\'
52cae869e0296713b764f6065bdad80832d4c493Mark Andrews @echo "then please first login:"
403e7b451207fe6514a5d641562713b1af233b9cEvan Hunt @echo " cvs -d :pserver:anoncvs@cvs.haskell.org:/cvs login"
403e7b451207fe6514a5d641562713b1af233b9cEvan Hunt @echo " the password is cvs"
403e7b451207fe6514a5d641562713b1af233b9cEvan Hunt @echo " cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository login "
62b5dd5b09cb575281f8193476b58a4bd9870fc9Evan Hunt @echo " the password is "
62b5dd5b09cb575281f8193476b58a4bd9870fc9Evan Hunt @echo =========================================================================
8c31a25f3ff5d6783c7add7c887e52f7031d173dMark Andrews @echo " -> make"