Makefile revision d5d349836d8b1fa93ea49a59d977b106c6e9233b
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# Makefile
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# $Header$
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# Year: 2004
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# This Makefile will compile the new hets system and provides also
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# targets for test programs during implementation phases.
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# !!! Note: This makefile is written for GNU make !!!
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# (gmake on solaris)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouall: hets
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou####################################################################
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou## Some varibles, which control the compilation
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouINCLUDE_PATH =
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Text/XML/Serializer
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouSOURCE_PATHS = . utils/itcor \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou CspCASL ATC Proofs Comorphisms Isabelle Driver \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Taxonomy CASL_DL SPASS OWL_DL OMDoc PGIP Propositional
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# the 'replacing spaces' example was taken from the (GNU) Make info manual
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouempty =
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouspace = $(empty) $(empty)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou## set ghc imports properly for your system
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouGHC_IMPORTS = `$(HC) --print-libdir`/imports
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# import directories for ghc-5.04.2
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouDRIFT_ENV = \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# override on commandline for other architectures
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouINSTALLDIR = \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouDRIFT_deps = utils/DrIFT-src/*hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHC = ghc
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHCPKG = ghc-pkg
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouPERL = perl
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHAPPY = happy -sga
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouGENRULES = utils/genRules
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -i Data.Typeable -i Common.ATerm.Lib
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouDRIFT = utils/DrIFT
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouINLINEAXIOMS = utils/outlineAxioms
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHADDOCK = haddock
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouOSBYUNAME = $(shell uname)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouifneq ($(findstring SunOS, $(OSBYUNAME)),)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTAR = gtar
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouelse
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTAR = tar
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouendif
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouARCH = $(subst $(space),,$(shell uname -m))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouSETUP = utils/Setup
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouSETUPPACKAGE = ../$(SETUP) clean; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ../$(SETUP) configure $(SETUPPREFIX); \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouifneq ($(findstring 1.13.2, $(HAXMLVERSION)),)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHAXML_PACKAGE = -package HaXml -DHAXML_PACKAGE
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouendif
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# remove -fno-warn-orphans for older ghcs and add -ifgl
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHC_WARN = -Wall -fno-warn-orphans
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHC_FLAGS = $(HAXML_PACKAGE) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction -fcontext-stack60 \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -fallow-overlapping-instances -fallow-undecidable-instances
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# -ddump-minimal-imports
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# flags also come in via ../uni/uni-package.conf
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# but added it here in case of compilation without uni
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoulogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou OWL_DL ConstraintCASL Propositional
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou SPASS/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou SPASS/tests/soapTest.hs SPASS/tests/soapTest.hs SPASS/tests/CMDL_tests.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouifneq ($(strip $(UNI_PACKAGE_CONF)),)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -package uni-server -DUNI_PACKAGE
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# some modules from uni for haddock
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# if uni/server is included also HaXml sources are needed
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ../uni/reactor ../uni/util ../uni/posixutil
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(wildcard ../uni/htk/haddock/*/*.hs)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouendif
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou### list of directories to run checks in
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTESTDIRS += Common CASL HasCASL test
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouPFE_TOOLDIR = $(wildcard ../programatica/tools)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouifneq ($(strip $(PFE_TOOLDIR)),)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou base/transforms base/transforms/Deriving property \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou property/syntax property/AST property/transforms \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou property/TI property/defs property/parse2 property/parse2/Parser
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoupfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouPFE_PATH = $(addprefix -i, $(PFE_PATHS))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouPFE_FLAGS = -DPROGRAMATICA
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouLEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(LEX_DIR)/HsLex.hs $(SETUP)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou @if $(HCPKG) field programatica version; then \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou echo "of programatica package found"; else \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou (patch -usNlp0 -d $(PFE_TOOLDIR) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -i `pwd`/Haskell/Programatica.patch || exit 0); \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou cp -f utils/programatica.cabal ../programatica/tools; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou cp -f $(SETUP) ../programatica/tools; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou (cd ../programatica/tools; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ./Setup configure $(SETUPPREFIX); \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ./Setup build; ./Setup install --user) fi
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou echo "{-# OPTIONS -w #-}" > $@
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $< >> $@
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(LEX_DIR)/HsTokens.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(HC) --make -fno-monomorphism-restriction -O \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -i$(PFE_TOOLDIR)/base/lib \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $@.hs -o $@
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou strip $@
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoulogics += Haskell
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(LEX_DIR)Gen/HsLexerGen
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(HC) --make -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Haskell/ProgramaticaPrelude.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou## rule for appendHaskellPreludeString
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(APPENDPRELUDESTRING)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(RM) $@
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(APPENDPRELUDESTRING) < $< > $@
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou chmod 444 $@
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou HsModule HsName HsLiteral HsIdent
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou#files in base/TI/
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou base/parse2/SourceNames base/syntax/SyntaxRec \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou property/syntax/PropSyntaxStruct
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHaskell_files = $(addsuffix .hs, \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou## rule for ATC generation
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouhs_der_files += $(hs_clean_files)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTESTDIRS += ToHaskell Haskell/test
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouendif
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou### Profiling (only for debugging)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou### Attention every module must be compiled with profiling or the linker
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou### cannot link the various .o files properly. So after switching on
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou### Profiling, do an 'gmake real_clean; gmake'
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou### Comment in the following line for switching on profiling.
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou#HC_PROF = -prof -auto-all -fignore-asserts
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -DCASLEXTENSIONS
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou####################################################################
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou## sources for hets
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitounon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(SETUP).hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitousources = hets.hs $(filter-out $(non_sources), \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouobjects = $(sources:%.hs=%.o)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoudrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ATC/DevGraph.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ConstraintCASL/AS_ConstraintCASL.hs\
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Propositional/AS_BASIC_Propositional.hs\
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(gendrifted_files)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouatc_der_files = $(foreach file, $(atc_files), \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou ATC/$(basename $(basename $(notdir $(file)))).der.hs)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/Id.der.hs: Common/Id.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/Result.der.hs: Common/Result.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(GENRULECALL) -x Logic.Prover.ProverTemplate \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou -i ATC.AS_Annotation -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou CASL/AS_Basic_CASL.der.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouIsabelle_files = Isabelle/IsaSign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouCOL_files = COL/AS_COL.hs COL/COLSign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou CspCASL/SignCSP.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouSPASS_files = SPASS/Sign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic PoitouOWL_DL_files = OWL_DL/Sign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitougenerated_rule_files = $(atc_der_files) $(atc_logic_files)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitougendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitougen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# sources that have {-# OPTIONS -cpp #-}
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoucpp_sources = \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Isabelle/CreateTheories.hs CASL/CompositionTable/CompositionTable.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou PGIP/Common.hs PGIP/Commands.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou OMDoc/HetsInterface.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# unused, remove when header files are gone
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitougenrule_header_files = $(wildcard ATC/*.header.hs)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitounondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(wildcard utils/DrIFT-src/*.lhs) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(wildcard utils/GenerateRules/*.hs) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(wildcard utils/InlineAxioms/*.hs) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(genrule_header_files) $(generated_rule_files) \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Modal/GeneratePatterns.inline.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou SPASS/MathServCommunication.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(patsubst %.hs, %.der.hs, $(drifted_files))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou# this variable holds the modules that should be documented
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoudoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoutax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoutax_objects = $(patsubst %.hs, %.o, $(tax_sources))
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou####################################################################
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou### targets
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou real_clean bin_clean package_clean distclean packages \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou check capa hacapa h2h h2hf showKP clean_genRules genRules \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou count doc apache_doc post_doc4apache fromKif \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou programatica_pkg maintainer-clean annos \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou derivedSources install_hets install release cgi ghci
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou$(SETUP): utils/Setup.hs
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(HC) --make -O -o $@ $<
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoupackages: http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou programatica_pkg
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouhttp_pkg: utils/http.tgz $(SETUP)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou @if $(HCPKG) field HTTP version; then \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou echo "of HTTP package found"; else \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(RM) -r http; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(TAR) zxf utils/http.tgz; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou (cd http; $(SETUPPACKAGE)) fi
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitousyb_pkg: $(SETUP)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou @if $(HCPKG) field syb-generics version; then \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou echo "of syb-generics package found"; else \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou (cd syb-generics; $(SETUPPACKAGE)) fi
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoushellac_pkg: utils/shellac.tgz $(SETUP)
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou @if $(HCPKG) field Shellac version; then \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou echo "of shellac package found"; else \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(RM) -r shellac; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(TAR) zxf utils/shellac.tgz; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou (cd shellac; $(SETUPPACKAGE)) fi
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitoushread_pkg: utils/shread.tgz $(SETUP) shellac_pkg
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou @if $(HCPKG) field Shellac-readline version; then \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou echo "of shellac-readline package found"; else \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(RM) -rf shread; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou $(TAR) zxf utils/shread.tgz; \
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou (cd shread; $(SETUPPACKAGE)) fi
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitouhxt_pkg: $(SETUP) http_pkg
5e5acc733bf20faa22d4e9be582f555bbda0867bLudovic Poitou @if $(HCPKG) field hxt version; then \
echo "of hxt package found"; else \
$(RM) -rf hxt; \
$(TAR) zxf utils/hxt.tgz; \
(cd hxt; $(SETUPPACKAGE)) fi
haifa_pkg: $(SETUP) hxt_pkg syb_pkg
@if $(HCPKG) field HAIFA version; then \
echo "of HAIFA package found"; else \
(cd haifa-lite; ../$(SETUP) configure $(SETUPPREFIX); \
../$(SETUP) build; ../$(SETUP) install --user) fi
programatica_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 $@ " "
@$(PERL) -e \
'foreach my $$f (@ARGV) { open I, "<$$f"; \
print "$$f :"; while (<I>) \
{ if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
print " $$1" ; last} }; print "\n"; close I; }' \
$(sources) >> $@
@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 ../uni/www docs/www || mkdir docs/www
HINTERFACES0=`find 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)
utils/DrIFT: $(DRIFT_deps)
(cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
strip ../DrIFT)
utils/genRules: $(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)
# set this variable from the command line to i,e. RELEASETAG='-r release-0-60'
RELEASETAG =
release:
$(RM) -r HetCATS
cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
co -P $(RELEASETAG) HetCATS
$(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 HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
cp Makefile Makefile.orig; \
cp ReleaseMakefile Makefile; \
./clean.sh; \
find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
$(RM) clean.*)
$(TAR) cvf HetCATS.tar HetCATS
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)
Propositional/ATC_Propositional.der.hs: $(Propositional_files) \
$(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -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) -i ATC.AS_Annotation -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)
SPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
OWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
-o $@ $(OWL_DL_files)
clean_genRules:
$(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
$(hs_clean_files)
###############
### clean up
clean: bin_clean o_clean clean_pretty
### removes *.hi and *.o in all include directories
o_clean:
find . -name \*.o -o -name \*.hi | xargs $(RM) -r
### remove binaries
bin_clean:
$(RM) hets
$(RM) hets.cgi
$(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-readline --user || exit 0
$(HCPKG) unregister HTTP --user || exit 0
$(HCPKG) unregister syb-generics --user || exit 0
$(HCPKG) unregister Shellac --user || exit 0
$(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
### 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) $(SETUP)
####################################################################
### 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 HetCATS
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
# Warning: Don't change the order of the depencies!!
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 $@
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 $@
initialize_installer:
@if [ -d $(INSTALLER_DIR) ] ; then \
echo "copy file to $(INSTALLER_DIR)" ; \
else \
echo "create $(INSTALLER_DIR)" ;\
mkdir -p $(INSTALLER_DIR) ; \
fi
@sed "s/^\(HETS_VERSION=\).*/\1`cat version_nr`/" Makefile.installer > Makefile.inst ;\
sed "s/^\(SPASS_DIR_MAC=\).*/\1`ls utils/SPASS-ppc-mac/ | grep SPASS`/" Makefile.inst > Makefile.inst2 ;\
rm Makefile.inst ;\
mv Makefile.inst2 $(INSTALLER_DIR)/Makefile ; \
cp utils/getAllHets.sh $(INSTALLER_DIR) ;\
cp utils/getDailyHets-installer.sh $(INSTALLER_DIR)\getDailyHets.sh
@echo =========================================================================
@echo If you have not logged in \'cvs.haskell.org\' and \'cvs-agbkb.informatik.uni-bremen.de\'
@echo "then please first login:"
@echo " cvs -d :pserver:anoncvs@cvs.haskell.org:/cvs login"
@echo " the password is cvn "
@echo " cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository login "
@echo " the password is "
@echo =========================================================================
@echo Ready to create installers for Hets
@echo Please do
@echo " -> cd $(INSTALLER_DIR)"
@echo " -> make"
@echo and wait until it is finished