rules revision d0279930f87bf39843e0bd2992a4789322662144
e5803b76927480e8f9b67b22201c484ccf4c2bcfAdam H. Leventhal# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Year: 2004
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# This Makefile will compile the new hets system and provides also
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# targets for test programs during implementation phases.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# !!! Note: This makefile is written for GNU make !!!
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# (gmake on solaris)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl####################################################################
9512fe850e98fdd448c638ca63fdd92a8a510255ahl## Some varibles, which control the compilation
9512fe850e98fdd448c638ca63fdd92a8a510255ahlINCLUDE_PATH =
9512fe850e98fdd448c638ca63fdd92a8a510255ahlHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
9512fe850e98fdd448c638ca63fdd92a8a510255ahlSOURCE_PATHS = . utils/itcor \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# the 'replacing spaces' example was taken from the (GNU) Make info manual
9512fe850e98fdd448c638ca63fdd92a8a510255ahlspace = $(empty) $(empty)
9512fe850e98fdd448c638ca63fdd92a8a510255ahlDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# override on commandline for other architectures
9512fe850e98fdd448c638ca63fdd92a8a510255ahlINSTALLDIR = \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
9512fe850e98fdd448c638ca63fdd92a8a510255ahlDRIFT_deps = utils/DrIFT-src/*hs
9512fe850e98fdd448c638ca63fdd92a8a510255ahlGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
9512fe850e98fdd448c638ca63fdd92a8a510255ahlGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
9512fe850e98fdd448c638ca63fdd92a8a510255ahlINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
GENRULES = utils/genRules
DRIFT = utils/DrIFT
INLINEAXIOMS = utils/outlineAxioms
SETUP = utils/Setup
UNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
# if uni/server is included also HaXml sources are needed
$(wildcard ../uni/htk/haddock/*/*.hs)
TESTTARGETFILES += OWL/OWL11Parser.hs \
PFE_TOOLDIR = $(wildcard ../programatica/tools)
happy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
LEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
programatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
$(LEX_DIR)/HsLex.hs $(SETUP)
-i `pwd`/Haskell/Programatica.patch || exit 0); \
cp -f $(SETUP) ../programatica/tools; \
(cd ../programatica/tools; \
$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
$(LEX_DIR)/HsTokens.hs
-i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
-i$(PFE_TOOLDIR)/base/lib \
$(LEX_DIR)Gen/HsLexerGen
APPENDPRELUDESTRING = utils/appendHaskellPreludeString \
#files in base/TI/
$(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
Haskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
$(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
TESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
sources = hets.hs $(filter-out $(non_sources), \
drifted_files = Common/AS_Annotation.hs \
ATC/$(basename $(basename $(notdir $(file)))).der.hs)
$(GENRULECALL) -i ATC.AS_Structured -o $@ $<
$(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
$(GENRULECALL) -x Logic.Prover.ProverTemplate \
-i ATC.AS_Annotation -o $@ $<
Isabelle_files = Isabelle/IsaSign.hs
ConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
SoftFOL_files = SoftFOL/Sign.hs
OWL_files = OWL/Sign.hs
VSE_files = VSE/As.hs
atc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
gendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
inline_axiom_files = Comorphisms/CASL2PCFOL.hs \
gen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
derived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
$(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
genrule_header_files = $(wildcard ATC/*.header.hs)
nondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
$(wildcard utils/DrIFT-src/*.lhs) \
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
$(wildcard utils/itcor/*.hs) \
$(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
$(patsubst %.hs, %.der.hs, $(drifted_files))
$(SETUP): utils/Setup.hs
base64_pkg: utils/dataenc-0.11.tar.gz $(SETUP)
$(TAR) zxf utils/dataenc-0.11.tar.gz; \
http_pkg: utils/HTTP-3001.0.4.tar.gz $(SETUP)
$(TAR) zxf utils/HTTP-3001.0.4.tar.gz; \
shellac_pkg: utils/shellac.tgz $(SETUP)
$(TAR) zxf utils/shellac.tgz; \
shread_pkg: utils/shread.tgz $(SETUP) shellac_pkg
$(TAR) zxf utils/shread.tgz; \
shcompat_pkg: utils/shcompat.tgz $(SETUP) shread_pkg
$(TAR) zxf utils/shcompat.tgz; \
tagsoup_pkg: utils/tagsoup-0.6.tar.gz $(SETUP)
$(TAR) zxf utils/tagsoup-0.6.tar.gz; \
hxt_pkg: utils/hxt-8.0.0.tar.gz $(SETUP) http_pkg tagsoup_pkg
$(TAR) zxf utils/hxt-8.0.0.tar.gz; \
hxtfilter_pkg: utils/hxt-filter-8.0.0.tar.gz $(SETUP) hxt_pkg
$(TAR) zxf utils/hxt-filter-8.0.0.tar.gz; \
$(HC) --make -O -o hets hets.hs $(HC_OPTS)
$(MAKE) hets.cgi
ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
strip hets.cgi
hets_maintainers.txt: $(sources)
doc: docs/index.html
# the interface treatment is stolen from uni/mk/suffix.mk
docs/index.html: $(doc_sources)
HINTERFACES0=`find -L docs/www -name '*.haddock' \
-p Hets-Haddock-Prologue.txt $(doc_sources)
$(MAKE) hets.cgi
$(PERL) utils/post_process_docs.pl a-docs \
$(PERL) utils/post_process_docs.pl a-docs \
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
$(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
cp Makefile Makefile.orig; \
./clean.sh; \
$(RM) clean.*; utils/replaceAllHeaders.sh)
$(TAR) cvf Hets.tar Hets
cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
### Common/LaTeX_maps.hs generation
utils/genItCorrections: $(GENITCORRECTIONS_deps)
@echo -n "Generating pretty/LaTeX_maps.hs ... "
gen_it_characters gen_it_words >> LaTeX_maps.hs)
CASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
DL/ATC_DL.der.hs: $(DL_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(DL_files)
RelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
Propositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
HasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
Isabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
Modal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
ConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
CASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
CoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
COL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
CspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
SoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
OWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
$(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
VSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
$(RM) hets.cgi
$(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
fromKif: CASL/fromKif
annos: Common/annos
capa: CASL/capa
hacapa: HasCASL/hacapa
hana: Haskell/hana
h2hf: Haskell/h2hf
Common/Lib/*.hs Comorphisms/*.hs
h2h: Haskell/h2h
showKP: Comorphisms/test/showKP
LANG=C $(PERL) utils/build_version.pl version_nr \
< Driver/Version.in > $@
## two hardcoded dependencies for a correct generation of Version.hs
%.hs: %.der.hs $(DRIFT)
%.hs: %.inline.hs $(INLINEAXIOMS)
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
utils/genTransMFormFunc.pl $(INLINEAXIOMS)
$(PERL) utils/genTransMFormFunc.pl $< $@
sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \