Makefile revision 809f779e1f197b18e3ce57e6ed37c00817298721
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Makefile
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# $Id$
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Year: 2004
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# This Makefile will compile the new hets system and provides also
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# targets for test programs during implementation phases.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# !!! Note: This makefile is written for GNU make !!!
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# (gmake on solaris)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteall: hets
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte####################################################################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## Some varibles, which control the compilation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINCLUDE_PATH =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Text/XML/Serializer
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore
e4dcf6b386220918d8a355e951a2d7e8a73e5a6dTony NguyenSOURCE_PATHS = . utils/itcor \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte DL VSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# the 'replacing spaces' example was taken from the (GNU) Make info manual
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteempty =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortespace = $(empty) $(empty)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# override on commandline for other architectures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINSTALLDIR = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDRIFT_deps = utils/DrIFT-src/*hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHC = ghc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHCPKG = ghc-pkg
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePERL = perl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHAPPY = happy -sga
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGENRULES = utils/genRules
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -i Data.Typeable -i Common.ATerm.Lib
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDRIFT = utils/DrIFT
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINLINEAXIOMS = utils/outlineAxioms
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHADDOCK = haddock
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam CramerOSBYUNAME = $(shell uname)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifneq ($(findstring SunOS, $(OSBYUNAME)),)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTAR = gtar
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteelse
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTAR = tar
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteARCH = $(subst $(space),,$(shell uname -m))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSETUP = utils/Setup
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSETUPPACKAGE = ../$(SETUP) clean; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ../$(SETUP) configure -p $(SETUPPREFIX) --user; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifneq ($(findstring 1.13., $(HAXMLVERSION)),)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHAXML_PACKAGE = -package HaXml -DHAXML_PACKAGE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# remove -fno-warn-orphans for older ghcs and add -ifgl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHC_WARN = -Wall -fno-warn-orphans
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHC_FLAGS = $(HC_WARN) -fglasgow-exts -fallow-overlapping-instances
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# -ddump-minimal-imports
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# uncomment to above line to generate .imports files for displayDependencyGraph
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortelogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ConstraintCASL Propositional OWL DL RelationalScheme VSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SoftFOL/dfg.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifneq ($(strip $(UNI_PACKAGE_CONF)),)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -package uni-server -DUNI_PACKAGE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# some modules from uni for haddock
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# if uni/server is included also HaXml sources are needed
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ../uni/reactor ../uni/util ../uni/posixutil
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(wildcard ../uni/htk/haddock/*/*.hs)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTESTTARGETFILES += OWL/OWL11Parser.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Taxonomy/taxonomyTool.hs SoftFOL/tests/CMDL_tests.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Static/test/TestDGTrans.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteendif
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### list of directories to run checks in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTESTDIRS += Common CASL HasCASL test
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePFE_TOOLDIR = $(wildcard ../programatica/tools)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteifneq ($(strip $(PFE_TOOLDIR)),)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte base/transforms base/transforms/Deriving property \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte property/syntax property/AST property/transforms \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte property/TI property/defs property/parse2 property/parse2/Parser
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortepfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePFE_PATH = $(addprefix -i, $(PFE_PATHS))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePFE_FLAGS = -package programatica -DPROGRAMATICA
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(LEX_DIR)/HsLex.hs $(SETUP)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field programatica version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of programatica package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (patch -usNlp0 -d $(PFE_TOOLDIR) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -i `pwd`/Haskell/Programatica.patch || exit 0); \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cp -f utils/programatica.cabal ../programatica/tools; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cp -f $(SETUP) ../programatica/tools; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd ../programatica/tools; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ./Setup configure $(SETUPPREFIX); \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ./Setup build; ./Setup install --user) fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "{-# OPTIONS -w #-}" > $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $< >> $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(LEX_DIR)/HsTokens.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(HC) --make -fno-monomorphism-restriction -O \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -i$(PFE_TOOLDIR)/base/lib \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $@.hs -o $@
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappan strip $@
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappan
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappanlogics += Haskell
c946faca5d4627284fb79c6b04e652b471034495allanderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
c946faca5d4627284fb79c6b04e652b471034495allan $(LEX_DIR)Gen/HsLexerGen
c946faca5d4627284fb79c6b04e652b471034495allan
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(HC) --make -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Haskell/ProgramaticaPrelude.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## rule for appendHaskellPreludeString
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(APPENDPRELUDESTRING)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(RM) $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(APPENDPRELUDESTRING) < $< > $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte chmod 444 $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte HsModule HsName HsLiteral HsIdent
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allan#files in base/TI/
c946faca5d4627284fb79c6b04e652b471034495allan#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allan#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allanOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
c946faca5d4627284fb79c6b04e652b471034495allan base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
c946faca5d4627284fb79c6b04e652b471034495allan base/parse2/SourceNames base/syntax/SyntaxRec \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte property/syntax/PropSyntaxStruct
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHaskell_files = $(addsuffix .hs, \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## rule for ATC generation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore
3fb517f786391b507780c78aabb8d98bfea9efe9James Moorehs_der_files += $(hs_clean_files)
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore
3fb517f786391b507780c78aabb8d98bfea9efe9James MooreTESTDIRS += ToHaskell
3fb517f786391b507780c78aabb8d98bfea9efe9James MooreTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
3fb517f786391b507780c78aabb8d98bfea9efe9James Mooreendif
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
162fafd3d0764eb6022fe01ce970de8775eda209allan### Profiling (only for debugging)
162fafd3d0764eb6022fe01ce970de8775eda209allan### Attention every module must be compiled with profiling or the linker
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### cannot link the various .o files properly. So after switching on
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### Profiling, do an 'gmake real_clean; gmake'
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### Comment in the following line for switching on profiling.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam CramerHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PROF) $(HAXML_PACKAGE) $(HC_PACKAGE) \
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer $(PFE_FLAGS) -DCASLEXTENSIONS -threaded
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte####################################################################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## sources for hets
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortenon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(SETUP).hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesources = hets.hs $(filter-out $(non_sources), \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteobjects = $(sources:%.hs=%.o)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortedrifted_files = Common/AS_Annotation.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CASL/AS_Basic_CASL.hs Modal/AS_Modal.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Propositional/AS_BASIC_Propositional.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CoCASL/AS_CoCASL.hs COL/AS_COL.hs ConstraintCASL/AS_ConstraintCASL.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CASL_DL/AS_CASL_DL.hs OWL/ReadWrite.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte DL/AS.hs RelationalScheme/AS.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(gendrifted_files)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Logic/Prover.hs Common/ExtSign.hs Static/DevGraph.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteatc_der_files = $(foreach file, $(atc_files), \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ATC/$(basename $(basename $(notdir $(file)))).der.hs)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/Id.der.hs: Common/Id.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/Result.der.hs: Common/Result.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
c946faca5d4627284fb79c6b04e652b471034495allan $(GENRULECALL) -o $@ $<
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allanATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
162fafd3d0764eb6022fe01ce970de8775eda209allan $(GENRULECALL) -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -x Logic.Prover.ProverTemplate \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -i ATC.AS_Annotation -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.AS_Library -i ATC.Grothendieck -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CASL/AS_Basic_CASL.der.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteIsabelle_files = Isabelle/IsaSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Propositional/Sublogic.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDL_files = DL/AS.hs DL/Sign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOL_files = COL/AS_COL.hs COL/COLSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CspCASL/SignCSP.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSoftFOL_files = SoftFOL/Sign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteOWL_files = OWL/Sign.hs
c946faca5d4627284fb79c6b04e652b471034495allanVSE_files = VSE/As.hs
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allanatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allangenerated_rule_files = $(atc_der_files) $(atc_logic_files)
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allangendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
c946faca5d4627284fb79c6b04e652b471034495allan
c946faca5d4627284fb79c6b04e652b471034495allaninline_axiom_files = Comorphisms/CASL2PCFOL.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortegen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortederived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# sources that have {-# OPTIONS -cpp #-}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortecpp_sources = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CASL/Logic_CASL.hs Isabelle/CreateTheories.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SoftFOL/Logic_SoftFOL.hs GUI/Utils.hs Driver/WriteFn.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Propositional/Logic_Propositional.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte PGIP/InfoCommands.hs OWL/Logic_OWL11.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# unused, remove when header files are gone
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortegenrule_header_files = $(wildcard ATC/*.header.hs)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortenondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang $(wildcard utils/DrIFT-src/*.lhs) \
e4dcf6b386220918d8a355e951a2d7e8a73e5a6dTony Nguyen $(wildcard utils/GenerateRules/*.hs) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(wildcard utils/InlineAxioms/*.hs) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(wildcard utils/itcor/*.hs) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(genrule_header_files) $(generated_rule_files) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Modal/GeneratePatterns.inline.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SoftFOL/MathServCommunication.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(patsubst %.hs, %.der.hs, $(drifted_files))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# this variable holds the modules that should be documented
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortedoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetax_objects = $(patsubst %.hs, %.o, $(tax_sources))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte####################################################################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### targets
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
a79493184c9332129c9c91500069322f6f3fafddReed.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte real_clean bin_clean package_clean distclean packages \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte http_pkg syb_pkg shellac_pkg shread_pkg shcompat_pkg \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte hxt_pkg haifa_pkg programatica_pkg maintainer-clean annos \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte check capa hacapa h2h h2hf showKP clean_genRules genRules \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte count doc apache_doc post_doc4apache fromKif \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte derivedSources install_hets install release cgi ghci
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonald
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(SETUP): utils/Setup.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(HC) --make -O -o $@ $<
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonald
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortepackages: http_pkg syb_pkg shellac_pkg shread_pkg shcompat_pkg \
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonald hxt_pkg haifa_pkg programatica_pkg
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
bc85e3968c23ab6602e7c5ccc41cba0656c98391Dan McDonaldhttp_pkg: utils/http.tgz $(SETUP)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field HTTP version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of HTTP package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(RM) -r http; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(TAR) zxf utils/http.tgz; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd http; $(SETUPPACKAGE)) fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortesyb_pkg: $(SETUP)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field syb-generics version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of syb-generics package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd syb-generics; $(SETUPPACKAGE)) fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteshellac_pkg: utils/shellac.tgz $(SETUP)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field Shellac version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of Shellac package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(RM) -r shellac; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(TAR) zxf utils/shellac.tgz; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd shellac; $(SETUPPACKAGE)) fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteshread_pkg: utils/shread.tgz $(SETUP) shellac_pkg
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field Shellac-readline version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of Shellac-readline package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(RM) -r shread; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(TAR) zxf utils/shread.tgz; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd shread; $(SETUPPACKAGE)) fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteshcompat_pkg: utils/shcompat.tgz $(SETUP) shread_pkg
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field Shellac-compatline version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of Shellac-compatline package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(RM) -r shcompat; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(TAR) zxf utils/shcompat.tgz; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd shcompat; $(SETUPPACKAGE)) fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehxt_pkg: $(SETUP) http_pkg
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field hxt version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of hxt package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(RM) -r hxt; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(TAR) zxf utils/hxt.tgz; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd hxt; $(SETUPPACKAGE)) fi
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehaifa_pkg: $(SETUP) hxt_pkg syb_pkg
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @if $(HCPKG) field HAIFA version; then \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of HAIFA package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd haifa-lite; $(SETUPPACKAGE)) fi
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteprogramatica_pkg:
hets-opt:
$(MAKE) distclean
$(MAKE) derivedSources
$(MAKE) clean
$(MAKE) hets-optimized
hets-optimized: $(derived_sources)
$(HC) --make -O -o hets hets.hs $(HC_OPTS)
strip hets
hets-old: $(objects)
$(RM) $@
$(HC) -o hets $(HC_OPTS) $(objects)
cgi:
$(MAKE) distclean
$(MAKE) derivedSources
$(MAKE) real_clean
$(MAKE) hets.cgi
hets.cgi: $(sources) GUI/hets_cgi.hs
ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
strip hets.cgi
hets_maintainers.txt: $(sources)
@echo 'File : Maintainer' > $@
@echo -n Generating $@ " "
@egrep -m 1 "Maintainer" $(sources) | \
sed -e 's/: *Maintainer *: */ : /' >> $@
@echo " done"
###############################
### count lines of code
count: $(sources)
wc -l $(sources)
###############################
### Documentation via haddock
doc: docs/index.html
# generate haddock documentation with links to sources
# the interface treatment is stolen from uni/mk/suffix.mk
docs/index.html: $(doc_sources)
$(RM) -r docs
mkdir docs
cp -r -L ../uni/www docs/www || mkdir docs/www
HINTERFACES0=`find -L docs/www -name '*.haddock' \
-printf "--read-interface=www/%P,%p "` ; \
HINTERFACES=`echo $$HINTERFACES0 | \
$(PERL) -pe 's+/[^/]*.haddock,+,+g'` ; \
$(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
-t 'Hets - the Heterogeneous Tool Set' \
-p Hets-Haddock-Prologue.txt $(doc_sources)
# sources are not copied here
apache_doc:
$(RM) -r docs
cvs up -d ; echo "CVS exited with: " $$?
$(MAKE) hets-opt
$(MAKE) doc
$(MAKE) post_doc4apache
$(MAKE) o_clean
$(MAKE) hets.cgi
post_doc4apache:
$(RM) -r a-docs
cp -r docs a-docs
$(PERL) utils/post_process_docs.pl a-docs \
'Common.Lib.Map.html:Common.Lib._Map.html'
$(PERL) utils/post_process_docs.pl a-docs \
'Data.Map.html:Data._Map.html'
###############################
### release management
derivedSources: $(derived_sources) $(hspp_sources)
$(DRIFT): $(DRIFT_deps)
(cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
strip ../DrIFT)
$(GENRULES): $(DRIFT) $(GENERATERULES_deps)
(cd utils/GenerateRules; \
$(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
GenerateRules.hs -o ../genRules && strip ../genRules)
# "-package hssource" for ghc-5.04.2
$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
$(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
-i../.. -o $(INLINEAXIOMS)
strip $(INLINEAXIOMS)
REV = trunk
release:
$(RM) -r Hets
svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
$(RM) -r uni
if [ -d ../uni ] ; then ln -s ../uni uni ; fi
$(RM) -r programatica
if [ -d ../programatica ] ; then \
mkdir programatica; \
ln -s ../../programatica/tools programatica/tools ; fi
(cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
cp Makefile Makefile.orig; \
cp ReleaseMakefile Makefile; \
./clean.sh; \
find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
$(RM) clean.*; utils/replaceAllHeaders.sh)
$(TAR) cvf Hets.tar Hets
install-hets:
chmod g+w hets
cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
cp -p version_nr $(INSTALLDIR)
(cd $(INSTALLDIR); $(RM) hets; \
ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
install: hets-opt install-hets
pack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
## TODO: add more dependencies and use hets-opt
compile $< -b . -k standard -o $@
# compile $< -b . -k web -o $@
###################################
### Common/LaTeX_maps.hs generation
utils/genItCorrections: $(GENITCORRECTIONS_deps)
$(HC) --make -o $@ $<
strip $@
pretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
@echo -n "Generating pretty/LaTeX_maps.hs ... "
@(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
@(cd pretty >/dev/null; ../utils/genItCorrections \
gen_it_characters gen_it_words >> LaTeX_maps.hs)
@echo "ready"
@echo "please copy the file manually to Common"
#############################
### ATC DrIFT-rule generation
genRules: $(generated_rule_files)
CASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
DL/ATC_DL.der.hs: $(DL_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(DL_files)
RelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
Propositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
HasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
Isabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
$(GENRULECALL) -o $@ $(Isabelle_files)
Modal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
ConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
CASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
CoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
COL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
CspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
SoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
OWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
$(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
VSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
$(GENRULECALL) -x VSE.As.FoldRec -i CASL.ATC_CASL -o $@ $(VSE_files)
clean_genRules:
$(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
$(hs_clean_files)
###############
### clean up
clean: bin_clean o_clean clean_pretty
### removes all *.o, *.hi and *.p_o files in all subdirectories
o_clean:
find . -name \*.o -o -name \*.hi -o -name \*.p_o | xargs $(RM)
### remove binaries
bin_clean:
$(RM) hets
$(RM) hets.cgi
$(RM) $(SETUP)
$(RM) $(TESTTARGETS)
clean_pretty:
$(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
pretty/generated_words.tex
### additionally removes the library files
real_clean: clean
### clean user packages
package_clean:
$(HCPKG) unregister HAIFA --user || exit 0
$(HCPKG) unregister programatica --user || exit 0
$(HCPKG) unregister hxt --user || exit 0
$(HCPKG) unregister Shellac-compatline --user || exit 0
$(HCPKG) unregister Shellac-readline --user || exit 0
$(HCPKG) unregister HTTP --user || exit 0
$(HCPKG) unregister syb-generics --user || exit 0
$(HCPKG) unregister Shellac --user || exit 0
### additionally removes generated files not in the CVS tree
distclean: clean clean_genRules
$(RM) $(derived_sources)
$(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
$(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
$(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
maintainer-clean: distclean package_clean
$(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
####################################################################
### test targets
####################################################################
### interactive
ghci: $(derived_sources)
$(HC)i $(HC_OPTS)
### christian's target
### CASL parser
fromKif: CASL/fromKif
### Annos parser
annos: Common/annos
### CASL parser
capa: CASL/capa
### HasCASL parser
hacapa: HasCASL/hacapa
### Haskell analysis
hana: Haskell/hana
### Haskell to Isabelle-HOLCF translation
h2hf: Haskell/h2hf
Haskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
Common/Lib/*.hs Comorphisms/*.hs
$(HC) -O --make -o $@ $< $(HC_FLAGS) $(PFE_FLAGS)
### HasCASL to Haskell translation
h2h: Haskell/h2h
### test program to check the known provers
showKP: Comorphisms/test/showKP
### run tests in other directories
check: $(TESTTARGETS)
for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
####################################################################
## Preparing the version of Hets
Driver/Version.hs: Driver/Version.in version_nr
$(RM) $@
LANG=C $(PERL) utils/build_version.pl version_nr \
< Driver/Version.in > $@
chmod 444 $@
## two hardcoded dependencies for a correct generation of Version.hs
Driver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
hets.hs: Driver/Version.hs
ATC/DevGraph.hs: Static/DevGraph.hs
## two dependencies for avoidence of circular prerequisites
CASL_DEPENDENT_BINARIES= hets CASL/capa CASL/fromKif \
Common/annos Common/test_parser Comorphisms/test/showKP \
CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
# CASL_DL/Logic.hs: CASL_DL/PredefinedSign.hs
####################################################################
## rules for DrIFT
.SUFFIXES:
%: %.hs packages
$(HC) --make -o $@ $< $(HC_OPTS)
%.hs: %.y
$(HAPPY) -o $@.tmp $<
echo "{-# OPTIONS -w #-}" > $@
cat $@.tmp >> $@
$(RM) $@.tmp
%.hs: %.der.hs $(DRIFT)
$(RM) $@
($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
chmod 444 $@
## rules for inlineAxioms
%.hs: %.inline.hs $(INLINEAXIOMS)
$(RM) $@
$(INLINEAXIOMS) $< > $@
chmod 444 $@
## rule for cpp and haddock
%.hspp: %.hs
$(HC) -E -cpp -D__HADDOCK__ \
-DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
## compiling rules for object and interface files
%.o %.hi: %.hs
$(HC) -c $< $(HC_OPTS)
%.o %.hi: %.lhs
$(HC) -c $< $(HC_OPTS)
## compiling rules for dependencies
%.d : %.hs
$(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
%.d : %.lhs
$(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
## generate the inline file for the predefined CASL_DL sign
CASL_DL/PredefinedSign.inline.hs: \
CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
CASL_DL/PredDatatypes.het
$(RM) $@
utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
< CASL_DL/PredefinedSign.inline.hs.in > $@
echo " )" >> $@
chmod 444 $@
# Warning: Don't change the order of the depencies!!
CASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
CASL_DL/Datatypes.het
$(RM) $@
$(PERL) $+ > $@
chmod 444 $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
Modal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
utils/genTransMFormFunc.pl $(INLINEAXIOMS)
$(RM) $@
$(PERL) utils/genTransMFormFunc.pl $< $@
chmod 444 $@
INSTALLER_DIR = ../installers
ifeq ($(strip $(HETS_VERSION)),)
HETS_VERSION := `cat version_nr`
# or `date +%F`
endif
initialize_installer:
mkdir -p $(INSTALLER_DIR)
sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \
> $(INSTALLER_DIR)/Makefile
@echo Please do
@echo " -> cd $(INSTALLER_DIR)"
@echo " -> make"
@echo and wait until it is finished