Makefile revision c1bf9cc3bc3729b0bf925be3be123cbb59bea2a6
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# This Makefile will compile the new hets system and provides also
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# targets for test programs during implementation phases.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# !!! Note: This makefile is written for GNU make !!!
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# (gmake on solaris)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster####################################################################
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster## Some varibles, which control the compilation
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster CspCASL ATC Proofs Comorphisms Isabelle Driver \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Taxonomy CASL_DL SPASS OWL_DL OMDoc PGIP Propositional
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# the 'replacing spaces' example was taken from the (GNU) Make info manual
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster## set ghc imports properly for your system
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# import directories for ghc-5.04.2
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# override on commandline for other architectures
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# remove -fno-warn-orphans for older ghcs and add -ifgl
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster $(HC_WARN) -fglasgow-exts -fallow-overlapping-instances
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterHC_OPTS_MAC := $(if $(findstring Darwin,$(shell uname -s)), \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -optl-F$(HOME)/Library/Frameworks -optl-framework -optlGNUreadline,)
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# -ddump-minimal-imports
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# flags also come in via ../uni/uni-package.conf
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# but added it here in case of compilation without uni
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster SPASS/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# some modules from uni for haddock
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster# if uni/server is included also HaXml sources are needed
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosteruni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosteruni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster### list of directories to run checks in
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster base/transforms base/transforms/Deriving property \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster property/syntax property/AST property/transforms \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster property/TI property/defs property/parse2 property/parse2/Parser
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
8af80418ba1ec431c8027fa9668e5678658d3611Allan FosterPFE_FLAGS = -package programatica -DPROGRAMATICA
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster @if $(HCPKG) field programatica version; then \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster echo "of programatica package found"; else \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster -i `pwd`/Haskell/Programatica.patch || exit 0); \
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster cp -f utils/programatica.cabal ../programatica/tools; \
$@.hs -o $@
strip $@
$(RM) $@
$(APPENDPRELUDESTRING) < $< > $@
#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
cpp_sources = \
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
$(RM) $@
cgi:
@$(PERL) -e \
$(sources) >> $@
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
-i../.. -o $(INLINEAXIOMS)
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 \
$(GENRULES)
-o $@ $(OWL_DL_files)
$(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) $@
@if [ -d $(INSTALLER_DIR) ] ; then \
sed "s/^\(SPASS_DIR_MAC=\).*/\1`ls utils/SPASS-ppc-mac/ | grep SPASS`/" Makefile.inst > Makefile.inst2 ;\
@echo Please do