Makefile revision c90087f49069855bf684b699f9ca1e2d65eac20b
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
7270737ca9bfa3c5f067e6377068aa597687d094Bob Halley# This Makefile will compile the new hets system and provides also
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence# targets for test programs during implementation phases.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# !!! Note: This makefile is written for GNU make !!!
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# (gmake on solaris)
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews####################################################################
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews## Some varibles, which control the compilation
f41f183f628a148860a6d1f0070208cddd45b0c6Bob HalleyCLEAN_PATH = . hxt/Data hxt/Text/XML/HXT/DOM hxt/Text/XML/HXT/Parser \
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
f41f183f628a148860a6d1f0070208cddd45b0c6Bob Halley Syntax Static GUI HasCASL Haskell Modal CoCASL COL \
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley CspCASL ATC ToHaskell Proofs Comorphisms Isabelle Driver \
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley# the 'replacing spaces' example was taken from the (GNU) Make info manual
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley## set ghc imports properly for your system
12178c86525332bb0ab66155feb61fbf32eca6acEvan Hunt# import directories for ghc-5.04.2
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob HalleyGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence DERIVEPATH=.:ghc:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
9403a56228ea64101e082720fd276a8bda16cfe1Michael Graff# override on commandline for other architectures
890fb60939f93161ca0c63e19c7154eaf3fed156Michael Graff /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
fc80027fb54b501cdd88461bf879d078259e0226David LawrenceGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob HalleyINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
5c02d3183f46ba8621a4bdecc71facda5f8e0717Michael Graff Common/Lib/Pretty.hs Common/Keywords.hs Common/Lib/Set.hs \
76117ff568dc788ed24937cfea916a18db285960Mark Andrews Common/Lib/Map.hs Common/Lib/Rel.hs Common/Lib/State.hs Common/Id.hs \
76117ff568dc788ed24937cfea916a18db285960Mark Andrews Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs CASL/ShowMixfix.hs \
76117ff568dc788ed24937cfea916a18db285960Mark Andrews CASL/Utils.hs Common/Lexer.hs Common/Token.hs Common/Anno_Parser.hs \
5c02d3183f46ba8621a4bdecc71facda5f8e0717Michael Graff Common/GlobalAnnotations.hs Common/PrettyPrint.hs \
3935db0f04b359bec3dba46dec5c32aa5c20e9aaDavid Lawrence Common/Print_AS_Annotation.hs Common/PPUtils.hs CASL/LiteralFuns.hs \
4acd8d2afea04e26428e2133121cf32083641dc5David Lawrence CASL/Print_AS_Basic.hs Common/AnnoState.hs CASL/Formula.hs \
4acd8d2afea04e26428e2133121cf32083641dc5David Lawrence CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
af97e49f21606e83c6daf67688aabe5de47925f5David Lawrence Common/ConvertLiteral.hs Common/Earley.hs CASL/MixfixParser.hs \
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence CASL/Parse_AS_Basic.hs CASL/Sign.hs CASL/Overload.hs \
2e511564c57225c5b2546220b8d793512bd24204Michael Graff CASL/StaticAna.hs Modal/AS_Modal.hs Modal/Parse_AS.hs \
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉 Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
b015e6b3e188278ba8fd7c9260fa8c725c11a223Michael GraffGENRULECALL = $(GENRULES) -r ShATermConvertible -i Common.ATerm.Lib
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrews# remove -fno-warn-orphans for older ghcs
fc80027fb54b501cdd88461bf879d078259e0226David Lawrence $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
694c897b20f06f8a5349fd9ac5df93947f6f5a2aBob Halley -fallow-overlapping-instances -fallow-undecidable-instances
2eb6a502bcb30f5738bf7fe871f5000ba24b1f19Tatuya JINMEI 神明達哉# -ddump-minimal-imports
2eb6a502bcb30f5738bf7fe871f5000ba24b1f19Tatuya JINMEI 神明達哉# flags also come in via ../uni/uni-package.conf
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews# but added it here in case of compilation without uni
186e7f37c9fc985a7a7264cc8170e48a25bed434Mark Andrewslogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS OWL_DL
18d0b5e54be891a1aa938c165b6d439859121ec8Mark AndrewsUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉HC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley# some modules from uni for haddock
f56be26f602515886d265f608442deb384934b72Mark Andrews# if uni/server is included also HaXml sources are needed
f56be26f602515886d265f608442deb384934b72Mark Andrewsuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
de05f7d061abfe0ce555e0d0f2089f1261b031b6Mark Andrewsuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley### list of directories to run checks in
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob HalleyPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
139154bd9894495042f4e748f554e9c8b98b7598Bob Halley base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley base/transforms base/transforms/Deriving property \
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉 property/syntax property/AST property/transforms \
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉 property/TI property/defs property/parse2 property/parse2/Parser
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉PFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉pfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
fd35453765c6494d077edca44f4d998af5fd4cfaDavid LawrencePFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halleyhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉 patch -sNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉 echo "{-# OPTIONS -w #-}" > $@
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halleyderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉APPENDPRELUDESTRING = utils/appendHaskellPreludeString \
$(APPENDPRELUDESTRING) < $< > $@
$(GENRULECALL) -o $@ $<
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
$(RM) $@
# "HetCATS/hetcats.TAGS"
@$(PERL) -e \
$(sources) >> $@
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
if [ -d ../programatica ] ; then \
./clean.sh; \
-o $@ $(OWL_DL_files)
ghci:
ToHaskell/h2hf: ToHaskell/h2hf.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs Isabelle/*.hs Common/*.hs
### ATerm.Lib test system
$(RM) $@
## two hardcoded dependencies for a correct generation of Version.hs
.SUFFIXES:
%: %.hs
%.hs: %.y
$(RM) $@
$(RM) $@
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
$(RM) $@