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