Makefile revision 60e6795dd310e10194e12bb660575aadf941328b
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering#!/usr/bin/make -f
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Makefile
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering#
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Authors: (c) Klaus Luettich, Christian Maeder, Uni Bremen 2002-2009
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Jens Elkner, Uni Magdeburg 2016
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# This GNU Makefile will compile the hets system and provides also
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# targets for test programs during implementation phases.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringinclude var.mk
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringNO_BIND_WARNING := -fno-warn-unused-do-bind
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringHC_WARN := -Wall -fwarn-tabs \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering -fwarn-unrecognised-pragmas -fno-warn-orphans $(NO_BIND_WARNING)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# uncomment HC_PROF for profiling (and comment out packages in var.mk)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# call resulting binary with a final +RTS -p to get a file <binary>.prof
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering#HC_PROF := -prof -auto-all -osuf p_o +RTS -K100m -RTS
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringHC_OPTS += $(HC_WARN) $(HC_PROF)
68ce1b7f2d70db4a248b62e602086d7420a99e3bLennart Poettering# -ddump-minimal-imports
e99e38bbdcca3fe5956823bdb3d38544ccf93221Lennart Poettering# uncomment the above line to generate .imports files for displayDependencyGraph
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering.DEFAULT_GOAL := hets
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
b60e6bbf67063c6b81b5025d572ebe71aa7ab799Lennart Poettering.NOTPARALLEL:
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
1b322bdb2a147e999c3861cba8a6b3ac0f3b712aTollef Fog Heen# *.bin variants here to let them survive a 'make clean'
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringall: hets.bin hets_server.bin
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
22be093ffb403a1c474037939ca9b88b1ee39f77Lennart Poettering# Documentation (no haddock stuff, i.e. "docs/index.html", since developer can
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# generated it on demand by themselves and other users dont't need it). Other
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# papers (doc/*.pdf) are already pre-generated.
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringdocs: doc/UserGuide.pdf
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Upgrade haskell-stack
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringstack_upgrade:
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering $(STACK) upgrade
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering $(STACK_EXEC) -- ghc-pkg recache
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering# Create the build environment
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringstack: $(STACK_UPGRADE_TARGET)
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering $(STACK) build --install-ghc --only-dependencies $(STACK_DEPENDENCIES_FLAGS)
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering touch stack
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart Poettering
e9da3678fcfc774b325dc1eaa054d0e00028a1fcLennart PoetteringSED := $(shell [ "$(OSNAME)" = 'SunOS' ] && printf 'gsed' || printf 'sed')
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringTAR := $(shell [ "$(OSNAME)" = 'SunOS' ] && printf 'gtar' || printf 'tar')
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringINSTALL := $(shell [ "$(OSNAME)" = 'SunOS' ] && printf 'ginstall' || printf 'install')
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringHETS_VERSION ?= $(shell ${SED} -n \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering -e '/^hetsVersionNumeric =/ { s/.*"\([^"]*\)".*/\1/; p; q; }' \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering Driver/Version.hs )
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringdefine EOL
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringendef
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
27765dfc7a32d790badb29e6498b34edb0b60c33Lennart Poettering# indicate, whether working on an exported repo
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringEXPORTED := $(shell [ -d .git ] || printf 1)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering# the 'replacing spaces' example was taken from the (GNU) Make info manual
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringempty =
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringspace = $(empty) $(empty)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringDRIFT_deps = utils/DrIFT-src/*hs
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringPERL = perl
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringGENRULES = utils/genRules
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringGENRULECALL = $(GENRULES) -r ShATermConvertible \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -i ATerm.Lib
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringGENRULECALL2 = $(GENRULES) -r ShATermLG \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering -i ATerm.Lib -i ATC.Grothendieck
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringDRIFT = utils/DrIFT
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringHADDOCK = haddock
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringDTD2HS = utils/DtdToHaskell
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringifneq ($(strip $(HAXML_PACKAGE_COMPAT)),)
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart PoetteringDTD2HS_src = utils/DtdToHaskell-src/pre-1.22/
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poetteringelse
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringDTD2HS_src = utils/DtdToHaskell-src/current/
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poetteringendif
8745297f9853c4a17bac69e1b7e652fe81bc1940Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringifneq ($(strip $(HAXML_PACKAGE)),)
be1a67d9d63bfdd4a5f8ba9cfc804030f10f5833Lennart Poetteringderived_sources += Isabelle/IsaExport.hs
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poetteringendif
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut BarbieriDTD2HS_deps = $(DTD2HS_src)*.hs
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri# list glade files
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut BarbieriGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut BarbieriGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
9b85fc6a89386582bfe792dba881800b0a093839Gustavo Sverzut Barbieri
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringderived_sources += $(GTK_GLADE_HSFILES)
139be57d9441b5c890e1e4ee69e15aad03276fdeLennart Poettering
139be57d9441b5c890e1e4ee69e15aad03276fdeLennart Poettering# the list of logics that need ShATermConvertible instances
139be57d9441b5c890e1e4ee69e15aad03276fdeLennart Poetteringlogics = CASL HasCASL Isabelle Modal Hybrid TopHybrid Temporal \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering CoCASL COL CspCASL CASL_DL \
afea26ad7d406d8b6c95d2642cb5a1d807b87546Lennart Poettering SoftFOL ConstraintCASL Propositional RelationalScheme VSE OMDoc DFOL \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering LF Framework Maude ExtModal CommonLogic CSL QBF Adl HolLight Fpl THF \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering FreeCAD OWL2 RDF CSMOF QVTR
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
b237ef2cfac7ab0b33170809e8cb64628606207dTollef Fog HeenTESTTARGETFILES += Scratch.hs CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
f1dfb62962fd25c1fba9d9479cb5df2d23e6712dLennart Poettering Common/ATerm/ATermDiffMain.hs Common/annos.hs \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering Comorphisms/test/sublogicGraph.hs PGIP/ParseProofScript.hs \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering Common/testxupdate.hs Common/testxpath.hs \
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart Poettering SoftFOL/dfg.hs Adl/adl.hs GUI/displayDependencyGraph.hs
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering### list of directories to run checks in
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart PoetteringTESTDIRS += Common CASL Fpl/test HasCASL test ExtModal/Tries \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering CommonLogic/TestData
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poetteringhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walshifneq ($(PFE_FLAGS),)
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J WalshPFE_TOOLDIR := $(wildcard $(dir $(PFE_SETUP)))
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J WalshPFE_DIRS := base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh base/transforms base/transforms/Deriving property \
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh property/syntax property/AST property/transforms \
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh property/TI property/defs property/parse2 property/parse2/Parser
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J WalshPFE_PATHS := $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J WalshDRIFT_ENV := DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walsh
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walshlogics += Haskell
56cf987fe74270bde4e16c7ec9e0414a9030723bDaniel J Walshderived_sources += Haskell/PreludeString.hs
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering Haskell/ProgramaticaPrelude.hs
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering## rule for appendHaskellPreludeString
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering $(APPENDPRELUDESTRING)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering $(APPENDPRELUDESTRING) < $< > $@
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering HsModule HsName HsLiteral HsIdent
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering#files in base/TI/
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringOther_PFE_files := property/AST/HsPropStruct base/defs/PNT \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering base/parse2/SourceNames base/syntax/SyntaxRec \
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering property/syntax/PropSyntaxStruct
0213c3f8102bdc934c629d11a44ca0b408762287Lennart Poettering
0213c3f8102bdc934c629d11a44ca0b408762287Lennart PoetteringHaskell_files := $(addsuffix .hs, \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering## rule for ATC generation
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering $(GENRULECALL) -r Typeable -i Data.Typeable -i Haskell.BaseATC \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering -o $@ $(Haskell_files)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringhs_der_files += $(hs_clean_files)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringTESTDIRS += ToHaskell
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringelse
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringDRIFT_ENV := DERIVEPATH=
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringendif
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# end of programatica stuff (PFE_FLAGS)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart PoetteringTESTTARGETS := $(subst .hs,,$(TESTTARGETFILES))
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# files generated by DriFT
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringdrifted_files = Common/AS_Annotation.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering CASL/AS_Basic_CASL.hs Modal/AS_Modal.hs Hybrid/AS_Hybrid.hs TopHybrid/AS_TopHybrid.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering Propositional/AS_BASIC_Propositional.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering CASL_DL/AS_CASL_DL.hs THF/As.hs \
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
812cce323db081634f37e4ec6d29f2b9328a3f52Lennart Poettering RelationalScheme/AS.hs ATC/Grothendieck.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering ExtModal/AS_ExtModal.hs QBF/AS_BASIC_QBF.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering CommonLogic/AS_CommonLogic.hs Fpl/As.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering $(gendrifted_files)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering# files to extract data types from to generate ShATermConvertible instances
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs \
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering Common/Consistency.hs Common/ProofTree.hs \
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering Static/DgUtils.hs Static/XGraph.hs Static/DevGraph.hs \
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering Common/Id.hs Common/Result.hs Common/OrderedMap.hs \
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering Common/Lib/Graph.hs Common/IRI.hs
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering# files generated by genRules as input for DriFT
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poetteringatc_der_files = $(foreach file, $(atc_files), \
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering ATC/$(basename $(basename $(notdir $(file)))).der.hs)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering# the rules to create ATC .der.hs file for DriFT
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/Id.der.hs: Common/Id.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/IRI.der.hs: Common/IRI.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -i ATC.Id -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/Result.der.hs: Common/Result.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -i ATC.Id -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/OrderedMap.der.hs: Common/OrderedMap.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/Graph.der.hs: Common/Lib/Graph.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -i ATC.IRI -i Common.ATerm.ConvInstances -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart PoetteringATC/Consistency.der.hs: Common/Consistency.hs $(GENRULES)
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering $(GENRULECALL) -x Common.Consistency.ConservativityChecker -o $@ $<
4927fcae48de061393b3ce9c12d49f80d73fbf1dLennart Poettering
a9b5b03212f9c854938483b8901e433c2ba6619bMichael TremerATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer $(GENRULECALL) -i ATC.IRI -i Common.ATerm.ConvInstances -o $@ $<
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer
efb3237ee69bc593b11bc828791ee48ba6cc4f5cLennart PoetteringATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer $(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $<
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer
a9b5b03212f9c854938483b8901e433c2ba6619bMichael TremerATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer $(GENRULECALL) -o $@ $<
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer
a9b5b03212f9c854938483b8901e433c2ba6619bMichael TremerATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer $(GENRULECALL2) -o $@ $<
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer
a9b5b03212f9c854938483b8901e433c2ba6619bMichael TremerATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
d3d91d10c9ca3782c5936c630e87730e3bf9c32dLennart Poettering $(GENRULECALL2) -i ATC.AS_Structured -o $@ $<
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering
42e39f0b326d27f6392a81a7400f9af7cf0af3abLennart PoetteringATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
47be870bd83fb3719dffc3ee9348a409ab762a14Lennart Poettering $(GENRULECALL2) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Result -o $@ $<
5e6afdd3d359fc42de7ac432243e98673577e81fLennart Poettering
5e6afdd3d359fc42de7ac432243e98673577e81fLennart PoetteringATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds $(GENRULECALL) -x Logic.Prover.ProverTemplate \
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering -x Logic.Prover.ConsChecker \
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering -i ATC.AS_Annotation -i ATC.OrderedMap -o $@ $<
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringATC/DgUtils.der.hs: Static/DgUtils.hs $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL2) -i ATC.LibName -i ATC.Consistency -o $@ $<
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringATC/XGraph.der.hs: Static/XGraph.hs $(GENRULES)
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds $(GENRULECALL2) -i ATC.DgUtils -o $@ $<
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew EdmundsATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
d7c114c00030309435fc56c77c8578a25d228ebeDave Reisner $(GENRULECALL2) -i ATC.XGraph -i ATC.AS_Library -o $@ $<
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian Henze
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm Studd# ATC files for every logic
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering CASL/AS_Basic_CASL.der.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringIsabelle_files = Isabelle/IsaSign.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
7d568925bda9797f611e36d1d00cd941701cb3c8Lennart PoetteringPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering Propositional/Sublogic.hs
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering
34eff652cedec3cac34b92629ead5f140334b689Lennart PoetteringHolLight_files = HolLight/Sentence.hs HolLight/Sign.hs \
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering HolLight/Sublogic.hs HolLight/Term.hs
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering
34eff652cedec3cac34b92629ead5f140334b689Lennart PoetteringQBF_files = Propositional/Sign.hs QBF/Morphism.hs \
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering QBF/AS_BASIC_QBF.hs QBF/Symbol.hs \
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering QBF/Sublogic.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
34eff652cedec3cac34b92629ead5f140334b689Lennart PoetteringHybrid_files = Hybrid/AS_Hybrid.hs Hybrid/HybridSign.hs
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart PoetteringTopHybrid_files = TopHybrid/AS_TopHybrid.hs TopHybrid/TopHybridSign.hs
34eff652cedec3cac34b92629ead5f140334b689Lennart Poettering
34eff652cedec3cac34b92629ead5f140334b689Lennart PoetteringTemporal_files = Temporal/AS_BASIC_Temporal.hs Temporal/Sign.hs \
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart Poettering Temporal/Symbol.hs Temporal/Morphism.hs
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart Poettering
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart PoetteringConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart PoetteringCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart PoetteringCOL_files = COL/AS_COL.hs COL/COLSign.hs
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart Poettering
83bda35801aa3d7ed180ec374a4bcdfe9dc1a8e4Lennart PoetteringCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart Poettering CspCASL/SignCSP.hs CspCASL/SymbItems.hs CspCASL/Symbol.hs \
2c696a96a2bd63d2ff0d5595622124ef9270b172Lennart Poettering CspCASL/Morphism.hs
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringSoftFOL_files = SoftFOL/Sign.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringVSE_files = VSE/As.hs
634826b51b074b2e6d9314031bdd9abdcf862b54Pavol RusnakOMDoc_files = OMDoc/OMDocInterface.hs
12e84679cc81cdf5f042540e54131a0ce37147adLennart PoetteringDFOL_files = DFOL/AS_DFOL.hs DFOL/Sign.hs DFOL/Morphism.hs DFOL/Symbol.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringLF_files = LF/Sign.hs LF/Morphism.hs LF/AS.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringFramework_files = Framework/AS.hs
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart PoetteringMaude_files = Maude/Sign.hs Maude/Morphism.hs Maude/Sentence.hs \
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds Maude/Symbol.hs Maude/AS_Maude.hs
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringExtModal_files = ExtModal/AS_ExtModal.hs ExtModal/ExtModalSign.hs \
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds ExtModal/MorphismExtension.hs ExtModal/Sublogic.hs
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew EdmundsCSL_files = CSL/Sign.hs CSL/Morphism.hs CSL/AS_BASIC_CSL.hs CSL/Symbol.hs \
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds CSL/TreePO.hs
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew EdmundsCommonLogic_files = CommonLogic/AS_CommonLogic.hs CommonLogic/Sign.hs \
d7c114c00030309435fc56c77c8578a25d228ebeDave Reisner CommonLogic/Symbol.hs CommonLogic/Morphism.hs CommonLogic/Sublogic.hs
d7c114c00030309435fc56c77c8578a25d228ebeDave Reisner
d7c114c00030309435fc56c77c8578a25d228ebeDave ReisnerAdl_files = Adl/As.hs Adl/Sign.hs
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart Poettering
d7c114c00030309435fc56c77c8578a25d228ebeDave ReisnerFpl_files = Fpl/As.hs Fpl/Sign.hs
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering
d7c114c00030309435fc56c77c8578a25d228ebeDave ReisnerTHF_files = THF/As.hs THF/Cons.hs THF/Sign.hs THF/Sublogic.hs
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian Henze
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioFreeCAD_files = FreeCAD/As.hs
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart PoetteringOWL2_files = OWL2/AS.hs OWL2/Symbols.hs OWL2/Sign.hs OWL2/MS.hs \
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian Henze OWL2/Morphism.hs OWL2/ProfilesAndSublogics.hs OWL2/Sublogic.hs \
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering OWL2/Profiles.hs
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian Henze
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm StuddRDF_files = RDF/AS.hs OWL2/AS.hs RDF/Symbols.hs RDF/Sign.hs RDF/Morphism.hs \
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm Studd RDF/Sublogic.hs
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm Studd
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm StuddCSMOF_files = CSMOF/As.hs CSMOF/Sign.hs
12e84679cc81cdf5f042540e54131a0ce37147adLennart Poettering
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm StuddQVTR_files = QVTR/As.hs QVTR/Sign.hs
bf024b022d9f53d2bb8d26107b4878cede3167b7Tollef Fog Heen
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen# ATC DrIFT-rule generation for logics
b6c2bf61c5de1bb0c4996b0be016d55877d9688cLennart PoetteringCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
bf024b022d9f53d2bb8d26107b4878cede3167b7Tollef Fog HeenRelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringPropositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog HeenQBF/ATC_QBF.der.hs: $(QBF_files) $(GENRULES)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(QBF_files)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog HeenHolLight/ATC_HolLight.der.hs: $(HolLight_files) $(GENRULES)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(HolLight_files)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog HeenHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog HeenIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -o $@ $(Isabelle_files)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart PoetteringModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
136337ff74f05be3d42a769d9f0cb99716c5c40fTollef Fog Heen
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringHybrid/ATC_Hybrid.der.hs: $(Hybrid_files) $(GENRULES)
d64b723a9e275ee4c6ccb947e3fd6ed6b3e4c359Lennart Poettering $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Hybrid_files)
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart Poettering
12e84679cc81cdf5f042540e54131a0ce37147adLennart PoetteringTopHybrid/ATC_TopHybrid.der.hs: $(TopHybrid_files) $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(TopHybrid_files)
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioTemporal/ATC_Temporal.der.hs: $(Temporal_files) $(GENRULES)
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Temporal_files)
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
07459bb6b92268beb2599f65cf195708d88c51ccFabiano Fidêncio $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew Edmunds
858dae181bb5461201ac1c04732d3ef4c67a0256Andrew EdmundsCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
d7c114c00030309435fc56c77c8578a25d228ebeDave Reisner $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
f2b4af1cd4112df6ce56f8fc1e677639935e3d0eFabian Henze
65c8976ab12f13fc339a16d108e620bf2fd703f4Malcolm StuddCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart Poettering
2c696a96a2bd63d2ff0d5595622124ef9270b172Lennart PoetteringSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringVSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -x VSE.As.FoldRec -i CASL.ATC_CASL -o $@ $(VSE_files)
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringOMDoc/ATC_OMDoc.der.hs: $(OMDoc_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -i ATC.IRI -o $@ $(OMDoc_files)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringDFOL/ATC_DFOL.der.hs: $(DFOL_files) $(GENRULES)
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(DFOL_files)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringLF/ATC_LF.der.hs: $(LF_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(LF_files)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart PoetteringFramework/ATC_Framework.der.hs: $(Framework_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Framework_files)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringMaude/ATC_Maude.der.hs: $(Maude_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Maude_files)
d122948d6fbaac4505cf14a08f1237daa89efdd0Lennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringExtModal/ATC_ExtModal.der.hs: $(ExtModal_files) $(GENRULES)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ExtModal_files)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart PoetteringCSL/ATC_CSL.der.hs: $(CSL_files) $(GENRULES)
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CSL_files)
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart PoetteringCommonLogic/ATC_CommonLogic.der.hs: $(CommonLogic_files) $(GENRULES)
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CommonLogic_files)
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart PoetteringAdl/ATC_Adl.der.hs: $(Adl_files) $(GENRULES)
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Adl_files)
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart PoetteringFpl/ATC_Fpl.der.hs: $(Fpl_files) $(GENRULES)
a6baa3f681fad58555e28c50589595d98ec81a23Lennart Poettering $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Fpl_files)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringTHF/ATC_THF.der.hs: $(THF_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -i ATC.Id -i ATC.GlobalAnnotations -o $@ $(THF_files)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart PoetteringFreeCAD/ATC_FreeCAD.der.hs: $(FreeCAD_files) $(GENRULES)
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering $(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $(FreeCAD_files)
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart PoetteringOWL2/ATC_OWL2.der.hs: $(OWL2_files) $(GENRULES)
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering $(GENRULECALL) -i ATC.Result -o $@ $(OWL2_files)
a45a909fbbe11ad8c75cda5639d875476ac65453Christian Ruppert
a45a909fbbe11ad8c75cda5639d875476ac65453Christian RuppertRDF/ATC_RDF.der.hs: $(RDF_files) $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i ATC.Result -o $@ $(RDF_files)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart PoetteringCSMOF/ATC_CSMOF.der.hs: $(CSMOF_files) $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $(CSMOF_files)
2c696a96a2bd63d2ff0d5595622124ef9270b172Lennart Poettering
07459bb6b92268beb2599f65cf195708d88c51ccFabiano FidêncioQVTR/ATC_QVTR.der.hs: $(QVTR_files) CSMOF/ATC_CSMOF.hs $(GENRULES)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering $(GENRULECALL) -i CSMOF.ATC_CSMOF -i Common.ATerm.ConvInstances \
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering -o $@ $(QVTR_files)
a7b6f8e578724c3b4f0cfc8777d9b4a8e29207b0Lennart Poettering
a9b5b03212f9c854938483b8901e433c2ba6619bMichael Tremer# all ATC .der.hs files for all logics
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poetteringatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
5b6319dceedd81f3f1ce7eb70ea5defaef43bcecLennart Poettering
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poetteringgenerated_rule_files = $(atc_der_files) $(atc_logic_files)
1271623839b5bb4f0f383a8ad5500462dda0a94aLennart Poettering
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart Poettering# a rule to create all .der.hs files
8c4a3079a7f358c179430d1aec59de8b670b5f6eLennart PoetteringgenRules: $(generated_rule_files)
d1ab0ca07372649dad70a0348d75e394f254e1b6Lennart Poettering
8c6db8336536916d0476ff8233e0abf40a2f6aabLennart Poettering# the final ATC target files created by DriFT
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringgendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poettering# all sources that need to be created before ghc can be called
d2d12cd1bfd90f3a13273d82331a7cbd36a93231Lennart Poetteringderived_sources += $(drifted_files) $(hs_der_files)
0571e0111d76cf96aa4069d9c7a6e24d97aa7e48Lennart Poettering
####################################################################
# BUILD related targets
####################################################################
.PHONY: all hets-opt hets-optimized hets_server-opt docs jars \
clean o_clean clean_pretty bin_clean java_clean realclean distclean \
annos check test capa hacapa h2h h2hf showKP clean_genRules genRules \
count fromKif release cgi ghci build-hets callghc \
get-programatica check_desktop check_server check_cgi \
install install-common install-owl-tools archive \
build-indep build-arch build binary-indep binary-arch binary
.SECONDARY: $(generated_rule_files)
.PRECIOUS: %.bin
# dummy target to force ghc invocation
callghc:
# some trickery to trigger a full clean if the main target (hets, hets_server)
# changed since last call
check_desktop:
-@[ -e .hets_server -o -e .hets_cgi -o -e .hets_oow ] && $(MAKE) clean
check_server:
-@[ -e .hets_desktop -o -e .hets_cgi -o -e .hets_oow ] && $(MAKE) clean
check_cgi:
-@[ -e .hets_desktop -o -e .hets_server -o -e .hets_oow ] && $(MAKE) clean
%-opt: HC_OPTS += -O
# the variant without GUI
hets_server hets_server-opt: HASKELINE_PACKAGE :=
hets_server hets_server-opt: GLADE_PACKAGE :=
hets_server hets_server-opt: UNI_PACKAGE :=
hets_server hets_server-opt: check_server $(derived_sources)
@touch .hets_server
$(HC) --make $(HC_OPTS) -o hets_server hets.hs
@ln -f hets_server hets_server.bin
hets-opt: check_desktop $(derived_sources)
@touch .hets_desktop
$(HC) --make $(HC_OPTS) -o hets hets.hs
@ln -f hets hets.bin
# deprecated target name
hets-optimized: hets-opt
hets_cgi hets_cgi-opt: check_cgi GUI/hets_cgi.hs $(derived_sources)
@touch .hets_cgi
$(HC) --make $(HC_OPTS) -o hets.cgi GUI/hets_cgi.hs
@ln -f hets.cgi hets_cgi.bin
derivedSources: $(derived_sources)
TEX_FILES := $(wildcard doc/*.tex doc/*.png doc/*.dot doc/*.sty doc/*.eps)
doc/UserGuide.pdf: $(TEX_FILES)
@X=`which latexmk 2>/dev/null` ; \
if [ -n "$$X" ]; then \
cd doc ; latexmk -silent -pdf -use-make \
-pdflatex="pdflatex -interaction=nonstopmode" UserGuide.tex ; \
else \
printf '\nMissing "latexmk" - unable to create doc/UserGuide.pdf!\n\n';\
fi
# replace '$Header$' in all *.hs with the filename of the containing file
# call it from time to time
updateHeaders: $(derived_sources)
@find . -name '*.hs' -exec fgrep -l '$$Header$$' {} + | xargs -I@ \
${SED} -i -e 's|\$$Header\$$|@|g' @
GHC_LIBDIR := $(shell $(STACK_EXEC) ghc --print-libdir)
GHC_BASEDIR := $(shell cd $(GHC_LIBDIR)/../.. && printf "$${PWD}")
# scanning the "whole" NFS server isn't so smart, so restrict to wellknown dirs
HADDOCK_INTERFACES = $(shell find $(GHC_BASEDIR)/share/doc/ghc \
$(GHC_BASEDIR)/lib/ghc-doc/haddock -name '*.haddock' 2>/dev/null)
HAD_INTS = $(foreach file, $(HADDOCK_INTERFACES),\
-i http://hackage.haskell.org/packages/archive/$(basename $(notdir $(file)))/latest/doc/html,$(file))
HADDOCK_OPTS := $(addprefix --optghc=, $(HC_OPTS))
docs/index.html: $(derived_sources)
@$(RM) -r docs && mkdir docs && \
printf '\nCheck log.haddock for results ...\n'
$(HADDOCK) -o docs -h -s ../%F $(HAD_INTS) \
-t 'Hets - the Heterogeneous Tool Set' \
-p Hets-Haddock-Prologue.txt $(HADDOCK_OPTS) \
$(filter-out Scratch.hs, $(wildcard *.hs)) \
>log.haddock 2>&1
$(DRIFT): $(DRIFT_deps)
cd utils/DrIFT-src; $(HC) --make -o ../DrIFT DrIFT.hs
$(DTD2HS): $(DTD2HS_deps) utils/DtdToHaskell-src/DtdToHaskell.hs
@mkdir -p utils/DtdToHaskell-src/DtdToHaskell
@cp -f $(DTD2HS_deps) utils/DtdToHaskell-src/DtdToHaskell
$(HC) --make $(HC_OPTS) -iutils/DtdToHaskell-src -o $@ \
utils/DtdToHaskell-src/DtdToHaskell.hs
Isabelle/IsaExport.hs: $(DTD2HS) Isabelle/IsaExport.dtd
$(DTD2HS) Isabelle/IsaExport.dtd Isabelle/IsaExport.hs Isabelle.
$(GENRULES): $(DRIFT) $(GENERATERULES_deps)
@cd utils/GenerateRules; \
$(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
-o ../genRules GenerateRules.hs
utils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
$(HC) --make -o $@ $<
# Common/LaTeX_maps.hs generation
utils/genItCorrections: $(GENITCORRECTIONS_deps)
$(HC) --make -o $@ $<
pretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
$(info $(EOL)Generating pretty/LaTeX_maps.hs ...$(EOL))
@cd pretty >/dev/null; \
$(PERL) ../utils/words.pl > words.pl.log ; \
../utils/genItCorrections gen_it_characters gen_it_words >> LaTeX_maps.hs
$(info $(EOL)Done.$(EOL)Please copy the file manually to Common$(EOL))
### clean up
clean_stack:
@$(RM) -rf .stack-work stack
clean_genRules:
@$(RM) $(generated_rule_files) $(gendrifted_files) $(hs_clean_files)
### removes all *.o, *.hi and *.p_o files in all subdirectories except for
### .stack-work, where the compiled dependencies reside
o_clean:
@find . -path ./.stack-work -prune -type f \
-o \( -name '*.o' -o -name '*.hi' -o -name '*.p_o' \
-o -name '*.dyn_hi' -o -name '*.dyn_o' \) -exec rm -f {} +
@$(RM) -f .hets*
### remove binaries
bin_clean:
@$(RM) hets hets.cgi hets_server \
$(TESTTARGETS)
# do not delete on exported archive, because latexmk might not be available
USER_GUIDE := $(shell [ -n "$(EXPORTED)" ] || printf 'doc/UserGuide.pdf')
# Ubuntu/Debian dash crap really hurts
clean_pretty:
@ksh -c "rm -rf pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
pretty/generated_words.tex \
test/*/*.{thy,pp.het,pp.tex,th,dfg.c,xml,log,dvi,aux,sty} \
test/*/log */test/temp* ToHaskell/test/*.{out,output} \
ExtModal/Tries/*.{pp.het,th} Fpl/test/*.{pp.het,th} \
CommonLogic/TestData/*.{pp.het,th} Common/testxmldiff \
doc/UserGuide.{log,aux,bbl,blg,out,fdb_latexmk,fls} doc/hs2isa.ps \
$(USER_GUIDE) log.haddock \
debian/{root,files,hets-*,tmp} \
"
java_clean:
@$(RM) -rf OWL2/*.jar OWL2/java/build OWL2/java/tmp OWL2/lib
clean: bin_clean o_clean clean_pretty
realclean: clean java_clean
@$(RM) -f *.bin debian/changelog*
### additionally removes generated files not in the repository tree
distclean: clean_stack realclean clean_genRules
@$(RM) -rf $(derived_sources) \
utils/appendHaskellPreludeString \
utils/DrIFT utils/genRules \
$(DTD2HS) \
utils/DtdToHaskell-src/DtdToHaskell \
utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log \
docs
### interactive
ghci: $(derived_sources)
$(STACK_EXEC) ghci $(HC_OPTS)
### build only, don't link. Target was formerly known as 'build'.
build-hets: hets.hs
@touch .hets-oow
$(HC) --make $(HC_OPTS) -c $<
### Kif parser
fromKif: CASL/fromKif
### Annos parser
annos: Common/annos
### CASL parser
capa: CASL/capa
### HasCASL parser
hacapa: HasCASL/hacapa
### Haskell analysis
hana: Haskell/hana
### Haskell to Isabelle-HOLCF translation
h2hf: Haskell/h2hf
Haskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
Common/Lib/*.hs Comorphisms/*.hs
$(HC) -O --make $(HC_OPTS) -o $@ $<
### HasCASL to Haskell translation
h2h: Haskell/h2h
### test program to check the known provers
showKP: Comorphisms/test/showKP
### run tests in other directories
check: $(TESTTARGETS)
for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
test:
yes X | $(MAKE) check
ATC/DevGraph.hs: Static/DevGraph.hs
## two dependencies to avoid circular prerequisites
CASL_DEPENDENT_BINARIES = hets CASL/capa CASL/fromKif \
Common/annos Common/test_parser Comorphisms/test/showKP \
CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
$(CASL_DEPENDENT_BINARIES): $(derived_sources)
## suffix rules
.SUFFIXES:
## rule for GHC
%: %.hs $(STACK_TARGET) callghc
@touch .hets-oow
$(HC) --make $(HC_OPTS) -o $@ $<
## rule for DrIFT
%.hs: %.der.hs $(DRIFT)
$(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@
## compiling rules for object and interface files
%.o %.hi: %.hs
$(HC) $(HC_OPTS) -c $<
%.o %.hi: %.lhs
$(HC) $(HC_OPTS) -c $<
## compiling rules for dependencies
%.d : %.hs
$(HC) -M $(HC_OPTS) -optdep-f -optdep$@ $<
%.d : %.lhs
$(HC) -M $(HC_OPTS) -optdep-f -optdep$@ $<
## Rule to generate hs files from glade files. Needed for GTK
%.hs: %.glade utils/appendHaskellPreludeString \
GUI/Glade/Template.append.hs
b=`basename $< .glade`; \
cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
utils/appendHaskellPreludeString $< > $@
# just build all required jar files
jars:
@cd OWL2/java ; ant -S
PFE_BASE := $(dir $(PFE_SETUP_FILE))
get-programatica:
@if [ -z $(PROGRAMATICA_SRC_FILE) -o ! -e $(PROGRAMATICA_SRC_FILE) ] && \
[ -z "$(PROGRAMATICA_SRC_URL)" ]; then \
printf 'Unable to get programatica (%s %s)\n' \
'neither PROGRAMATICA_SRC_FILE nor PROGRAMATICA_SRC_FILE' \
'environment variable is set/exist.' ; \
exit 1 ; \
fi
@if [ -e $(PFE_BASE) ]; then \
printf '%s already exists.\n' $(PFE_BASE) ; \
exit 2 ; \
fi
-@HWD=$${PWD} ; X=`echo $(PFE_BASE)| cut -f1 -d/`; \
rm -f $$X 2>/dev/null || rm -rf $(PFE_BASE) ; \
mkdir -p $(PFE_BASE); \
cd $(PFE_BASE) || exit 3 ; \
PFEDIR=$${PWD} ; cd .. ; \
if [ -n $(PROGRAMATICA_SRC_FILE) -a -e $(PROGRAMATICA_SRC_FILE) ]; then \
printf 'Extracting $(PROGRAMATICA_SRC_FILE) ...\n' ; \
if $(TAR) xzf "$(PROGRAMATICA_SRC_FILE)" ; then \
mv programatica-*/* $${PFEDIR}/ && rmdir programatica-* ; \
fi ; \
fi ; \
if [ -n "$(PROGRAMATICA_SRC_URL)" -a ! -e $${HWD}/$(PFE_SETUP_FILE) ]; then\
printf 'Fetching $(PROGRAMATICA_SRC_URL) ...\n' ; \
if wget --no-verbose -O x.tgz "$(PROGRAMATICA_SRC_URL)" ; then \
if $(TAR) xzf x.tgz ; then \
mv programatica-*/* $${PFEDIR}/ && rmdir programatica-* ; \
rm -f x.tgz ; \
fi ; \
fi ; \
fi
@if [ -e $(PFE_SETUP_FILE) ]; then \
printf 'Programatica support available.\nYou probably need to %s\n\n' \
'"make distclean" and make the desired target again.' ; \
else \
rm -rf $(PFE_BASE) ; \
printf 'Failed! No programatica support available!\n' ; exit 4 ; \
fi
ARC_NAME ?= /tmp/hets-$(HETS_VERSION)-src.tar.xz
# remove trailing .txz or .tar.xz
archive: ARC_BNAME = \
$(patsubst %.txz,%, $(patsubst %.tar.xz,%,$(notdir $(ARC_NAME))))
archive: $(USER_GUIDE)
@[ -n "$(EXPORTED)" ] && \
printf '\nThis source tree is already exported.\n' && exit 1 ; \
FNAME=$(dir $(ARC_NAME))/$(ARC_BNAME).tar.xz ; \
printf "Exporting source to $${FNAME} ...\n" ; \
rm -rf tmp ; mkdir tmp || exit 3 ; \
git archive --format=tar --prefix=$(ARC_BNAME)/ HEAD | \
( cd tmp ; $(TAR) xf - ) ; \
if [ -e $(USER_GUIDE) ]; then \
cp $(USER_GUIDE) tmp/$(ARC_BNAME)/$(USER_GUIDE) ; \
else \
printf '\nWARNING: No $(USER_GUIDE) is unavailable\n!' ; \
fi ; \
cd tmp/$(ARC_BNAME) ; $(MAKE) distclean ; \
printf 'Removing unused/non-distributed files ...\n' ; \
rm -rf HolLight/OcamlTools/*/*dmtcp OWL2/java/lib/native \
MMT/hets-mmt-standalone.jar ; \
rm -rf GMP mini .gitignore utils/{nightly,debian,macports,ubuntu} ; \
zip -d OWL2/java/lib/owlapi-osgidistribution-3.5.2.jar \
lib/guava-18.0.jar lib/trove4j-3.0.3.jar ; \
printf 'Done.\n' ; \
cd .. ; $(TAR) cJf $(ARC_BNAME).tar.xz $(ARC_BNAME) || exit 4 ; \
cd .. ; \
ln $${PWD}/tmp/$(ARC_BNAME).tar.xz $${FNAME} 2>/dev/null || \
mv -f $${PWD}/tmp/$(ARC_BNAME).tar.xz $${FNAME} ; \
ls -l $${FNAME}
$(info $(EOL)The next "make clean" will remove the tmp/ directory used.$(EOL))
#############################################################################
# INSTALL targets
#############################################################################
# We use $DEB_BUILD_ARCH to detect, whether this make got triggered via
# dpkg-buildpackage
DEFAULT_DESTDIR := \
$(shell [ -n "$$DEB_BUILD_ARCH" ] && printf "$$PWD/debian/root")
SUBDIR_common := \
$(shell [ -n "$$DEB_BUILD_ARCH" ] && printf '/common')
SUBDIR_hets := \
$(shell [ -n "$$DEB_BUILD_ARCH" ] && printf '/desktop')
SUBDIR_hets_server := \
$(shell [ -n "$$DEB_BUILD_ARCH" ] && printf '/server')
DEFAULT_DIST_TEX_LATEX := \
$(shell [ "$(OSNAME)" = 'SunOS' ] && printf 'share/texmf/dist/tex/latex' ||\
printf 'share/texlive/texmf-dist/tex/latex')
DESTDIR ?= $(DEFAULT_DESTDIR)
PREFIX ?= /usr
# all _relative_ wrt. $(PREFIX) and w/o trailing slashes
HETS_DIR := lib/hets
DOC_DIR ?= share/doc/hets
MAN_DIR ?= share/man/man1
DIST_LATEX ?= $(DEFAULT_DIST_TEX_LATEX)
# see OWL2/ProveFact.hs - it doesn't use OSGi so we need to extract JNI libs
install-owl-tools: \
BASEDIR = $(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(HETS_DIR)/hets-owl-tools
install-owl-tools: jars
$(INSTALL) -m 0755 -d \
$(BASEDIR)/lib/native/i686 \
$(BASEDIR)/lib/native/x86_64 \
$(BASEDIR)/tests
$(INSTALL) -m 0644 OWL2/tests/wine.rdf $(BASEDIR)/tests/
$(INSTALL) -m 0644 OWL2/*.jar $(BASEDIR)/
ln -sf ../CASL/Termination/AProVE.jar $(BASEDIR)/AProVE.jar
ln -sf ../DMU/OntoDMU.jar $(BASEDIR)/OntoDMU.jar
$(INSTALL) -m 0644 OWL2/java/lib/*.jar $(BASEDIR)/lib/
$(info Extracting/removing JNI libs from factplusplus*.jar ...$(EOL))
rm -rf OWL2/java/tmp ; mkdir -p OWL2/java/tmp; cd OWL2/java/tmp ; \
X=`ls ../lib/uk.ac.manchester.cs.owl.factplusplus*.jar` ; \
jar xf $$X ; \
$(INSTALL) -m 0755 lib/native/32bit/libFaCTPlusPlusJNI.* \
$(BASEDIR)/lib/native/i686/ ; \
$(INSTALL) -m 0755 lib/native/64bit/libFaCTPlusPlusJNI.* \
$(BASEDIR)/lib/native/x86_64/; \
rm -rf $(BASEDIR)/lib/native/*/*.dll lib \
$(BASEDIR)/lib/`basename $$X` ; \
jar cMf $(BASEDIR)/lib/`basename $$X` *
-zip -d $(BASEDIR)/lib/owlapi-osgidistribution-3.5.2.jar \
lib/guava-18.0.jar lib/trove4j-3.0.3.jar
@printf 'Sources:\n\t%s\n\t%s\n\t%s\n' \
'https://bitbucket.org/trove4j/trove/downloads'\
'https://github.com/google/guava' \
'https://github.com/owlcs/owlapi' \
>$(BASEDIR)/lib/readme.txt
@printf '\nNOTE:\n\t%s\n\t%s\n' \
'Per default $(BASEDIR)/lib/native' \
'contains JNI libs for Linux and MacOSX only!'
# If one would add haddocs as well, add
# -m 0755 -d $(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DOC_DIR)/html/
# -m 0644 docs/* $(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DOC_DIR)/html/
install-common: docs install-owl-tools
$(INSTALL) -m 0755 -d \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(HETS_DIR)/hets-isa-tools \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(HETS_DIR)/hets-maude-lib \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DIST_LATEX)/hets \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DOC_DIR)
$(INSTALL) -m 0644 magic/hets.magic utils/hetcasl.sty \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(HETS_DIR)
$(INSTALL) -m 0755 Isabelle/export/export.sh \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(HETS_DIR)/hets-isa-tools/
$(INSTALL) -m 0644 Isabelle/export/export_helper.ml \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(HETS_DIR)/hets-isa-tools/
$(INSTALL) -m 0644 Maude/hets.prj Maude/*maude \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(HETS_DIR)/hets-maude-lib/
$(INSTALL) -m 0644 doc/*.pdf \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DOC_DIR)/
BACK=`printf '$(DIST_LATEX)/hets' | ${SED} -e 's/[^/]\{1,\}/../g'` ; \
ln -sf $${BACK}/$(HETS_DIR)/hetcasl.sty \
$(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DIST_LATEX)/hets/hetcasl.sty
$(info $(EOL)If TeX is installed, remember to re-run texhash!$(EOL)$(EOL))
%.bin:
$(MAKE) $*-opt
# for now install-{common,hets,hets_server} are supported, only.
install-%: %.bin
$(INSTALL) -m 0755 -d \
$(DESTDIR)$(SUBDIR_$*)$(PREFIX)/bin \
$(DESTDIR)$(SUBDIR_$*)$(PREFIX)/$(HETS_DIR) \
$(DESTDIR)$(SUBDIR_$*)$(PREFIX)/$(MAN_DIR)
$(SED) -e "s,@CLIENT_BASEDIR@,$(PREFIX)," debian/hets_script \
>$(DESTDIR)$(SUBDIR_$*)$(PREFIX)/bin/$(subst _,-,$*)
chmod 0755 $(DESTDIR)$(SUBDIR_$*)$(PREFIX)/bin/$(subst _,-,$*)
ln $< $(DESTDIR)$(SUBDIR_$*)$(PREFIX)/$(HETS_DIR)/$(subst _,-,$*) 2>/dev/null || \
cp $< $(DESTDIR)$(SUBDIR_$*)$(PREFIX)/$(HETS_DIR)/$(subst _,-,$*)
[ $* = 'hets' ] && RMSECT='SERVER' || RMSECT='DESKTOP' ; \
$(SED) -e "/@S$${RMSECT}@/,/@E$${RMSECT}@/ d" debian/hets.1 \
>$(DESTDIR)$(SUBDIR_$*)$(PREFIX)/$(MAN_DIR)/$(subst _,-,$*).1
[ "$(OSNAME)" = 'SunOS' ] || ${SED} -i -e '/@SSOLARIS@/,/@ESOLARIS@/ d' \
$(DESTDIR)$(SUBDIR_$*)$(PREFIX)/$(MAN_DIR)/$(subst _,-,$*).1
install: install-hets install-hets_server install-common install-owl-tools
############################################################################
# DEBIAN rules
############################################################################
build-indep: jars docs
build-arch: $(STACK_TARGET) hets.bin hets_server.bin
build: build-indep build-arch
# For PPA source packages we submit a platform specific changelog via
# *.debian.tar.xz, for local packages we generate it on demand.
CHANGELOG := $(shell [ -f debian/changelog ] && \
printf 'debian/changelog' || printf 'debian/changelog.tmp')
# See Versioning in ./README
# NOTE: The dash crap sucks again here! So we assume only the 2nd rev num
# might be padded with a single '0' to avoid more clutter.
debian/changelog.tmp: debian/control
@SRCPKG=`grep ^Source: debian/control |awk '{ print $$2 ; }'` ; \
if [ -z "${FULL_DEBVERS}" ]; then \
LSB=`lsb_release -rs`; A="$${LSB%.*}"; B="$${LSB#*.}"; B="$${B##0}"; \
FULL_DEBVERS="$(HETS_VERSION).1-1.$${A}.$${B}.1" ; \
printf "\nUsing '$${FULL_DEBVERS}' as new version.\n\n" ; \
fi ; \
[ -z "$${REL_NAME}" ] && REL_NAME=`lsb_release -cs` ; \
[ -z "$${GPG_NAME}" ] && GPG_NAME='Foo Bar' ; \
[ -z "$${GPG_EMAIL}" ] && GPG_EMAIL='foo.bar@do.main' ; \
printf "%s (%s) %s; urgency=low\n\n %s\n\n -- %s <%s> %s\n" "$${SRCPKG}" \
"$${FULL_DEBVERS}" "$${REL_NAME}" \
"* Initial release, automatically generated." \
"$${GPG_NAME}" "$${GPG_EMAIL}" "`date -R`" \
>debian/changelog.tmp
# NOTE: dpkg-gencontrol is not POSIX conform wrt. arg processing!
binary-indep: build-indep install-common $(CHANGELOG)
-@[ "$${USERNAME}" != 'root' -o -z "$${FAKEROOTKEY}" ] && \
printf '\nWARNING: The $< target should be called using fakeroot!\n\n'
$(INSTALL) -m 0755 -d $(DESTDIR)$(SUBDIR_common)/DEBIAN
dpkg-gencontrol -P$(DESTDIR)$(SUBDIR_common) -phets-common \
-l$(CHANGELOG)
dpkg-deb -Z xz -b $(DESTDIR)$(SUBDIR_common) ../hets-A.deb
dpkg-name -o ../hets-A.deb
binary-arch: build-arch install-hets install-hets_server $(CHANGELOG)
-@[ "$${USERNAME}" != 'root' -o -z "$${FAKEROOTKEY}" ] && \
printf '\nWARNING: The $< target should be called using fakeroot!\n\n'
$(INSTALL) -m 0755 -d \
$(DESTDIR)$(SUBDIR_hets)/DEBIAN \
$(DESTDIR)$(SUBDIR_hets_server)/DEBIAN
dpkg-gencontrol -P$(DESTDIR)$(SUBDIR_hets) -phets-desktop \
-l$(CHANGELOG)
dpkg-deb -Z xz -b $(DESTDIR)$(SUBDIR_hets) ../hets-B.deb
dpkg-gencontrol -P$(DESTDIR)$(SUBDIR_hets_server) -phets-server \
-l$(CHANGELOG)
dpkg-deb -Z xz -b $(DESTDIR)$(SUBDIR_hets_server) ../hets-C.deb
dpkg-name -o ../hets-B.deb ../hets-C.deb
# Make sure debian/changelog exists, since dpkg-buildpackage runs finally a
# "dpkg-genchanges -b -m'...' >../${fullPkgName}.changes"
binary: binary-indep binary-arch
@[ -f debian/changelog ] || ln -s changelog.tmp debian/changelog
# vim: ts=4 sw=4 filetype=make