rules revision 68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# Makefile
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# $Header$
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# Year: 2004
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# This Makefile will compile the new hets system and provides also
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# targets for test programs during implementation phases.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# !!! Note: This makefile is written for GNU make !!!
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# (gmake on solaris)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiall: hets
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi####################################################################
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi## Some varibles, which control the compilation
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiINCLUDE_PATH = fgl hxt
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCOMMONLIB_PATH = Common/Lib Common/ATerm fgl/Data/Graph \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi fgl/Data/Graph/Inductive fgl/Data/Graph/Inductive/Internal \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi fgl/Data/Graph/Inductive/Monad fgl/Data/Graph/Inductive/Query
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCLEAN_PATH = . utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Logic CASL CASL/CCC Syntax Static GUI HasCASL Haskell Modal CoCASL COL \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi CspCASL ATC ToHaskell Proofs Comorphisms Isabelle Driver $(INCLUDE_PATH) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Haskell/Hatchet Hatchet Taxonomy CASL_DL SPASS $(PFE_PATHS)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# the 'replacing spaces' example was taken from the (GNU) Make info manual
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiempty =
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindispace = $(empty) $(empty)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi## set ghc imports properly for your system
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiGHC_IMPORTS = `$(HC) --print-libdir`/imports
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiDRIFT_ENV = \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi DERIVEPATH=.:ghc:$(GHC_IMPORTS):$(subst $(space),:,$(PFE_PATHS))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# override on commandline for other architectures
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiINSTALLDIR = \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiDRIFT_deps = utils/DrIFT-src/*hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Common/Lib/Pretty.hs Common/Keywords.hs Common/Lib/Set.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg Common/Lib/Map.hs Common/Lib/Rel.hs Common/Lib/State.hs Common/Id.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs CASL/ShowMixfix.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi CASL/Utils.hs Common/Lexer.hs Common/Token.hs Common/Anno_Parser.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Common/GlobalAnnotations.hs Common/PrettyPrint.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Common/Print_AS_Annotation.hs Common/PPUtils.hs CASL/LiteralFuns.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi CASL/Print_AS_Basic.hs Common/AnnoState.hs CASL/Formula.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg Common/ConvertLiteral.hs Common/Earley.hs CASL/MixfixParser.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi CASL/Parse_AS_Basic.hs CASL/Sign.hs CASL/Overload.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi CASL/StaticAna.hs Modal/AS_Modal.hs Modal/Parse_AS.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHC = ghc
724365f7556fc4201fdb11766ebc6bd918523130sethgPERL = perl
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHAPPY = happy -sgca
724365f7556fc4201fdb11766ebc6bd918523130sethgDRIFT = utils/DrIFT
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiINLINEAXIOMS = utils/outlineAxioms
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHADDOCK = haddock
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCPPP = cpp
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethgHC_WARN = -Wall
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHC_FLAGS = $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi -fallow-overlapping-instances -fallow-undecidable-instances
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# -ddump-minimal-imports
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# flags also come in via ../uni/uni-package.conf
724365f7556fc4201fdb11766ebc6bd918523130sethg# but added it here in case of compilation without uni
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindilogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL Hatchet CASL_DL
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiifneq ($(strip $(UNI_PACKAGE_CONF)),)
724365f7556fc4201fdb11766ebc6bd918523130sethgHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
724365f7556fc4201fdb11766ebc6bd918523130sethg -package uni-server -DUNI_PACKAGE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# some modules from uni for haddock
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# if uni/server is included also HaXml sources are needed
724365f7556fc4201fdb11766ebc6bd918523130sethguni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ../uni/reactor ../uni/util ../uni/posixutil
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(wildcard ../uni/htk/haddock/*/*.hs)
724365f7556fc4201fdb11766ebc6bd918523130sethgendif
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### list of directories to run checks in
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiTESTDIRS += Common CASL HasCASL Haskell/Hatchet/examples
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiPFE_TOOLDIR = $(wildcard ../programatica/tools)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiifneq ($(strip $(PFE_TOOLDIR)),)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi base/transforms base/transforms/Deriving property \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi property/syntax property/AST property/transforms \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi property/TI property/defs property/parse2 property/parse2/Parser
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindipfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiPFE_PATH = $(addprefix -i, $(PFE_PATHS))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindihappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $< > $@
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(LEX_DIR)/HsTokens.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(HC) --make -O -package data \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi -i$(PFE_TOOLDIR)/base/lib \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $@.hs -o $@
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindilogics += Haskell
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(LEX_DIR)Gen/HsLexerGen
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Haskell/ProgramaticaPrelude.hs
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi## rule for appendHaskellPreludeString
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(APPENDPRELUDESTRING)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(APPENDPRELUDESTRING) < $< > $@
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
724365f7556fc4201fdb11766ebc6bd918523130sethg HsModule HsName HsLiteral HsIdent
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi base/defs/UniqueNames base/Modules/TypedIds base/TI/TiKinds \
724365f7556fc4201fdb11766ebc6bd918523130sethg base/parse2/SourceNames base/syntax/SyntaxRec \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi property/syntax/PropSyntaxStruct
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHaskell_files = $(addsuffix .hs, \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
724365f7556fc4201fdb11766ebc6bd918523130sethg $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi## rule for ATC generation
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHaskell/ATC_Haskell.der.hs: $(Haskell_files) ATC/Haskell.header.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg utils/genRules
724365f7556fc4201fdb11766ebc6bd918523130sethg utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(Haskell_files)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiTESTDIRS += ToHaskell
724365f7556fc4201fdb11766ebc6bd918523130sethgendif
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethghappy_files += Haskell/Hatchet/HsParser.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### Profiling (only for debugging)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### Attention every module must be compiled with profiling or the linker
724365f7556fc4201fdb11766ebc6bd918523130sethg### cannot link the various .o files properly. So after switching on
724365f7556fc4201fdb11766ebc6bd918523130sethg### Profiling, do an 'gmake real_clean; gmake'
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### and comment out HC_PACKAGE variable definition above.
724365f7556fc4201fdb11766ebc6bd918523130sethg### Comment in the following line for switching on profiling.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#HC_PROF = -prof -auto-all
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHC_OPTS = $(HCI_OPTS) $(HC_PROF) -DHATCHET -DCASLEXTENSIONS
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiDRIFT_OPTS = +RTS -K10m -RTS
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethg####################################################################
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi## sources for hets
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindinon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg Static/LogicStructured.hs Common/CaslLanguage.hs ./Test.hs
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiSOURCE_PATHS = $(COMMONLIB_PATH) $(CLEAN_PATH)
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindisources = hets.hs $(filter-out $(non_sources), \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#endif
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiobjects = $(sources:%.hs=%.o)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindidrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi HasCASL/As.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(gendrifted_files)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindigenrule_header_files = $(wildcard ATC/*.header.hs)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiatc_files = Common/AS_Annotation.der.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Static/DevGraph.hs Proofs/Proofs.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiatc_der_files = $(foreach file, $(atc_files), \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi ATC/$(basename $(basename $(notdir $(file)))).der.hs)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi CASL/AS_Basic_CASL.der.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHasCASL_files = HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg HasCASL/Sublogic.hs
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiIsabelle_files = Isabelle/IsaSign.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCOL_files = COL/AS_COL.hs COL/COLSign.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiHatchet_files = Haskell/Hatchet/AnnotatedHsSyn.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Haskell/Hatchet/MultiModuleBasics.hs Haskell/Hatchet/HsSyn.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg Haskell/Hatchet/Representation.hs Haskell/Hatchet/Class.hs \
724365f7556fc4201fdb11766ebc6bd918523130sethg Haskell/Hatchet/KindInference.hs Haskell/Hatchet/Env.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Hatchet/HatParser.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
724365f7556fc4201fdb11766ebc6bd918523130sethgatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindigenerated_rule_files = $(atc_der_files) $(atc_logic_files)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindigendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethggen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(inline_axiom_files) Modal/ModalSystems.hs
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethg# sources that have {-# OPTIONS -cpp #-}
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindicpp_sources = Haskell/Hatchet/FiniteMaps.hs Common/DynamicUtils.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Isabelle/Logic_Isabelle.hs Isabelle/CreateTheories.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Proofs/Proofs.hs hets.hs CASL/CCC/FreeTypes.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs $(happy_files)
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethgnondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(wildcard utils/DrIFT-src/*.lhs) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(wildcard utils/GenerateRules/*.hs) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(wildcard utils/InlineAxioms/*.hs) \
724365f7556fc4201fdb11766ebc6bd918523130sethg $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(genrule_header_files) $(generated_rule_files) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Modal/GeneratePatterns.inline.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi hxt/HXT.hs hxt/Net.hs $(patsubst %.hs, %.der.hs, $(drifted_files))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# this variable holds the modules that should be documented
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindidoc_sources = $(filter-out $(nondoc_sources), $(sources)) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(patsubst %.hs, %.hspp, $(cpp_sources)) $(uni_sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethgtax_objects = $(patsubst %.hs, %.o, $(tax_sources))
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi####################################################################
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### targets
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi.PHONY : all hets-opt hets-optimized clean d_clean real_clean bin_clean \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi lib_clean distclean check capa hacapa h2h clean_genRules genRules \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi taxonomy count doc apache_doc post_doc4apache \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi derivedSources install_hets install release
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindihets: $(sources) $(derived_sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(HC) --make -o $@ hets.hs $(HC_OPTS)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindihets-opt:
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(MAKE) distclean
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(MAKE) derivedSources
724365f7556fc4201fdb11766ebc6bd918523130sethg $(MAKE) real_clean
724365f7556fc4201fdb11766ebc6bd918523130sethg $(MAKE) hets-optimized
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindihets-optimized: $(derived_sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(HC) --make -O -o hets hets.hs $(HC_OPTS)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi strip hets
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindihets-old: $(objects)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(RM) $@
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(HC) -o hets $(HC_OPTS) $(objects)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
724365f7556fc4201fdb11766ebc6bd918523130sethghets.cgi: $(sources) GUI/hets_cgi.hs
724365f7556fc4201fdb11766ebc6bd918523130sethg ghc --make -package-conf /home/luettich/ghc-pkg/package.conf \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_INCLUDE) \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(HC_FLAGS) -O
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi strip hets.cgi
724365f7556fc4201fdb11766ebc6bd918523130sethg
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecinditaxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
724365f7556fc4201fdb11766ebc6bd918523130sethg
724365f7556fc4201fdb11766ebc6bd918523130sethg###############################
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### TAGS files for (x)emacs
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# load them with "M-x" "visit-tags-table" from
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# "HetCATS/hetcats.TAGS"
724365f7556fc4201fdb11766ebc6bd918523130sethg# use "M-." to search for a tag
724365f7556fc4201fdb11766ebc6bd918523130sethg# !!Beware this is somewhat instable, because it uses an absolute path!!
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindihetcats.TAGS: $(sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(sources); mv TAGS $@; mv tags hetcats.tags
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
724365f7556fc4201fdb11766ebc6bd918523130sethg###############################
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### count lines of code
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindicount: $(sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi wc -l $(sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi###############################
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi### Documentation via haddock
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindidoc: docs/index.html
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# generate haddock documentation with links to sources
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindidocs/index.html: $(doc_sources)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(HADDOCK) $(doc_sources) -o docs -h -v \
724365f7556fc4201fdb11766ebc6bd918523130sethg -i docs/base.haddock -i docs/parsec.haddock -s ../ \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi -t 'Hets - the Heterogeneous Tool Set' \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi -p Hets-Haddock-Prologue.txt
# sources are not copied here
apache_doc:
$(RM) docs/*.*
cvs up -d ; echo "CVS exited with: " $$?
$(MAKE) hets-opt
$(MAKE) doc
$(MAKE) post_doc4apache
$(MAKE) o_clean
$(MAKE) hets.cgi
post_doc4apache:
$(PERL) utils/post_process_docs.pl docs \
'Common.Lib.Map.html:Common.Lib._Map.html'
cp docs/*.* a-docs/
###############################
### release management
derivedSources: $(derived_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)
$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
$(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
-i../.. -o $(INLINEAXIOMS)
strip $(INLINEAXIOMS)
release:
$(RM) -r HetCATS
cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
co -P 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) real_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
#############################
### ATC DrIFT-rule generation
genRules: $(generated_rule_files)
gen_atc_files = \
if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; \
then utils/genRules -r $(rule) -o ATC -h \
ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
else utils/genRules -r $(rule) -o ATC $(file); fi ;
$(atc_der_files): $(atc_files) $(genrule_header_files) utils/genRules
$(foreach file, $(atc_files), $(gen_atc_files))
CASL/ATC_CASL.der.hs: $(CASL_files) utils/genRules
utils/genRules -r $(rule) -o CASL $(CASL_files)
HasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) utils/genRules
utils/genRules -r $(rule) -o HasCASL $(HasCASL_files)
Isabelle/ATC_Isabelle.der.hs: $(Isabelle_files) utils/genRules
utils/genRules -r $(rule) -o Isabelle $(Isabelle_files)
Modal/ATC_Modal.der.hs: $(Modal_files) utils/genRules
utils/genRules -r $(rule) -o Modal $(Modal_files)
CASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) utils/genRules
utils/genRules -r $(rule) -o CASL_DL $(CASL_DL_files)
CoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) utils/genRules
utils/genRules -r $(rule) -o CoCASL $(CoCASL_files)
COL/ATC_COL.der.hs: $(COL_files) utils/genRules
utils/genRules -r $(rule) -o COL $(COL_files)
CspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) utils/genRules
utils/genRules -r $(rule) -o CspCASL $(CspCASL_files)
Hatchet/ATC_Hatchet.der.hs: $(Hatchet_files) ATC/Hatchet.header.hs \
utils/genRules
utils/genRules -r $(rule) -o Hatchet -h ATC/Hatchet.header.hs \
$(Hatchet_files)
rule = ShATermConvertible
clean_genRules:
$(RM) $(generated_rule_files) $(gendrifted_files)
###############
### clean up
clean: bin_clean o_clean
### removes *.hi and *.o in all include directories
o_clean:
for p in $(CLEAN_PATH) ; do \
(cd $$p ; $(RM) *.hi *.o *.hspp) ; done
### remove binaries
bin_clean:
$(RM) hets
$(RM) test_parser
$(RM) CASL/capa
$(RM) HasCASL/hacapa
$(RM) Haskell/hapa
$(RM) Haskell/hana
$(RM) Haskell/wrap
$(RM) ToHaskell/h2h
$(RM) Syntax/hetpa
$(RM) Static/hetana
$(RM) GUI/hetdg
$(RM) hetpa
$(RM) hetana
$(RM) hetdg
$(RM) atctest2
$(RM) atctest
$(RM) Common/annos
$(RM) Haskell/Hatchet/hatch
$(RM) ToHaskell/translateAna
$(RM) Taxonomy/taxonomyTool
### additonally removes *.d (dependency files) in every include directory
### also delete *.d.bak (dependency file backups)
d_clean: clean
for p in $(CLEAN_PATH) ; do \
(cd $$p ; $(RM) *.d *.d.bak) ; done
### remove files also in own libraries
lib_clean:
for p in $(COMMONLIB_PATH) ; do \
(cd $$p ; $(RM) *.hi *.d *.o) ; done
### additionally removes the files that define the sources-variable
real_clean: bin_clean lib_clean clean
### additionally removes files not in CVS tree
distclean: real_clean clean_genRules d_clean
$(RM) $(derived_sources)
$(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
####################################################################
### test targets
####################################################################
### a parser to test annotation parser and Id parsers
test_parser: Common/test_parser
Common/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### interactive
ghci:
$(HC)i $(HCI_OPTS)
### christian's target
### CASL parser
capa: CASL/capa
CASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### HasCASL parser
hacapa: HasCASL/hacapa
HasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### Haskell analysis
hana: Haskell/hana
Haskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### Haskell to Isabelle-HOLCF translation
h2hf: ToHaskell/h2hf
ToHaskell/h2hf: ToHaskell/h2hf.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs Isabelle/*.hs Common/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### HasCASL to Haskell translation
h2h: ToHaskell/h2h
ToHaskell/h2h: ToHaskell/h2h.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### HetCASL parser
hetpa: Syntax/hetpa.hs Syntax/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### HetCASL parser
hetana: Static/hetana.hs Static/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### ATC test system
atctest: ATC/ATCTest.hs ATC/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
atctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs \
Common/Lib/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### ATerm.Lib test system
atermlibtest: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
Common/ATerm/*.hs Common/Lib/*.hs
$(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
hatermdiff: Common/ATerm/ATermDiffMain.hs Common/SimpPretty.hs \
Common/ATerm/*.hs Common/Lib/*.hs
$(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
### OWL_DL test target
OWL_DL/readAStest: OWL_DL/ToHaskellAS.hs Common/ATerm/*.hs \
Common/Lib/*.hs OWL_DL/*.hs
$(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
### HetCASL with dev graph
hetdg: GUI/hetdg.hs $(drifted_files) *.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### run tests in other directories
check:
for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
####################################################################
## Preparing the version of HetCATS
Driver/Version.hs: Driver/Version.in version_nr
$(PERL) utils/build_version.pl version_nr < Driver/Version.in > $@
## 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
####################################################################
## rules for DrIFT
.SUFFIXES:
%: %.hs
$(HC) --make -o $@ $<
%.hs: %.ly
$(HAPPY) $<
%.hs: %.y
$(HAPPY) -o $@ $<
%.hs: %.der.hs utils/DrIFT
($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $(DRIFT_OPTS) $< > $@)
## rules for inlineAxioms
%.hs: %.inline.hs $(INLINEAXIOMS)
$(INLINEAXIOMS) $< > $@
## rule for cpp and haddock
%.hspp: %.hs
$(HC) -E -cpp -DUNI_PACKAGE -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$@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
Modal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
utils/genTransMFormFunc.pl $(INLINEAXIOMS)
$(PERL) utils/genTransMFormFunc.pl $< $@