Makefile revision ca074a78b8dcccbb8c419586787882f98d0c6163
235N/A# hetcats/Makefile
235N/A# $Header$
822N/A# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
822N/A# Year: 2004
822N/A
235N/A# This Makefile will compile the new hetcats system and provides also
1252N/A# targets for test programs during implementation phases.
235N/A
235N/A# !!! Note: This makefile is written for GNU make !!!
919N/A# (gmake on solaris ; make on linux)
919N/A
919N/Aall: hets
919N/A
919N/A####################################################################
919N/A## Some varibles, which control the compilation
919N/A
919N/AINCLUDE_PATH = ghc:hetcats:fgl:hxt
919N/ACOMMONLIB_PATH = Common/Lib:Common/ATerm:fgl/Data/Graph:fgl/Data/Graph/Inductive:fgl/Data/Graph/Inductive/Aux:fgl/Data/Graph/Inductive/Monad:fgl/Data/Graph/Inductive/Query
919N/ACLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:utils/InlineAxioms:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:COL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet:Hatchet:Taxonomy:$(PFE_PATHS)
919N/A
919N/A## set ghc imports properly for your system
919N/ALINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
919N/ADRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}:${PFE_PATHS}'
919N/A
919N/A# the 'replacing spaces' example was taken from the (GNU) Make info manual
919N/Aempty:=
235N/Aspace:= $(empty) $(empty)
235N/A
235N/A# override on commandline for other architectures
822N/AINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
235N/A
970N/ADRIFT_deps = utils/DrIFT-src/*hs
970N/AGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
970N/AINLINEAXIOMS_deps = utils/InlineAxioms/*hs $(drifted_files)
970N/A
970N/AHC = ghc
970N/APERL = perl
970N/AHAPPY = happy
1003N/ADRIFT = $(DRIFT_ENV) utils/DrIFT
970N/AINLINEAXIOMS = utils/outlineAxioms
235N/AHADDOCK = haddock
1252N/ACPPP = cpp
235N/A
911N/AHC_FLAGS = -Wall -fglasgow-exts -fno-monomorphism-restriction \
1252N/A -fallow-overlapping-instances -fallow-undecidable-instances
1252N/A# -ddump-minimal-imports
911N/A# flags also come in via ../uni/uni-package.conf
235N/A# but added it here in case of compilation without uni
493N/A
493N/AHC_INCLUDE = $(addprefix -i, $(subst :, ,$(INCLUDE_PATH)))
235N/A
235N/AUNI_PACKAGE_CONF := $(wildcard ../uni/uni-package.conf)
235N/Aifneq ($(strip $(UNI_PACKAGE_CONF)),)
235N/AHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
822N/A -package uni-server -DUNI_PACKAGE
235N/A
1124N/Alogics = CASL HasCASL Modal CoCASL COL CspCASL Hatchet
1124N/A
1124N/A# some modules from uni for haddock
235N/A# if uni/server is included also HaXml sources are needed
1252N/Auni_sources = $(wildcard ../uni/davinci/haddock/*.hs) \
235N/A $(wildcard ../uni/graphs/haddock/*.hs) \
235N/A ../uni/htk/toplevel/HTk.hs \
235N/A $(wildcard ../uni/htk/haddock/*/*.hs) \
235N/A $(wildcard ../uni/events/haddock/*.hs) \
1124N/A $(wildcard ../uni/reactor/haddock/*.hs) \
1124N/A $(wildcard ../uni/util/haddock/*.hs) \
1124N/A $(wildcard ../uni/posixutil/haddock/*.hs)
1124N/Aendif
1124N/A
822N/APFE_TOOLDIR := $(wildcard ../programatica/tools)
822N/Aifneq ($(strip $(PFE_TOOLDIR)),)
981N/APFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
235N/A base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
1124N/A base/transforms base/transforms/Deriving property \
1124N/A property/syntax property/AST property/transforms \
1124N/A property/TI property/defs property/parse2 property/parse2/Parser
970N/APFE_PATH = $(addprefix -i$(PFE_TOOLDIR)/, $(PFE_DIRS))
970N/A
970N/A# add PFE_PATHS to DERIVEPATH if needed
970N/A# but name clashes currently prevent ATC generation in a single file
970N/APFE_PATHS = $(subst $(space),:,$(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS)))
970N/Apfe_sources = $(wildcard $(subst :,/*hs , $(PFE_PATHS)))
970N/APFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
947N/Ahappy_files = $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
235N/A $(PFE_TOOLDIR)/base/parse2/Lexer/HsLex.hs
247N/A
947N/Alogics += Haskell
235N/Aderived_sources += Haskell/PreludeString.hs
247N/AAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
947N/A Haskell/ProgramaticaPrelude.hs
947N/A
970N/A## rule for appendHaskellPreludeString
970N/AHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
947N/A $(APPENDPRELUDESTRING)
947N/A $(APPENDPRELUDESTRING) < $< > $@
947N/A
947N/AAst_Haskell_files := HsDeclStruct HsExpStruct HsFieldsStruct \
947N/A HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
947N/A HsModule HsName HsLiteral HsIdent
235N/A
241N/AOther_PFE_files := property/AST/HsPropStruct base/defs/PNT \
493N/A base/defs/UniqueNames base/Modules/TypedIds \
493N/A base/TI/TiKinds \
235N/A base/parse2/SourceNames base/syntax/SyntaxRec \
493N/A property/syntax/PropSyntaxStruct
493N/A
1124N/AHaskell_files = $(addsuffix .hs, \
963N/A $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
1124N/A $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
1124N/A
1097N/A## rule for ATC generation
493N/AHaskell/ATC_Haskell.der.hs: $(Haskell_files) utils/genRules
1097N/A utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
1097N/A $(Haskell_files)
493N/Aendif
235N/Ahappy_files += Haskell/Hatchet/HsParser.hs
1124N/A
1124N/A### Profiling (only for debugging)
1124N/A### Attention every module must be compiled with profiling or the linker
1124N/A### cannot link the various .o files properly. So after switching on
1124N/A### Profiling, do an 'gmake real_clean; gmake'
1124N/A### and comment out HC_PACKAGE variable definition above.
1124N/A### Comment in the following line for switching on profiling.
1124N/A#HC_PROF = -prof -auto-all
1124N/A
1124N/AHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
970N/AHC_OPTS = $(HCI_OPTS) $(HC_PROF)
970N/ADRIFT_OPTS = +RTS -K10m -RTS
970N/A
1097N/A### list of directories to run checks in
1097N/ATESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell
1097N/A
1030N/A
822N/A####################################################################
235N/A## sources for hetcats (semi - manually produced with a perl script)
235N/A
822N/AGHCMAKE_OUTPUT = $(wildcard hetcats-make)
822N/A
963N/Aifneq ($(strip $(GHCMAKE_OUTPUT)),)
963N/Ainclude sources_hetcats.mk
935N/Aelse
935N/ASOURCE_PATHS = $(COMMON_LIB_PATH):$(CLEAN_PATH)
935N/Asources = $(wildcard $(subst :,/*hs , $(SOURCE_PATHS))/*hs)
935N/Aendif
935N/A
1088N/Aobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
235N/A
935N/Adrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
963N/A Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
963N/A Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
935N/A $(gendrifted_files)
963N/A
963N/Agenrule_header_files = $(wildcard ATC/*.header.hs)
963N/A
963N/Aatc_files := Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
235N/A Common/AS_Annotation.der.hs \
963N/A Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
235N/A Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
935N/A Static/DevGraph.hs \
935N/A Proofs/Proofs.hs \
963N/A Isabelle/IsaSign.hs
963N/A
935N/Aatc_der_files = $(foreach file, $(atc_files), \
963N/A ATC/$(basename $(basename $(notdir $(file)))).der.hs)
963N/A
963N/ACASL_files := CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
235N/A CASL/AS_Basic_CASL.der.hs
493N/A
1252N/AHasCASL_files := HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
1252N/A HasCASL/Sublogic.hs \
1252N/A
1252N/AModal_files := Modal/AS_Modal.hs Modal/ModalSign.hs
1252N/ACoCASL_files := CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
1252N/ACOL_files := COL/AS_COL.hs COL/COLSign.hs
1252N/ACspCASL_files := CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
1252N/A
1252N/AHatchet_files := Haskell/Hatchet/AnnotatedHsSyn.hs \
1252N/A Haskell/Hatchet/MultiModuleBasics.hs \
822N/A Haskell/Hatchet/HsSyn.hs \
493N/A Haskell/Hatchet/Representation.hs\
822N/A Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
241N/A Haskell/Hatchet/Env.hs \
235N/A
493N/Aatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
235N/A
493N/Agenerated_rule_files = $(atc_der_files) $(atc_logic_files)
235N/A
606N/Agendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
606N/A
606N/Ainline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs \
606N/A Comorphisms/Modal2CASL.hs # Comorphisms/CASL2TopSort.hs
235N/A
922N/Agen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
235N/A
599N/Aderived_sources += $(drifted_files) hetcats/Version.hs $(happy_files) \
1124N/A $(inline_axiom_files) Modal/ModalSystems.hs
235N/A
822N/A# sources that have {-# OPTIONS -cpp #-}
1147N/Acpp_sources = ./Isabelle/Logic_Isabelle.hs \
1147N/A ./Proofs/Proofs.hs hets.hs ./CASL/CCC/FreeTypes.hs \
1124N/A ./Comorphisms/LogicList.hs ./Comorphisms/LogicGraph.hs
606N/A
606N/A# this variable holds the modules that should be documented
606N/Adoc_sources = $(filter-out $(cpp_sources), $(filter-out $(pfe_sources), \
235N/A $(sources))) $(patsubst %.hs, %.hspp, $(cpp_sources))
1030N/A
235N/Atax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
606N/A Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
606N/Atax_objects = $(patsubst %.hs,%.o,$(tax_sources))
1097N/A
822N/A
822N/A####################################################################
1030N/A### targets
963N/A
235N/A.PHONY : all hets-opt hets-optimized clean d_clean real_clean bin_clean \
235N/A lib_clean distclean check capa hacapa h2h clean_genRules genRules \
247N/A taxonomy count doc apache_doc post_doc4apache \
822N/A derivedSources install_hets install release
1019N/A
1030N/A.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
1030N/A#.PRECIOUS: sources_hetcats.mk
1030N/A
1030N/Ahets: $(sources) $(derived_sources)
963N/A $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
235N/A
963N/Ahets-opt:
235N/A $(MAKE) distclean
963N/A $(MAKE) derivedSources
235N/A $(MAKE) real_clean
963N/A $(MAKE) hets-optimized
247N/A
963N/Ahets-optimized: $(derived_sources)
963N/A $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
822N/A strip hets
963N/A
980N/Ahets-old: $(objects)
822N/A $(RM) $@
822N/A $(HC) -o hets $(HC_OPTS) $(objects)
822N/A
822N/Ahets.cgi: $(sources) GUI/hets_cgi.hs
822N/A ghc --make -package-conf /home/luettich/ghc-pkg/package.conf \
822N/A -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_INCLUDE) \
822N/A $(HC_FLAGS) -O
1124N/A strip hets.cgi
1124N/A
1124N/Ataxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
822N/A $(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
822N/A
822N/A###############################
822N/A### TAGS files for (x)emacs
822N/A# load them with "M-x" "visit-tags-table" from
822N/A# "HetCATS/hetcats/hetcats.TAGS"
822N/A# use "M-." to search for a tag
822N/A# !!Beware this is somewhat instable, because it uses an absolute path!!
822N/Ahetcats.TAGS: $(sources)
1124N/A /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
1124N/A $(sources); mv TAGS $@; mv tags hetcats.tags
822N/A
963N/A###############################
1124N/A### count lines of code
970N/Acount: $(sources)
970N/A wc -l $(sources)
970N/A###############################
970N/A### Documentation via haddock
970N/Adoc: docs/index.html
970N/A
970N/A# generate haddock documentation with links to sources
970N/Adocs/index.html: $(doc_sources)
970N/A $(HADDOCK) $(doc_sources) $(uni_sources) -o docs -h -v \
970N/A -i docs/base.haddock -i docs/parsec.haddock -s ../ \
970N/A -t 'hets -- a heterogenous Specification (CASL) tool set'
970N/A
970N/A# sources are not copied here
970N/Aapache_doc:
970N/A $(RM) docs/*.*
970N/A cvs up -d
$(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../.. \
GenerateRules.hs -o ../genRules && strip ../genRules)
$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
$(HC) --make utils/InlineAxioms/InlineAxioms.hs \
$(HC_OPTS) -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
-ln -s ../uni uni
$(RM) -r programatica
-mkdir programatica
-ln -s ../../programatica/tools programatica/tools
(cd HetCATS; $(MAKE) derivedSources; \
$(MAKE) clean; ./clean.sh; \
find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
$(RM) clean.*; mv Makefile Makefile.orig; \
mv ReleaseMakefile Makefile)
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)
$(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)
Modal/ATC_Modal.der.hs: $(Modal_files) utils/genRules
utils/genRules -r $(rule) -o Modal $(Modal_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) utils/genRules
utils/genRules -r $(rule) -o Hatchet -h ATC/Hatchet.header.hs \
$(Hatchet_files)
rule:= ShATermConvertible
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 ;
clean_genRules:
$(RM) $(generated_rule_files) $(gendrifted_files)
#############################
### programatica stuff
LEX_DIR := $(PFE_TOOLDIR)/base/parse2/Lexer
$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
$< > $@
$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
$(LEX_DIR)/HsTokens.hs
$(HC) --make -O -package data \
-i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
-i$(PFE_TOOLDIR)/base/lib \
-i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
$@.hs -o $@
###############
### clean up
clean: bin_clean o_clean
### removes *.hi and *.o in all include directories
o_clean:
for p in $(subst :, ,$(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 $(subst :, ,$(CLEAN_PATH)) . ; do \
(cd $$p ; $(RM) *.d *.d.bak) ; done
### remove files also in own libraries
lib_clean:
for p in $(subst :, ,$(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
$(RM) hetcats-make sources_hetcats.mk
### 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)
### 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: Common/ATerm/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)
### HetCASL with dev graph
hetdg: GUI/hetdg.hs $(drifted_files) *.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### run tests in other directories
check: hetcats
for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
####################################################################
## Preparing the version of HetCATS
hetcats/Version.hs: hetcats/Version.in version_nr
$(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
## two hardcoded dependencies for a correct generation of Version.hs
hetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
hets.hs: hetcats/Version.hs
####################################################################
## rules for DrIFT
.SUFFIXES:
%: %.hs
$(HC) --make -o $@ $<
%.hs: %.ly
$(HAPPY) $<
%.hs: %.y
$(HAPPY) -o $@ $<
%.hs: %.der.hs utils/DrIFT
$(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 $< $@
# hetcats-make is created as side-effect of hets or hets-optimized
sources_hetcats.mk: hetcats-make utils/create_sources.pl
$(PERL) utils/create_sources.pl hetcats-make sources_hetcats.mk