Makefile revision 8be81a0578b59f08641da7fad1479e1f9e83c6e9
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# This Makefile will compile the new hets system and provides also
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# targets for test programs during implementation phases.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# !!! Note: This makefile is written for GNU make !!!
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# (gmake on solaris)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews####################################################################
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews## Some varibles, which control the compilation
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the 'replacing spaces' example was taken from the (GNU) Make info manual
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# override on commandline for other architectures
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# list glade files
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewslogics = CASL HasCASL Isabelle Modal Temporal CoCASL COL CspCASL CASL_DL \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews SoftFOL ConstraintCASL Propositional OWL RelationalScheme VSE OMDoc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews### list of directories to run checks in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewshs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews base/transforms base/transforms/Deriving property \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews property/syntax property/AST property/transforms \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews property/TI property/defs property/parse2 property/parse2/Parser
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewspfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewshappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews @if $(HCPKG) field programatica version; then \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews echo "of programatica package found"; else \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -i `pwd`/Haskell/Programatica.patch || exit 0); \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -f utils/programatica.cabal ../programatica/tools; \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews echo "{-# OPTIONS -w #-}" > $@
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews $(HC) --make -fno-monomorphism-restriction -O \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews## rule for appendHaskellPreludeString
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews base/parse2/SourceNames base/syntax/SyntaxRec \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark Andrews## rule for ATC generation
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark AndrewsHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark Andrews $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# remove -fno-warn-orphans for older ghcs and add -ifgl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# INCLUDE_PATH =
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# uncomment for profiling (and comment out packages un var,mk)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# call resulting binary with a final +RTS -p to get a file <binary>.prof
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# -ddump-minimal-imports
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# uncomment to above line to generate .imports files for displayDependencyGraph
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews####################################################################
285254345ce5ab270848f8c11f7be146793f1e00Mark Andrews## sources for hets
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsnon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewssources = hets.hs $(filter-out $(non_sources), \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
3b4098640dd85040270f39b9a5ee5e22de99d3d6Mark Andrews CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ATC/$(basename $(basename $(notdir $(file)))).der.hs)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(GENRULECALL) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(GENRULECALL) -x Logic.Prover.ProverTemplate \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(GENRULECALL) -i ATC.LibName -i ATC.Grothendieck -o $@ $<
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTemporal_files = Temporal/AS_BASIC_Temporal.hs Temporal/Sign.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
cgi:
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules)
-i../.. -o $(INLINEAXIOMS)
if [ -d ../programatica ] ; then \
./clean.sh; \
### Common/LaTeX_maps.hs generation
@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) $@
@echo Please do