rules revision 9bd27fd420bd96640ee300b69c5104c60d8c888b
66b665fac6215b07ef71fd7876590d4c0143e739lutoff# Author: (c) Klaus Luettich, Christian Maeder, Uni Bremen 2002-2009
66b665fac6215b07ef71fd7876590d4c0143e739lutoff# This Makefile will compile the hets system and provides also
66b665fac6215b07ef71fd7876590d4c0143e739lutoff# targets for test programs during implementation phases.
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# !!! Note: This makefile is written for GNU make !!!
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# (gmake on solaris)
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac# the 'replacing spaces' example was taken from the (GNU) Make info manual
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignacspace = $(empty) $(empty)
66b665fac6215b07ef71fd7876590d4c0143e739lutoffDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
66b665fac6215b07ef71fd7876590d4c0143e739lutoffDRIFT_deps = utils/DrIFT-src/*hs
65e99be301d5a19db33f25841f671756e8dbb9b5ludovicpGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
66b665fac6215b07ef71fd7876590d4c0143e739lutoffGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
66b665fac6215b07ef71fd7876590d4c0143e739lutoffGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffGENRULECALL2 = $(GENRULES) -r Typeable -r ShATermLG \
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffHADDOCK = haddock
66b665fac6215b07ef71fd7876590d4c0143e739lutoffifneq ($(strip $(HAXML_PACKAGE_COMPAT)),)
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffifneq ($(strip $(HAXML_PACKAGE)),)
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffderived_sources += Isabelle/IsaExport.hs
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffDTD2HS_deps = $(DTD2HS_src)*.hs
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduff# list glade files
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
d25372dc8e65a9ed019a88fdf659ca61313f1b31jcduffGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
a487f129b43692428fc0e85d81f0f893bf8e3575lutoffderived_sources += $(GTK_GLADE_HSFILES)
PFE_TOOLDIR = $(wildcard programatica/tools)
derived_sources += Haskell/PreludeString.hs
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)
# unset this variable from var.mk because the programatica sources
# uncomment HC_PROF for profiling (and comment out packages in var.mk)
drifted_files = Common/AS_Annotation.hs \
ATC/$(basename $(basename $(notdir $(file)))).der.hs)
# the rules to create ATC .der.hs file for DriFT
$(GENRULECALL) -i ATC.Id -o $@ $<
$(GENRULECALL) -i ATC.Id -o $@ $<
$(GENRULECALL) -x Common.Consistency.ConservativityChecker -o $@ $<
$(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $<
$(GENRULECALL2) -i ATC.AS_Structured -o $@ $<
$(GENRULECALL) -x Logic.Prover.ProverTemplate \
$(GENRULECALL2) -i ATC.DgUtils -o $@ $<
Isabelle_files = Isabelle/IsaSign.hs
ConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
SoftFOL_files = SoftFOL/Sign.hs
VSE_files = VSE/As.hs
OMDoc_files = OMDoc/OMDocInterface.hs
Framework_files = Framework/AS.hs
FreeCAD_files = FreeCAD/As.hs
CASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
$(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_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)
QBF/ATC_QBF.der.hs: $(QBF_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(QBF_files)
HolLight/ATC_HolLight.der.hs: $(HolLight_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(HolLight_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)
Hybrid/ATC_Hybrid.der.hs: $(Hybrid_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Hybrid_files)
TopHybrid/ATC_TopHybrid.der.hs: $(TopHybrid_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(TopHybrid_files)
Temporal/ATC_Temporal.der.hs: $(Temporal_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Temporal_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)
VSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
OMDoc/ATC_OMDoc.der.hs: $(OMDoc_files) $(GENRULES)
$(GENRULECALL) -i ATC.IRI -o $@ $(OMDoc_files)
DFOL/ATC_DFOL.der.hs: $(DFOL_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(DFOL_files)
LF/ATC_LF.der.hs: $(LF_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(LF_files)
Framework/ATC_Framework.der.hs: $(Framework_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Framework_files)
Maude/ATC_Maude.der.hs: $(Maude_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Maude_files)
ExtModal/ATC_ExtModal.der.hs: $(ExtModal_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ExtModal_files)
CSL/ATC_CSL.der.hs: $(CSL_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CSL_files)
CommonLogic/ATC_CommonLogic.der.hs: $(CommonLogic_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CommonLogic_files)
Adl/ATC_Adl.der.hs: $(Adl_files) $(GENRULES)
$(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Adl_files)
Fpl/ATC_Fpl.der.hs: $(Fpl_files) $(GENRULES)
$(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Fpl_files)
THF/ATC_THF.der.hs: $(THF_files) $(GENRULES)
FreeCAD/ATC_FreeCAD.der.hs: $(FreeCAD_files) $(GENRULES)
$(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $(FreeCAD_files)
OWL2/ATC_OWL2.der.hs: $(OWL2_files) $(GENRULES)
$(GENRULECALL) -i ATC.Result -o $@ $(OWL2_files)
RDF/ATC_RDF.der.hs: $(RDF_files) $(GENRULES)
$(GENRULECALL) -i ATC.Result -o $@ $(RDF_files)
CSMOF/ATC_CSMOF.der.hs: $(CSMOF_files) $(GENRULES)
$(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $(CSMOF_files)
#QVTR/ATC_QVTR.der.hs: $(QVTR_files) $(GENRULES)
# $(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $(QVTR_files)
# all ATC .der.hs files for all logics
atc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
# a rule to create all .der.hs files
gendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
derived_sources += $(drifted_files) Driver/Version.hs $(hs_der_files)
$(HC) --make -O -o hets hets.hs $(HC_OPTS)
$(MAKE) hets.cgi
ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
doc: docs/index.html
-i http://hackage.haskell.org/packages/archive/$(basename $(notdir $(file)))/latest/doc/html,$(file))
-p Hets-Haddock-Prologue.txt $(HADDOCK_OPTS) \
$(filter-out Scratch.hs, $(wildcard *.hs))
$(DTD2HS): $(DTD2HS_deps) utils/DtdToHaskell-src/DtdToHaskell.hs
mkdir -p utils/DtdToHaskell-src/DtdToHaskell
cp -f $(DTD2HS_deps) utils/DtdToHaskell-src/DtdToHaskell
utils/DtdToHaskell-src/DtdToHaskell.hs -o $@ $(HC_OPTS)
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules)
svn co -q https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
cp Makefile Makefile.orig; \
./clean.sh; \
$(RM) clean.*; utils/replaceAllHeaders.sh)
$(TAR) cf Hets.tar Hets
# 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)
-o -name \*.exe -o -name \*.exe.manifest | xargs $(RM)
$(RM) hets.cgi
$(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
$(RM) ToHaskell/test/*.{out,output}
$(RM) */test/temp*
$(RM) doc/UserGuide.{log,aux,bbl,blg,out,pdf}
$(RM) OWL2/*.jar OWL2/java/lib/*.jar
$(RM) -r utils/DtdToHaskell-src/DtdToHaskell
build: hets.hs
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
cp Driver/Version.in $@
%.hs: %.der.hs $(DRIFT)
%.hs: %.glade utils/appendHaskellPreludeString \
cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
utils/appendHaskellPreludeString $< > $@
sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \
$(RM) -r OWL2/java/OwlApi
mkdir -p RDF/java/lib
if [ -f RDF/java/lib/arq-2.8.7.jar ]; then \
echo "File arq-2.8.7.jar already exists"; \
curl -o RDF/java/lib/arq-2.8.7.jar http://repo1.maven.org/maven2/com/hp/hpl/jena/arq/2.8.7/arq-2.8.7.jar; \
if [ -f RDF/java/lib/icu4j-3.4.4.jar ]; then \
echo "File icu4j-3.4.4.jar already exists"; \
curl -o RDF/java/lib/icu4j-3.4.4.jar http://repo1.maven.org/maven2/com/ibm/icu/icu4j/3.4.4/icu4j-3.4.4.jar; \
if [ -f RDF/java/lib/iri-0.8.jar ]; then \
echo "File iri-0.8.jar already exists"; \
curl -o RDF/java/lib/iri-0.8.jar http://repo1.maven.org/maven2/com/hp/hpl/jena/iri/0.8/iri-0.8.jar; \
if [ -f RDF/java/lib/jena-2.6.4.jar ]; then \
echo "File jena-2.6.4.jar already exists"; \
curl -o RDF/java/lib/jena-2.6.4.jar http://repo1.maven.org/maven2/com/hp/hpl/jena/jena/2.6.4/jena-2.6.4.jar; \
if [ -f RDF/java/lib/junit-4.5.jar ]; then \
echo "File junit-4.5.jar already exists"; \
if [ -f RDF/java/lib/log4j-1.2.13.jar ]; then \
echo "File log4j-1.2.13.jar already exists"; \
curl -o RDF/java/lib/log4j-1.2.13.jar http://repo1.maven.org/maven2/log4j/log4j/1.2.13/log4j-1.2.13.jar; \
if [ -f RDF/java/lib/lucene-core-2.3.1.jar ]; then \
echo "File lucene-core-2.3.1.jar already exists"; \
curl -o RDF/java/lib/lucene-core-2.3.1.jar http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/2.3.1/lucene-core-2.3.1.jar; \
if [ -f RDF/java/lib/slf4j-api-1.5.8.jar ]; then \
echo "File slf4j-api-1.5.8.jar already exists"; \
curl -o RDF/java/lib/slf4j-api-1.5.8.jar http://repo2.maven.org/maven2/org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.jar; \
if [ -f RDF/java/lib/slf4j-log4j12-1.5.8.jar ]; then \
echo "File slf4j-log4j12-1.5.8.jar already exists"; \
curl -o RDF/java/lib/slf4j-log4j12-1.5.8.jar http://repo2.maven.org/maven2/org/slf4j/slf4j-log4j12/1.5.8/slf4j-log4j12-1.5.8.jar; \
if [ -f RDF/java/lib/stax-api-1.0.1.jar ]; then \
echo "File stax-api-1.0.1.jar already exists"; \
if [ -f RDF/java/lib/wstx-asl-3.2.9.jar ]; then \
echo "File wstx-asl-3.2.9.jar already exists"; \
curl -o RDF/java/lib/wstx-asl-3.2.9.jar http://repo1.maven.org/maven2/org/codehaus/woodstox/wstx-asl/3.2.9/wstx-asl-3.2.9.jar; \
if [ -f RDF/java/lib/xercesImpl-2.7.1.jar ]; then \
echo "File xercesImpl-2.7.1.jar already exists"; \
curl -o RDF/java/lib/xercesImpl-2.7.1.jar http://mirrors.ibiblio.org/pub/mirrors/maven2/xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar; \
cabal install http://protempore.net/rdf4h/rdf4h-0.6.1.tar.gz