Makefile revision 83394c6b6e6de128e71b67c9251ed7a84485d082
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# This Makefile will compile the new hets system and provides also
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# targets for test programs during implementation phases.
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# !!! Note: This makefile is written for GNU make !!!
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# (gmake on solaris)
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen####################################################################
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen## Some varibles, which control the compilation
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen fgl/Data/Graph/Inductive fgl/Data/Graph/Inductive/Internal \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen fgl/Data/Graph/Inductive/Monad fgl/Data/Graph/Inductive/Query
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenCLEAN_PATH = . utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Syntax Static GUI HasCASL Haskell Modal CoCASL COL \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen CspCASL ATC ToHaskell Proofs Comorphisms Isabelle Driver \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# the 'replacing spaces' example was taken from the (GNU) Make info manual
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen## set ghc imports properly for your system
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# import directories for ghc-5.04.2
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen DERIVEPATH=.:ghc:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# override on commandline for other architectures
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Common/Lib/Pretty.hs Common/Keywords.hs Common/Lib/Set.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Common/Lib/Map.hs Common/Lib/Rel.hs Common/Lib/State.hs Common/Id.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs CASL/ShowMixfix.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen CASL/Utils.hs Common/Lexer.hs Common/Token.hs Common/Anno_Parser.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Common/GlobalAnnotations.hs Common/PrettyPrint.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Common/Print_AS_Annotation.hs Common/PPUtils.hs CASL/LiteralFuns.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen CASL/Print_AS_Basic.hs Common/AnnoState.hs CASL/Formula.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Common/ConvertLiteral.hs Common/Earley.hs CASL/MixfixParser.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen CASL/Parse_AS_Basic.hs CASL/Sign.hs CASL/Overload.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen CASL/StaticAna.hs Modal/AS_Modal.hs Modal/Parse_AS.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenGENRULECALL = $(GENRULES) -r ShATermConvertible -i Common.ATerm.Lib
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# remove -fno-warn-orphans for older ghcs
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenHC_FLAGS = $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen -fallow-overlapping-instances -fallow-undecidable-instances
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# -ddump-minimal-imports
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# flags also come in via ../uni/uni-package.conf
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# but added it here in case of compilation without uni
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# some modules from uni for haddock
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen# if uni/server is included also HaXml sources are needed
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen### list of directories to run checks in
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenPFE_TOOLDIR = $(wildcard ../programatica/tools)
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen base/transforms base/transforms/Deriving property \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen property/syntax property/AST property/transforms \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen property/TI property/defs property/parse2 property/parse2/Parser
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo SirainenPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen patch -sNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen echo "{-# OPTIONS -w #-}" > $@
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainen -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
fdc557286bc9f92c5f3bb49096ff6e2bcec0ea79Timo Sirainenderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
$(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; \
### also delete *.d.bak (dependency file backups)
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) $@