rules revision 61fa0ac06ede811c7aad54ec4c4202346727368e
822b18599d1c9465449c7111fe7e7b86fbf44a57Lennart Poettering# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
822b18599d1c9465449c7111fe7e7b86fbf44a57Lennart Poettering# This Makefile will compile the new hetcats system and provides also
822b18599d1c9465449c7111fe7e7b86fbf44a57Lennart Poettering# targets for test programs during implementation phases.
822b18599d1c9465449c7111fe7e7b86fbf44a57Lennart Poettering# !!! Note: This makefile is written for GNU make !!!
822b18599d1c9465449c7111fe7e7b86fbf44a57Lennart Poettering# (gmake on solaris ; make on linux)
082694b75f0217f1c5b8b89590e5018f6d8b0949Lennart Poettering####################################################################
COMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm:fgl/Data/Graph:fgl/Data/Graph/Inductive:fgl/Data/Graph/Inductive/Aux:fgl/Data/Graph/Inductive/Monad:fgl/Data/Graph/Inductive/Query
CLEAN_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:$(PFE_DRIFTPATH)
LINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
DRIFT_deps = utils/DrIFT-src/*hs
GENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
INLINEAXIOMS_deps = utils/InlineAxioms/*hs
DRIFT = $(DRIFT_ENV) utils/DrIFT
INLINEAXIOMS = utils/outlineAxioms
# flags also come in via ../uni/uni-package.conf
HC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
PFE_TOOLDIR = $(wildcard ../programatica/tools)
hs2stratego hs2stratego/AST
include sources_hetcats.mk
genrule_header_files = $(wildcard ATC/*.header.hs)
atc_der_files = $(foreach file, $(atc_files), ATC/$(basename $(basename $(notdir $(file)))).der.hs)
atc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
gendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
gen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
derived_sources = $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files) Modal/ModalSystems.hs
cpp_sources = ./Isabelle/Logic_Isabelle.hs \
# if uni/server is included also HaXml sources are needed
uni_sources = $(wildcard ../uni/davinci/haddock/*.hs) \
$(wildcard ../uni/graphs/haddock/*.hs) \
$(wildcard ../uni/htk/haddock/*/*.hs) \
$(wildcard ../uni/events/haddock/*.hs) \
$(wildcard ../uni/reactor/haddock/*.hs) \
$(wildcard ../uni/util/haddock/*.hs) \
$(wildcard ../uni/posixutil/haddock/*.hs)
taxonomy hets.cgi count doc apache_doc post_doc4apache \
#.PRECIOUS: sources_hetcats.mk
$(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
$(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_OPTS) -O
taxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
$(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
hetcats.TAGS: $(sources)
$(sources); mv TAGS $@; mv tags hetcats.tags
doc: docs/index.html
docs/index.html: $(doc_sources)
$(PERL) utils/post_process_docs.pl docs \
utils/DrIFT: $(DRIFT_deps)
utils/genRules: $(GENERATERULES_deps)
(cd utils/GenerateRules; \
$(HC) --make '-i../..:../DrIFT-src' -package text GenerateRules.hs -o ../genRules && \
$(HC) --make utils/InlineAxioms/InlineAxioms.hs \
(cd HetCATS; $(MAKE) derivedSources; ./clean.sh; \
$(RM) clean.*; mv Makefile Makefile.orig; \
tar cvf HetCATS.tar HetCATS
cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
utils/genRules -r $(rule) -o CASL $(CASL_files)
utils/genRules -r $(rule) -o HasCASL $(HasCASL_files)
utils/genRules -r $(rule) -o Modal $(Modal_files)
utils/genRules -r $(rule) -o CoCASL $(CoCASL_files)
utils/genRules -r $(rule) -o COL $(COL_files)
utils/genRules -r $(rule) -o CspCASL $(CspCASL_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); \
utils/genRules -r $(rule) -o ATC $(file); \
$(RM) CASL/capa
$(RM) HasCASL/hacapa
$(RM) Haskell/hapa
$(RM) Haskell/hana
$(RM) Haskell/wrap
$(RM) Syntax/hetpa
$(RM) Static/hetana
$(RM) GUI/hetdg
$(RM) Common/annos
$(RM) Haskell/Hatchet/hatch
$(RM) ToHaskell/translateAna
$(RM) Taxonomy/taxonomyTool
### also delete *.d.bak (dependency file backups)
(cd $$p ; $(RM) *.d *.d.bak) ; done
$(RM) hetcats-make sources_hetcats.mk
$(RM) hetcats/Version.hs
test_parser: Common/test_parser
capa: CASL/capa
hacapa: HasCASL/hacapa
hapa: Haskell/hapa
hana: Haskell/hana
hetpa: Syntax/hetpa.hs Syntax/*.hs
hetana: Static/hetana.hs Static/*.hs
atctest: ATC/ATCTest.hs ATC/*.hs
### ATerm.Lib test system
hetdg: GUI/hetdg.hs $(drifted_files) *.hs
$(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
## two hardcoded dependencies for a correct generation of Version.hs
%.hs: %.inline.hs $(INLINEAXIOMS)
## 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 $< $@