Makefile revision ecf76bc89d9a2ecd7ac7310d30654b9a79d97d62
493N/A# Makefile
493N/A# $Header$
493N/A# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
493N/A# Year: 2004
919N/A
919N/A# This Makefile will compile the new hets system and provides also
919N/A# targets for test programs during implementation phases.
919N/A
919N/A# !!! Note: This makefile is written for GNU make !!!
493N/A# (gmake on solaris)
919N/A
919N/Aall: hets
919N/A
493N/A####################################################################
919N/A## Some varibles, which control the compilation
919N/A
919N/AINCLUDE_PATH =
919N/AHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
919N/A Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
919N/A Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
919N/A Text/XML/Serializer
493N/A
493N/ASOURCE_PATHS = . utils/itcor \
341N/A utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
341N/A Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
341N/A Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
341N/A CspCASL ATC Proofs Comorphisms Isabelle Driver \
341N/A Taxonomy CASL_DL SPASS OWL_DL OMDoc PGIP Propositional
341N/A
341N/A# the 'replacing spaces' example was taken from the (GNU) Make info manual
341N/Aempty =
341N/Aspace = $(empty) $(empty)
493N/A
493N/A## set ghc imports properly for your system
341N/AGHC_IMPORTS = `$(HC) --print-libdir`/imports
493N/A# import directories for ghc-5.04.2
493N/AGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
493N/ADRIFT_ENV = \
493N/A DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
493N/A
493N/A# override on commandline for other architectures
493N/AINSTALLDIR = \
493N/A /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
493N/A
493N/ADRIFT_deps = utils/DrIFT-src/*hs
493N/AGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
493N/AGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
493N/AINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
493N/A Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
493N/A Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
493N/A
341N/AHC = ghc
341N/AHCPKG = ghc-pkg
493N/APERL = perl
493N/AHAPPY = happy -sga
493N/AGENRULES = utils/genRules
493N/AGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
493N/A -i Data.Typeable -i Common.ATerm.Lib
493N/ADRIFT = utils/DrIFT
493N/AINLINEAXIOMS = utils/outlineAxioms
493N/AHADDOCK = haddock
493N/A
493N/AOSBYUNAME = $(shell uname)
493N/Aifneq ($(findstring SunOS, $(OSBYUNAME)),)
493N/ATAR = gtar
493N/Aelse
341N/ATAR = tar
493N/Aendif
493N/A
493N/AARCH = $(subst $(space),,$(shell uname -m))
341N/ASETUP = utils/Setup
341N/ASETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
341N/A
341N/ASETUPPACKAGE = ../$(SETUP) clean; \
341N/A ../$(SETUP) configure $(SETUPPREFIX); \
341N/A ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
341N/A
341N/AHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
341N/Aifneq ($(findstring 1.13.2, $(HAXMLVERSION)),)
341N/AHAXML_PACKAGE = -package HaXml -DHAXML_PACKAGE
493N/Aendif
493N/A
493N/A# remove -fno-warn-orphans for older ghcs and add -ifgl
493N/AHC_WARN = -Wall -fno-warn-orphans
493N/AHC_FLAGS = $(HAXML_PACKAGE) \
341N/A $(HC_WARN) -fglasgow-exts -fallow-overlapping-instances
341N/A
341N/AHC_OPTS_MAC := $(if $(findstring Darwin,$(shell uname -s)), \
341N/A -optl-F$(HOME)/Library/Frameworks -optl-framework -optlGNUreadline,)
341N/A
341N/A# -ddump-minimal-imports
341N/A# flags also come in via ../uni/uni-package.conf
341N/A# but added it here in case of compilation without uni
341N/A
493N/AHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
493N/A
493N/Alogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS \
493N/A OWL_DL ConstraintCASL Propositional
493N/A
493N/ATESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
493N/A Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
493N/A ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
493N/A Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
493N/A SPASS/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
493N/A SPASS/tests/soapTest.hs SPASS/tests/soapTest.hs SPASS/tests/CMDL_tests.hs
493N/A
493N/AUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
341N/Aifneq ($(strip $(UNI_PACKAGE_CONF)),)
493N/AHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
341N/A -package uni-server -DUNI_PACKAGE
341N/A
341N/A# some modules from uni for haddock
493N/A# if uni/server is included also HaXml sources are needed
493N/Auni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
341N/A ../uni/reactor ../uni/util ../uni/posixutil
493N/A
493N/Auni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
341N/A $(wildcard ../uni/htk/haddock/*/*.hs)
341N/ATESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs
341N/Aendif
341N/A
341N/A### list of directories to run checks in
341N/ATESTDIRS += Common CASL HasCASL test
341N/A
341N/Ahs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
341N/A Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
493N/A
493N/APFE_TOOLDIR = $(wildcard ../programatica/tools)
341N/Aifneq ($(strip $(PFE_TOOLDIR)),)
341N/APFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
341N/A base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
341N/A base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
493N/A base/transforms base/transforms/Deriving property \
341N/A property/syntax property/AST property/transforms \
341N/A property/TI property/defs property/parse2 property/parse2/Parser
341N/A
341N/APFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
341N/Apfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
341N/APFE_PATH = $(addprefix -i, $(PFE_PATHS))
341N/APFE_FLAGS = -package programatica -DPROGRAMATICA
341N/Ahappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
341N/A
341N/ALEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
341N/A
341N/Aprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
341N/A $(LEX_DIR)/HsLex.hs $(SETUP)
341N/A @if $(HCPKG) field programatica version; then \
341N/A echo "of programatica package found"; else \
341N/A (patch -usNlp0 -d $(PFE_TOOLDIR) \
341N/A -i `pwd`/Haskell/Programatica.patch || exit 0); \
341N/A cp -f utils/programatica.cabal ../programatica/tools; \
341N/A cp -f $(SETUP) ../programatica/tools; \
341N/A (cd ../programatica/tools; \
341N/A ./Setup configure $(SETUPPREFIX); \
341N/A ./Setup build; ./Setup install --user) fi
341N/A
341N/A$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
341N/A echo "{-# OPTIONS -w #-}" > $@
341N/A $< >> $@
341N/A
341N/A$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
341N/A $(LEX_DIR)/HsTokens.hs
341N/A $(HC) --make -fno-monomorphism-restriction -O \
341N/A -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
341N/A -i$(PFE_TOOLDIR)/base/lib \
341N/A -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
341N/A $@.hs -o $@
341N/A strip $@
341N/A
341N/Alogics += Haskell
341N/Aderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
341N/A $(LEX_DIR)Gen/HsLexerGen
341N/A
341N/Autils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
341N/A $(HC) --make -o $@ $<
341N/A
341N/AAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
493N/A Haskell/ProgramaticaPrelude.hs
493N/A
341N/A## rule for appendHaskellPreludeString
341N/AHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
341N/A $(APPENDPRELUDESTRING)
341N/A $(RM) $@
341N/A $(APPENDPRELUDESTRING) < $< > $@
341N/A chmod 444 $@
341N/A
341N/AAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
493N/A HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
493N/A HsModule HsName HsLiteral HsIdent
493N/A
493N/A#files in base/TI/
493N/A#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
341N/A
341N/A#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
341N/A
341N/AOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
341N/A base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
493N/A base/parse2/SourceNames base/syntax/SyntaxRec \
341N/A property/syntax/PropSyntaxStruct
341N/A
341N/AHaskell_files = $(addsuffix .hs, \
341N/A $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
341N/A $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
341N/A
341N/A## rule for ATC generation
341N/AHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
341N/A $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
341N/A
341N/Ahs_der_files += $(hs_clean_files)
341N/A
341N/ATESTDIRS += ToHaskell Haskell/test
341N/ATESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
493N/Aendif
493N/A
341N/ATESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
341N/A
341N/A### Profiling (only for debugging)
341N/A### Attention every module must be compiled with profiling or the linker
341N/A### cannot link the various .o files properly. So after switching on
341N/A### Profiling, do an 'gmake real_clean; gmake'
341N/A### Comment in the following line for switching on profiling.
341N/A#HC_PROF = -prof -auto-all -fignore-asserts
341N/A
341N/AHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
341N/A -DCASLEXTENSIONS $(HC_OPTS_MAC)
493N/A
493N/A####################################################################
493N/A## sources for hets
493N/A
493N/Anon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
341N/A $(SETUP).hs
341N/A
341N/Asources = hets.hs $(filter-out $(non_sources), \
341N/A $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
341N/A
341N/Aobjects = $(sources:%.hs=%.o)
341N/A
341N/Adrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
341N/A Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
341N/A ATC/DevGraph.hs \
341N/A Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
341N/A ConstraintCASL/AS_ConstraintCASL.hs\
341N/A Propositional/AS_BASIC_Propositional.hs\
341N/A $(gendrifted_files)
341N/A
341N/Aatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
341N/A Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
493N/A Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
341N/A Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
341N/A
341N/Aatc_der_files = $(foreach file, $(atc_files), \
341N/A ATC/$(basename $(basename $(notdir $(file)))).der.hs)
341N/A
341N/AATC/Id.der.hs: Common/Id.hs $(GENRULES)
341N/A $(GENRULECALL) -o $@ $<
493N/A
493N/AATC/Result.der.hs: Common/Result.hs $(GENRULES)
493N/A $(GENRULECALL) -o $@ $<
493N/A
493N/AATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
341N/A $(GENRULECALL) -o $@ $<
341N/A
341N/AATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
341N/A $(GENRULECALL) -o $@ $<
341N/A
341N/AATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
341N/A $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
341N/A
341N/AATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
341N/A $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
341N/A
341N/AATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
341N/A $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
341N/A
341N/AATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
341N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
341N/A
341N/AATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
341N/A $(GENRULECALL) -x Logic.Prover.ProverTemplate \
341N/A -i ATC.AS_Annotation -o $@ $<
341N/A
341N/ACASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
341N/A CASL/AS_Basic_CASL.der.hs
341N/A
493N/AHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
493N/A
493N/AIsabelle_files = Isabelle/IsaSign.hs
493N/A
341N/APropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
493N/A Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs\
493N/A Propositional/Sublogic.hs
493N/AModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
493N/AConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
493N/ACoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
493N/ACOL_files = COL/AS_COL.hs COL/COLSign.hs
493N/ACspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
493N/A CspCASL/SignCSP.hs
341N/A
493N/ACASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
341N/A
341N/ASPASS_files = SPASS/Sign.hs
341N/A
493N/AOWL_DL_files = OWL_DL/Sign.hs
493N/A
493N/Aatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
493N/A
341N/Agenerated_rule_files = $(atc_der_files) $(atc_logic_files)
341N/A
493N/Agendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
493N/A
493N/Ainline_axiom_files = Comorphisms/CASL2PCFOL.hs \
493N/A Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
493N/A Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
493N/A
493N/Agen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
493N/A
493N/Aderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
493N/A $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
493N/A OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
493N/A
493N/A# sources that have {-# OPTIONS -cpp #-}
493N/Acpp_sources = \
493N/A Isabelle/CreateTheories.hs CASL/CompositionTable/CompositionTable.hs \
493N/A SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
493N/A Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
341N/A Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
341N/A PGIP/Common.hs PGIP/Commands.hs \
493N/A OMDoc/HetsInterface.hs
493N/A
493N/A# unused, remove when header files are gone
493N/Agenrule_header_files = $(wildcard ATC/*.header.hs)
493N/A
493N/Anondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
493N/A $(wildcard utils/DrIFT-src/*.lhs) \
493N/A $(wildcard utils/GenerateRules/*.hs) \
341N/A $(wildcard utils/InlineAxioms/*.hs) \
341N/A $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
341N/A $(genrule_header_files) $(generated_rule_files) \
341N/A $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
341N/A Modal/GeneratePatterns.inline.hs \
341N/A Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
341N/A SPASS/MathServCommunication.hs \
341N/A $(patsubst %.hs, %.der.hs, $(drifted_files))
341N/A
341N/Ahspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
341N/A
341N/A# this variable holds the modules that should be documented
493N/Adoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
493N/A
341N/Atax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
341N/A Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
341N/A
493N/Atax_objects = $(patsubst %.hs, %.o, $(tax_sources))
493N/A
493N/A####################################################################
493N/A### targets
493N/A
493N/A.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
493N/A real_clean bin_clean package_clean distclean packages \
493N/A http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
493N/A check capa hacapa h2h h2hf showKP clean_genRules genRules \
493N/A count doc apache_doc post_doc4apache fromKif \
493N/A programatica_pkg maintainer-clean annos \
493N/A derivedSources install_hets install release cgi ghci
493N/A
493N/A.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
341N/A
493N/A$(SETUP): utils/Setup.hs
493N/A $(HC) --make -O -o $@ $<
493N/A
493N/Apackages: http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
493N/A programatica_pkg
493N/A
341N/Ahttp_pkg: utils/http.tgz $(SETUP)
341N/A @if $(HCPKG) field HTTP version; then \
341N/A echo "of HTTP package found"; else \
341N/A $(RM) -r http; \
341N/A $(TAR) zxf utils/http.tgz; \
341N/A (cd http; $(SETUPPACKAGE)) fi
341N/A
341N/Asyb_pkg: $(SETUP)
341N/A @if $(HCPKG) field syb-generics version; then \
341N/A echo "of syb-generics package found"; else \
341N/A (cd syb-generics; $(SETUPPACKAGE)) fi
341N/A
341N/Ashellac_pkg: utils/shellac.tgz $(SETUP)
341N/A @if $(HCPKG) field Shellac version; then \
341N/A echo "of shellac package found"; else \
341N/A $(RM) -r shellac; \
341N/A $(TAR) zxf utils/shellac.tgz; \
341N/A (cd shellac; $(SETUPPACKAGE)) fi
341N/A
341N/Ashread_pkg: utils/shread.tgz $(SETUP) shellac_pkg
341N/A @if $(HCPKG) field Shellac-readline version; then \
341N/A echo "of shellac-readline package found"; else \
341N/A $(RM) -rf shread; \
341N/A $(TAR) zxf utils/shread.tgz; \
341N/A (cd shread; $(SETUPPACKAGE)) fi
341N/A
341N/Ahxt_pkg: $(SETUP) http_pkg
341N/A @if $(HCPKG) field hxt version; then \
341N/A echo "of hxt package found"; else \
341N/A $(RM) -rf hxt; \
341N/A $(TAR) zxf utils/hxt.tgz; \
341N/A (cd hxt; $(SETUPPACKAGE)) fi
341N/A
341N/Ahaifa_pkg: $(SETUP) hxt_pkg syb_pkg
341N/A @if $(HCPKG) field HAIFA version; then \
341N/A echo "of HAIFA package found"; else \
341N/A (cd haifa-lite; ../$(SETUP) configure $(SETUPPREFIX); \
341N/A ../$(SETUP) build; ../$(SETUP) install --user) fi
341N/A
341N/Aprogramatica_pkg:
341N/A
341N/Ahets-opt:
341N/A $(MAKE) distclean
341N/A $(MAKE) derivedSources
341N/A $(MAKE) clean
341N/A $(MAKE) hets-optimized
341N/A
341N/Ahets-optimized: $(derived_sources)
341N/A $(HC) --make -O -o hets hets.hs $(HC_OPTS)
341N/A strip hets
493N/A
493N/Ahets-old: $(objects)
341N/A $(RM) $@
341N/A $(HC) -o hets $(HC_OPTS) $(objects)
341N/A
341N/Acgi:
341N/A $(MAKE) distclean
341N/A $(MAKE) derivedSources
341N/A $(MAKE) real_clean
341N/A $(MAKE) hets.cgi
493N/A
341N/Ahets.cgi: $(sources) GUI/hets_cgi.hs
341N/A ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
341N/A strip hets.cgi
341N/A
341N/Ahets_maintainers.txt: $(sources)
341N/A @echo 'File : Maintainer' > $@
341N/A @echo -n Generating $@ " "
341N/A @$(PERL) -e \
341N/A 'foreach my $$f (@ARGV) { open I, "<$$f"; \
493N/A print "$$f :"; while (<I>) \
493N/A { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
341N/A print " $$1" ; last} }; print "\n"; close I; }' \
493N/A $(sources) >> $@
493N/A @echo " done"
493N/A
493N/A###############################
341N/A### count lines of code
341N/Acount: $(sources)
341N/A wc -l $(sources)
341N/A###############################
341N/A### Documentation via haddock
341N/Adoc: docs/index.html
341N/A
341N/A# generate haddock documentation with links to sources
341N/A# the interface treatment is stolen from uni/mk/suffix.mk
341N/Adocs/index.html: $(doc_sources)
341N/A $(RM) -r docs
341N/A mkdir docs
341N/A cp -r ../uni/www docs/www || mkdir docs/www
341N/A HINTERFACES0=`find docs/www -name '*.haddock' \
341N/A -printf "--read-interface=www/%P,%p "` ; \
341N/A HINTERFACES=`echo $$HINTERFACES0 | \
341N/A $(PERL) -pe 's+/[^/]*.haddock,+,+g'` ; \
341N/A $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
493N/A -t 'Hets - the Heterogeneous Tool Set' \
493N/A -p Hets-Haddock-Prologue.txt $(doc_sources)
341N/A
341N/A# sources are not copied here
341N/Aapache_doc:
341N/A $(RM) -r docs
341N/A cvs up -d ; echo "CVS exited with: " $$?
341N/A $(MAKE) hets-opt
341N/A $(MAKE) doc
341N/A $(MAKE) post_doc4apache
341N/A $(MAKE) o_clean
341N/A $(MAKE) hets.cgi
341N/A
341N/Apost_doc4apache:
341N/A $(RM) -r a-docs
341N/A cp -r docs a-docs
341N/A $(PERL) utils/post_process_docs.pl a-docs \
341N/A 'Common.Lib.Map.html:Common.Lib._Map.html'
341N/A $(PERL) utils/post_process_docs.pl a-docs \
341N/A 'Data.Map.html:Data._Map.html'
341N/A
341N/A###############################
493N/A### release management
493N/A
493N/AderivedSources: $(derived_sources) $(hspp_sources)
493N/A
493N/Autils/DrIFT: $(DRIFT_deps)
493N/A (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
493N/A strip ../DrIFT)
493N/A
493N/Autils/genRules: $(GENERATERULES_deps)
493N/A (cd utils/GenerateRules; \
493N/A $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
341N/A GenerateRules.hs -o ../genRules && strip ../genRules)
341N/A
341N/A# "-package hssource" for ghc-5.04.2
341N/A$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
341N/A $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
341N/A -i../.. -o $(INLINEAXIOMS)
341N/A strip $(INLINEAXIOMS)
341N/A
341N/A# set this variable from the command line to i,e. RELEASETAG='-r release-0-60'
341N/ARELEASETAG =
341N/A
341N/Arelease:
341N/A $(RM) -r HetCATS
341N/A cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
341N/A co -P $(RELEASETAG) HetCATS
341N/A $(RM) -r uni
341N/A if [ -d ../uni ] ; then ln -s ../uni uni ; fi
341N/A $(RM) -r programatica
493N/A if [ -d ../programatica ] ; then \
493N/A mkdir programatica; \
493N/A ln -s ../../programatica/tools programatica/tools ; fi
493N/A (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
493N/A cp Makefile Makefile.orig; \
341N/A cp ReleaseMakefile Makefile; \
341N/A ./clean.sh; \
341N/A find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
341N/A $(RM) clean.*)
341N/A $(TAR) cvf HetCATS.tar HetCATS
341N/A
341N/Ainstall-hets:
341N/A chmod g+w hets
341N/A cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
341N/A cp -p version_nr $(INSTALLDIR)
341N/A (cd $(INSTALLDIR); $(RM) hets; \
341N/A ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
341N/A
341N/Ainstall: hets-opt install-hets
341N/A
341N/Apack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
341N/A ## TODO: add more dependencies and use hets-opt
341N/A compile $< -b . -k standard -o $@
341N/A# compile $< -b . -k web -o $@
341N/A
341N/A###################################
341N/A### Common/LaTeX_maps.hs generation
341N/A
341N/Autils/genItCorrections: $(GENITCORRECTIONS_deps)
341N/A $(HC) --make -o $@ $<
341N/A strip $@
341N/A
493N/Apretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
493N/A pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
341N/A @echo -n "Generating pretty/LaTeX_maps.hs ... "
341N/A @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
341N/A @(cd pretty >/dev/null; ../utils/genItCorrections \
341N/A gen_it_characters gen_it_words >> LaTeX_maps.hs)
341N/A @echo "ready"
341N/A @echo "please copy the file manually to Common"
341N/A
341N/A#############################
341N/A### ATC DrIFT-rule generation
341N/A
341N/AgenRules: $(generated_rule_files)
341N/A
341N/ACASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
341N/A $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
341N/A
341N/APropositional/ATC_Propositional.der.hs: $(Propositional_files) \
341N/A $(GENRULES)
341N/A $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ \
341N/A $(Propositional_files)
341N/A
341N/AHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
341N/A $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
341N/A
341N/AIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
341N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
341N/A
341N/AModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
341N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
341N/A
341N/AConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
493N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
493N/A
493N/ACASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
493N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
493N/A
341N/ACoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
341N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
341N/A
341N/ACOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
341N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
341N/A
341N/ACspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
341N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
341N/A
341N/ASPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
341N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
341N/A
341N/AOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
341N/A $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
341N/A -o $@ $(OWL_DL_files)
341N/A
341N/Aclean_genRules:
341N/A $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
341N/A $(hs_clean_files)
341N/A
341N/A###############
493N/A### clean up
341N/A
341N/Aclean: bin_clean o_clean clean_pretty
### removes *.hi and *.o in all include directories
o_clean:
find . -name \*.o -o -name \*.hi | xargs $(RM) -r
### remove binaries
bin_clean:
$(RM) hets
$(RM) hets.cgi
$(RM) $(TESTTARGETS)
clean_pretty:
$(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
pretty/generated_words.tex
### additionally removes the library files
real_clean: clean
### clean user packages
package_clean:
$(HCPKG) unregister HAIFA --user || exit 0
$(HCPKG) unregister programatica --user || exit 0
$(HCPKG) unregister hxt --user || exit 0
$(HCPKG) unregister Shellac-readline --user || exit 0
$(HCPKG) unregister HTTP --user || exit 0
$(HCPKG) unregister syb-generics --user || exit 0
$(HCPKG) unregister Shellac --user || exit 0
$(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
### additionally removes generated files not in the CVS tree
distclean: clean clean_genRules
$(RM) $(derived_sources)
$(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
$(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
$(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
maintainer-clean: distclean package_clean
$(RM) $(SETUP)
####################################################################
### test targets
####################################################################
### interactive
ghci: $(derived_sources)
$(HC)i $(HC_OPTS)
### christian's target
### CASL 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 -o $@ $< $(HC_FLAGS) $(PFE_FLAGS)
### 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
####################################################################
## Preparing the version of HetCATS
Driver/Version.hs: Driver/Version.in version_nr
$(RM) $@
LANG=C $(PERL) utils/build_version.pl version_nr \
< Driver/Version.in > $@
chmod 444 $@
## two hardcoded dependencies for a correct generation of Version.hs
Driver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
hets.hs: Driver/Version.hs
ATC/DevGraph.hs: Static/DevGraph.hs
## two dependencies for avoidence of 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): $(sources) $(derived_sources)
# CASL_DL/Logic.hs: CASL_DL/PredefinedSign.hs
####################################################################
## rules for DrIFT
.SUFFIXES:
%: %.hs packages
$(HC) --make -o $@ $< $(HC_OPTS)
%.hs: %.y
$(HAPPY) -o $@.tmp $<
echo "{-# OPTIONS -w #-}" > $@
cat $@.tmp >> $@
$(RM) $@.tmp
%.hs: %.der.hs $(DRIFT)
$(RM) $@
($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
chmod 444 $@
## rules for inlineAxioms
%.hs: %.inline.hs $(INLINEAXIOMS)
$(RM) $@
$(INLINEAXIOMS) $< > $@
chmod 444 $@
## rule for cpp and haddock
%.hspp: %.hs
$(HC) -E -cpp -D__HADDOCK__ \
-DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
## compiling rules for object and interface files
%.o %.hi: %.hs
$(HC) -c $< $(HC_OPTS)
%.o %.hi: %.lhs
$(HC) -c $< $(HC_OPTS)
## compiling rules for dependencies
%.d : %.hs
$(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
%.d : %.lhs
$(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
## generate the inline file for the predefined CASL_DL sign
# Warning: Don't change the order of the depencies!!
CASL_DL/PredefinedSign.inline.hs: \
CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
CASL_DL/PredDatatypes.het
$(RM) $@
utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
< CASL_DL/PredefinedSign.inline.hs.in > $@
echo " )" >> $@
chmod 444 $@
CASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
CASL_DL/Datatypes.het
$(RM) $@
$(PERL) $+ > $@
chmod 444 $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
Modal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
utils/genTransMFormFunc.pl $(INLINEAXIOMS)
$(RM) $@
$(PERL) utils/genTransMFormFunc.pl $< $@
chmod 444 $@
initialize_installer:
@if [ -d $(INSTALLER_DIR) ] ; then \
echo "copy file to $(INSTALLER_DIR)" ; \
else \
echo "create $(INSTALLER_DIR)" ;\
mkdir -p $(INSTALLER_DIR) ; \
fi
@sed "s/^\(HETS_VERSION=\).*/\1`cat version_nr`/" Makefile.installer > Makefile.inst ;\
sed "s/^\(SPASS_DIR_MAC=\).*/\1`ls utils/SPASS-ppc-mac/ | grep SPASS`/" Makefile.inst > Makefile.inst2 ;\
rm Makefile.inst ;\
mv Makefile.inst2 $(INSTALLER_DIR)/Makefile
@echo =========================================================================
@echo If you have not logged in \'cvs.haskell.org\' and \'cvs-agbkb.informatik.uni-bremen.de\'
@echo "then please first login:"
@echo " cvs -d :pserver:anoncvs@cvs.haskell.org:/cvs login"
@echo " the password is cvs"
@echo " cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository login "
@echo " the password is "
@echo =========================================================================
@echo Ready to create installers for Hets
@echo Please do
@echo " -> cd $(INSTALLER_DIR)"
@echo " -> make"
@echo and wait until it is finished