rules revision f5c9b1e739228c2a2edf055ac419583412569683
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington# Author: (c) Klaus Luettich, Christian Maeder, Uni Bremen 2002-2009
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington# This Makefile will compile the hets system and provides also
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington# targets for test programs during implementation phases.
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington# !!! Note: This makefile is written for GNU make !!!
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington# (gmake on solaris)
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington# the 'replacing spaces' example was taken from the (GNU) Make info manual
002fd0354ed8b143749ea90a0a80735851813659Phill Cunningtonspace = $(empty) $(empty)
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonHAPPY = happy -sga
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonGENRULECALL2 = $(GENRULES) -r Typeable -r ShATermLG \
002fd0354ed8b143749ea90a0a80735851813659Phill Cunnington -i Data.Typeable -i ATerm.Lib -i ATC.Grothendieck
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonHADDOCK = haddock
002fd0354ed8b143749ea90a0a80735851813659Phill CunningtonARCH = $(subst $(space),,$(shell uname -m))
GTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
PFE_TOOLDIR = $(wildcard programatica/tools)
happy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
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) -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)
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 OMDoc.ATerm -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)
# 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 $(happy_files) \
$(SETUP): utils/Setup.hs
$(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) \
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules)
$(HC) $(PARSEC_FLAG) --make utils/InlineAxioms/InlineAxioms.hs \
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
# 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
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
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)
%.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 \
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