Makefile revision d9da9c9694b088b3472513ec9b48b248e5e44be7
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# This Makefile will compile the new hets system and provides also
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# targets for test programs during implementation phases.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# !!! Note: This makefile is written for GNU make !!!
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# (gmake on solaris)
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy####################################################################
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy## Some varibles, which control the compilation
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyINCLUDE_PATH = hxt syb-generics haifa-lite/src hcl/src
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyHXT_PATHS = Data Data/Tree Data/Tree/NTree Data/Digest Text Text/XML \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Text/XML/HXT Text/XML/HXT/IO Text/XML/HXT/DOM Text/XML/HXT/Arrow \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Text/XML/HXT/XPath Text/XML/HXT/Validator Text/XML/HXT/Parser \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Text/XML/HXT/RelaxNG Text/XML/HXT/ProtocolHandler Codec Codec/ASN1 \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Codec/Binary Codec/Encryption Codec/Encryption/RSA System Control \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy CspCASL ATC Proofs Comorphisms Isabelle Driver \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Taxonomy CASL_DL SPASS OWL_DL OMDoc $(PFE_PATHS) \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy hcl/src/Data syb-generics/Data syb-generics/Data/Generics2 \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy $(addprefix haifa-lite/src/, $(HAIFA_PATHS))
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# the 'replacing spaces' example was taken from the (GNU) Make info manual
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy## set ghc imports properly for your system
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyGHC_IMPORTS = `$(HC) --print-libdir`/imports
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# import directories for ghc-5.04.2
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# override on commandline for other architectures
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Common/Doc.hs CASL/Print_AS_Basic.hs Modal/AS_Modal.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren KennedyGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy -i Common.DynamicUtils -i Common.ATerm.Lib
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# remove -fno-warn-orphans for older ghcs and add -ifgl
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy -fallow-overlapping-instances -fallow-undecidable-instances
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# -ddump-minimal-imports
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# flags also come in via ../uni/uni-package.conf
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# but added it here in case of compilation without uni
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedylogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# some modules from uni for haddock
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy# if uni/server is included also HaXml sources are needed
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy ../uni/reactor ../uni/util ../uni/posixutil
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy### list of directories to run checks in
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyPFE_TOOLDIR = $(wildcard ../programatica/tools)
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy base/transforms base/transforms/Deriving property \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy property/syntax property/AST property/transforms \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy property/TI property/defs property/parse2 property/parse2/Parser
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedypfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren KennedyPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedyhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy echo "{-# OPTIONS -w #-}" > $@
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
$@.hs -o $@
strip $@
$(APPENDPRELUDESTRING) < $< > $@
#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
$(wildcard syb-generics/Data/Generics2/*.hs) \
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
$(RM) $@
cgi:
# "HetCATS/hetcats.TAGS"
@$(PERL) -e \
$(sources) >> $@
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
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) $@