rules revision 01e383014b555bbcf639c0ca60c5810b3eff83c0
3845N/A# Makefile
3845N/A# $Header$
3845N/A# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
3845N/A# Year: 2004
3845N/A
3845N/A# This Makefile will compile the new hets system and provides also
3845N/A# targets for test programs during implementation phases.
3845N/A
3845N/A# !!! Note: This makefile is written for GNU make !!!
3845N/A# (gmake on solaris)
3845N/A
3845N/Aall: patch hets
3845N/A
3845N/A####################################################################
3845N/A## Some varibles, which control the compilation
3845N/A
3845N/AINCLUDE_PATH = fgl hxt
3845N/ALIB_PATH = fgl/Data fgl/Data/Graph \
3845N/A fgl/Data/Graph/Inductive fgl/Data/Graph/Inductive/Internal \
3845N/A fgl/Data/Graph/Inductive/Monad fgl/Data/Graph/Inductive/Query
3845N/ACLEAN_PATH = . utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
3845N/A Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
3845N/A Syntax Static GUI HasCASL Haskell Modal CoCASL COL \
3845N/A CspCASL ATC ToHaskell Proofs Comorphisms Isabelle Driver \
3845N/A Taxonomy CASL_DL SPASS OWL_DL $(PFE_PATHS)
3845N/A
3845N/A# the 'replacing spaces' example was taken from the (GNU) Make info manual
3845N/Aempty =
3845N/Aspace = $(empty) $(empty)
3845N/A
3845N/A## set ghc imports properly for your system
3845N/AGHC_IMPORTS = `$(HC) --print-libdir`/imports
3845N/A# import directories for ghc-5.04.2
3845N/AGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
3845N/ADRIFT_ENV = \
3845N/A DERIVEPATH=.:ghc:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
3845N/A
3845N/A# override on commandline for other architectures
3845N/AINSTALLDIR = \
3845N/A /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
3845N/A
3845N/ADRIFT_deps = utils/DrIFT-src/*hs
3845N/AGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
3845N/AINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
3845N/A Common/Lib/Pretty.hs Common/Keywords.hs Common/Lib/Set.hs \
3845N/A Common/Lib/Map.hs Common/Lib/Rel.hs Common/Lib/State.hs Common/Id.hs \
3845N/A Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs CASL/ShowMixfix.hs \
3845N/A CASL/Utils.hs Common/Lexer.hs Common/Token.hs Common/Anno_Parser.hs \
3845N/A Common/GlobalAnnotations.hs Common/PrettyPrint.hs \
3845N/A Common/Print_AS_Annotation.hs Common/PPUtils.hs CASL/LiteralFuns.hs \
3845N/A CASL/Print_AS_Basic.hs Common/AnnoState.hs CASL/Formula.hs \
3845N/A CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
3845N/A Common/ConvertLiteral.hs Common/Earley.hs CASL/MixfixParser.hs \
3845N/A CASL/Parse_AS_Basic.hs CASL/Sign.hs CASL/Overload.hs \
3845N/A CASL/StaticAna.hs Modal/AS_Modal.hs Modal/Parse_AS.hs \
3845N/A Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
3845N/A
3845N/AHC = ghc
3845N/APERL = perl
3845N/AHAPPY = happy -sga
3845N/AGENRULES = utils/genRules
3845N/AGENRULECALL = $(GENRULES) -r ShATermConvertible -i Common.ATerm.Lib
3845N/ADRIFT = utils/DrIFT
3845N/AINLINEAXIOMS = utils/outlineAxioms
3845N/AHADDOCK = haddock
3845N/ACPPP = cpp
3845N/A
3845N/A# remove -fno-warn-orphans for older ghcs
3845N/AHC_WARN = -Wall -fno-warn-orphans
3845N/AHC_FLAGS = $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
3845N/A -fallow-overlapping-instances -fallow-undecidable-instances
3845N/A# -ddump-minimal-imports
3845N/A# flags also come in via ../uni/uni-package.conf
3845N/A# but added it here in case of compilation without uni
3845N/A
3845N/AHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
3845N/A
3845N/Alogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS OWL_DL
3845N/A
3845N/AUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
3845N/Aifneq ($(strip $(UNI_PACKAGE_CONF)),)
3845N/AHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
3845N/A -package uni-server -DUNI_PACKAGE
3845N/A
3845N/A# some modules from uni for haddock
3845N/A# if uni/server is included also HaXml sources are needed
3845N/Auni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
3845N/A ../uni/reactor ../uni/util ../uni/posixutil
3845N/A
3845N/Auni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
3845N/A $(wildcard ../uni/htk/haddock/*/*.hs)
3845N/Aendif
3845N/A
3845N/A### list of directories to run checks in
3845N/ATESTDIRS += Common CASL HasCASL
3845N/A
3845N/APFE_TOOLDIR = $(wildcard ../programatica/tools)
3845N/Aifneq ($(strip $(PFE_TOOLDIR)),)
3845N/APFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
3845N/A base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
3845N/A base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
3845N/A base/transforms base/transforms/Deriving property \
3845N/A property/syntax property/AST property/transforms \
3845N/A property/TI property/defs property/parse2 property/parse2/Parser
3845N/A
3845N/APFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
3845N/Apfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
3845N/APFE_PATH = $(addprefix -i, $(PFE_PATHS))
3845N/APFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
3845N/Ahappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
3845N/A
3845N/ALEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
3845N/A
3845N/Apatch: Haskell/Programatica.patch
3845N/A patch -sNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< || exit 0
3845N/A
3845N/A$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
3845N/A echo "{-# OPTIONS -w #-}" > $@
3845N/A $< >> $@
3845N/A
3845N/A$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
3845N/A $(LEX_DIR)/HsTokens.hs
3845N/A $(HC) --make -O -package data \
3845N/A -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
3845N/A -i$(PFE_TOOLDIR)/base/lib \
3845N/A -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
3845N/A $@.hs -o $@
3845N/A strip $@
3845N/A
3845N/Alogics += Haskell
3845N/Aderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
3845N/A $(LEX_DIR)Gen/HsLexerGen
3845N/A
3845N/AAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
3845N/A Haskell/ProgramaticaPrelude.hs
3845N/A
3845N/A## rule for appendHaskellPreludeString
3845N/AHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
3845N/A $(APPENDPRELUDESTRING)
3845N/A $(APPENDPRELUDESTRING) < $< > $@
3845N/A
3845N/AAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
3845N/A HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
3845N/A HsModule HsName HsLiteral HsIdent
3845N/A
3845N/AOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
3845N/A base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
3845N/A base/parse2/SourceNames base/syntax/SyntaxRec \
3845N/A property/syntax/PropSyntaxStruct
3845N/A
3845N/AHaskell_files = $(addsuffix .hs, \
3845N/A $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
3845N/A $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
3845N/A
3845N/A## rule for ATC generation
3845N/AHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
3845N/A $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
3845N/A
3845N/ATESTDIRS += ToHaskell
3845N/Aendif
3845N/A
3845N/A### Profiling (only for debugging)
3845N/A### Attention every module must be compiled with profiling or the linker
3845N/A### cannot link the various .o files properly. So after switching on
3845N/A### Profiling, do an 'gmake real_clean; gmake'
3845N/A### and comment out HC_PACKAGE variable definition above.
3845N/A### Comment in the following line for switching on profiling.
3845N/A#HC_PROF = -prof -auto-all
3845N/A
3845N/AHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
3845N/AHC_OPTS = $(HCI_OPTS) $(HC_PROF) -DCASLEXTENSIONS
3845N/ADRIFT_OPTS = +RTS -K10m -RTS
3845N/A
3845N/A####################################################################
3845N/A## sources for hets
3845N/A
3845N/Anon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
3845N/A Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs
3845N/A
3845N/ASOURCE_PATHS = $(CLEAN_PATH)
3845N/A
3845N/Asources = hets.hs $(filter-out $(non_sources), \
3845N/A $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
3845N/A
3845N/A#endif
3845N/A
3845N/Aobjects = $(sources:%.hs=%.o)
3845N/A
3845N/Adrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
3845N/A Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
3845N/A HasCASL/As.hs \
3845N/A Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
3845N/A $(gendrifted_files)
3845N/A
3845N/Aatc_files = Common/AS_Annotation.der.hs \
3845N/A Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
3845N/A Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
3845N/A Logic/Prover.hs Proofs/Proofs.hs
3845N/A
3845N/Aatc_der_files = $(foreach file, $(atc_files), \
3845N/A ATC/$(basename $(basename $(notdir $(file)))).der.hs)
3845N/A
3845N/AATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
3845N/A $(GENRULECALL) -o $@ $<
3845N/A
3845N/AATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
3845N/A
3845N/AATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
3845N/A
3845N/AATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
3845N/A
3845N/AATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
3845N/A
3845N/AATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
3845N/A $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
3845N/A
3845N/AATC/Proofs.der.hs: Proofs/Proofs.hs $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.DevGraph -o $@ $<
3845N/A
3845N/ACASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
3845N/A CASL/AS_Basic_CASL.der.hs
3845N/A
3845N/AHasCASL_files = HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
3845N/A
3845N/AIsabelle_files = Isabelle/IsaSign.hs
3845N/A
3845N/AModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
3845N/ACoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs CoCASL/Sublogic.hs
3845N/ACOL_files = COL/AS_COL.hs COL/COLSign.hs
3845N/ACspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
3845N/A
3845N/ACASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
3845N/A
3845N/ASPASS_files = SPASS/Sign.hs
3845N/A
3845N/AOWL_DL_files = OWL_DL/Sign.hs
3845N/A
3845N/Aatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
3845N/A
3845N/Agenerated_rule_files = $(atc_der_files) $(atc_logic_files)
3845N/A
3845N/Agendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
3845N/A
3845N/Ainline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2CFOL.hs \
3845N/A Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
3845N/A Comorphisms/CASL2SubCFOL.hs
3845N/A
3845N/Agen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
3845N/A
3845N/Aderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
3845N/A $(inline_axiom_files) Modal/ModalSystems.hs
3845N/A
3845N/A# sources that have {-# OPTIONS -cpp #-}
3845N/Acpp_sources = Common/DynamicUtils.hs \
3845N/A Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
3845N/A Isabelle/Logic_Isabelle.hs Isabelle/CreateTheories.hs \
3845N/A SPASS/Logic_SPASS.hs GUI/Utils.hs hets.hs \
3845N/A Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs $(happy_files)
3845N/A
3845N/A# unused, remove when header files are gone
3845N/Agenrule_header_files = $(wildcard ATC/*.header.hs)
3845N/A
3845N/Anondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
3845N/A $(wildcard utils/DrIFT-src/*.lhs) \
3845N/A $(wildcard utils/GenerateRules/*.hs) \
3845N/A $(wildcard utils/InlineAxioms/*.hs) \
3845N/A $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
3845N/A $(genrule_header_files) $(generated_rule_files) \
3845N/A $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
3845N/A Modal/GeneratePatterns.inline.hs \
3845N/A Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
3845N/A hxt/HXT.hs hxt/Net.hs $(patsubst %.hs, %.der.hs, $(drifted_files))
3845N/A
3845N/Ahspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
3845N/A
3845N/A# this variable holds the modules that should be documented
3845N/Adoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
3845N/A
3845N/Atax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
3845N/A Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
3845N/A
3845N/Atax_objects = $(patsubst %.hs, %.o, $(tax_sources))
3845N/A
3845N/A####################################################################
3845N/A### targets
3845N/A
3845N/A.PHONY : all hets-opt hets-optimized clean d_clean real_clean bin_clean \
3845N/A lib_clean distclean check capa hacapa h2h clean_genRules genRules \
3845N/A taxonomy count doc apache_doc post_doc4apache \
3845N/A derivedSources install_hets install release patch
3845N/A
3845N/A.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
3845N/A
3845N/Apatch:
3845N/A
3845N/Ahets: $(sources) $(derived_sources)
3845N/A $(HC) --make -o $@ hets.hs $(HC_OPTS)
3845N/A
3845N/Ahets-opt:
3845N/A $(MAKE) distclean
3845N/A $(MAKE) derivedSources
3845N/A $(MAKE) clean
3845N/A $(MAKE) hets-optimized
3845N/A
3845N/Ahets-optimized: $(derived_sources)
3845N/A $(HC) --make -O -o hets hets.hs $(HC_OPTS)
3845N/A strip hets
3845N/A
3845N/Ahets-old: $(objects)
3845N/A $(RM) $@
3845N/A $(HC) -o hets $(HC_OPTS) $(objects)
3845N/A
3845N/Ahets.cgi: $(sources) GUI/hets_cgi.hs
3845N/A ghc --make -package-conf $(HOME)/wash-pkg/package.conf \
3845N/A -package WASH GUI/hets_cgi.hs -o $@ $(HC_INCLUDE) \
3845N/A $(HC_FLAGS) $(PFE_FLAGS) -O
3845N/A strip hets.cgi
3845N/A
3845N/Ataxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
3845N/A $(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
3845N/A
3845N/A###############################
3845N/A### TAGS files for (x)emacs
3845N/A# load them with "M-x" "visit-tags-table" from
3845N/A# "HetCATS/hetcats.TAGS"
3845N/A# use "M-." to search for a tag
3845N/A# !!Beware this is somewhat instable, because it uses an absolute path!!
3845N/Ahetcats.TAGS: $(sources)
3845N/A /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
3845N/A $(sources); mv TAGS $@; mv tags hetcats.tags
3845N/A
3845N/Ahets_maintainers.txt: $(sources)
3845N/A @echo 'File : Maintainer' > $@
3845N/A @echo -n Generating $@ " "
3845N/A @$(PERL) -e \
3845N/A 'foreach my $$f (@ARGV) { open I, "<$$f"; \
3845N/A print "$$f :"; while (<I>) \
3845N/A { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
3845N/A print " $$1" ; last} }; print "\n"; close I; }' \
3845N/A $(sources) >> $@
3845N/A @echo " done"
3845N/A
3845N/A###############################
3845N/A### count lines of code
3845N/Acount: $(sources)
3845N/A wc -l $(sources)
3845N/A###############################
3845N/A### Documentation via haddock
3845N/Adoc: docs/index.html
3845N/A
3845N/A# generate haddock documentation with links to sources
3845N/A# the interface treatment is stolen from uni/mk/suffix.mk
3845N/Adocs/index.html: $(doc_sources)
3845N/A $(RM) -r docs
3845N/A mkdir docs
3845N/A cp -r ../uni/www docs/www
3845N/A HINTERFACES0=`find docs/www -name '*.haddock' \
3845N/A -printf "--read-interface=www/%P,%p "` ; \
3845N/A HINTERFACES=`echo $$HINTERFACES0 | sed -e 's+/[^/]*.haddock,+,+g'` ; \
3845N/A $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
3845N/A -t 'Hets - the Heterogeneous Tool Set' \
3845N/A -p Hets-Haddock-Prologue.txt $(doc_sources)
3845N/A
3845N/A# sources are not copied here
3845N/Aapache_doc:
3845N/A $(RM) -r docs
3845N/A cvs up -d ; echo "CVS exited with: " $$?
3845N/A $(MAKE) hets-opt
3845N/A $(MAKE) doc
3845N/A $(MAKE) post_doc4apache
3845N/A $(MAKE) o_clean
3845N/A $(MAKE) hets.cgi
3845N/A
3845N/Apost_doc4apache:
3845N/A $(RM) -r a-docs
3845N/A cp -r docs a-docs
3845N/A $(PERL) utils/post_process_docs.pl a-docs \
3845N/A 'Common.Lib.Map.html:Common.Lib._Map.html'
3845N/A $(PERL) utils/post_process_docs.pl a-docs \
3845N/A 'Data.Map.html:Data._Map.html'
3845N/A
3845N/A###############################
3845N/A### release management
3845N/A
3845N/AderivedSources: $(derived_sources) $(hspp_sources)
3845N/A
3845N/Autils/DrIFT: $(DRIFT_deps)
3845N/A (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
3845N/A strip ../DrIFT)
3845N/A
3845N/Autils/genRules: $(GENERATERULES_deps)
3845N/A (cd utils/GenerateRules; \
3845N/A $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
3845N/A GenerateRules.hs -o ../genRules && strip ../genRules)
3845N/A
3845N/A# "hssource" for ghc-5.04.2
3845N/A$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
3845N/A $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
3845N/A -package hssource -i../.. -o $(INLINEAXIOMS)
3845N/A strip $(INLINEAXIOMS)
3845N/A
3845N/Arelease:
3845N/A $(RM) -r HetCATS
3845N/A cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
3845N/A co -P HetCATS
3845N/A $(RM) -r uni
3845N/A if [ -d ../uni ] ; then ln -s ../uni uni ; fi
3845N/A $(RM) -r programatica
3845N/A if [ -d ../programatica ] ; then \
3845N/A mkdir programatica; \
3845N/A ln -s ../../programatica/tools programatica/tools ; fi
3845N/A (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
3845N/A cp Makefile Makefile.orig; \
3845N/A cp ReleaseMakefile Makefile; \
3845N/A ./clean.sh; \
3845N/A find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
3845N/A $(RM) clean.*)
3845N/A tar cvf HetCATS.tar HetCATS
3845N/A
3845N/Ainstall-hets:
3845N/A chmod g+w hets
3845N/A cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
3845N/A cp -p version_nr $(INSTALLDIR)
3845N/A (cd $(INSTALLDIR); $(RM) hets; \
3845N/A ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
3845N/A
3845N/Ainstall: hets-opt install-hets
3845N/A
3845N/A#############################
3845N/A### ATC DrIFT-rule generation
3845N/A
3845N/AgenRules: $(generated_rule_files)
3845N/A
3845N/ACASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(CASL_files)
3845N/A
3845N/AHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(HasCASL_files)
3845N/A
3845N/AIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
3845N/A
3845N/AModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
3845N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
3845N/A
3845N/ACASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
3845N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
3845N/A
3845N/ACoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
3845N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
3845N/A
3845N/ACOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
3845N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
3845N/A
3845N/ACspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
3845N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
3845N/A
3845N/ASPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
3845N/A
3845N/AOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
3845N/A $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
3845N/A -o $@ $(OWL_DL_files)
3845N/A
3845N/Aclean_genRules:
3845N/A $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
3845N/A Haskell/ATC_Haskell.der.hs
3845N/A
3845N/A###############
3845N/A### clean up
3845N/A
3845N/Aclean: bin_clean o_clean
3845N/A
3845N/A### removes *.hi and *.o in all include directories
3845N/Ao_clean:
3845N/A for p in $(CLEAN_PATH) ; do \
3845N/A (cd $$p ; $(RM) *.hi *.o) ; done
3845N/A
3845N/A### remove binaries
3845N/Abin_clean:
3845N/A $(RM) hets
3845N/A $(RM) test_parser
3845N/A $(RM) CASL/capa
3845N/A $(RM) HasCASL/hacapa
3845N/A $(RM) Haskell/hapa
3845N/A $(RM) Haskell/hana
3845N/A $(RM) Haskell/wrap
3845N/A $(RM) ToHaskell/h2h
3845N/A $(RM) Syntax/hetpa
3845N/A $(RM) Static/hetana
3845N/A $(RM) GUI/hetdg
3845N/A $(RM) hetpa
3845N/A $(RM) hetana
3845N/A $(RM) hetdg
3845N/A $(RM) atctest2
3845N/A $(RM) atctest
3845N/A $(RM) Common/annos
3845N/A $(RM) ToHaskell/translateAna
3845N/A $(RM) Taxonomy/taxonomyTool
3845N/A
3845N/A### removes *.d (dependency files) in every directory
3845N/A### also delete *.d.bak (dependency file backups)
3845N/Ad_clean: clean
3845N/A for p in $(CLEAN_PATH) $(LIB_PATH) $(INCLUDE_PATH) ; do \
3845N/A (cd $$p ; $(RM) *.d *.d.bak) ; done
3845N/A
3845N/A### remove files in own libraries
3845N/Alib_clean:
3845N/A for p in $(LIB_PATH) $(INCLUDE_PATH) ; do \
3845N/A (cd $$p ; $(RM) *.hi *.d *.o) ; done
3845N/A
3845N/A### additionally removes the library files
3845N/Areal_clean: lib_clean clean
3845N/A
3845N/A### additionally removes generated files not in the CVS tree
3845N/Adistclean: clean clean_genRules lib_clean d_clean
3845N/A $(RM) $(derived_sources)
3845N/A $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
3845N/A
3845N/A####################################################################
3845N/A### test targets
3845N/A####################################################################
3845N/A
3845N/A### a parser to test annotation parser and Id parsers
3845N/Atest_parser: Common/test_parser
3845N/A
3845N/ACommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
3845N/A $(HC) --make -o $@ $< $(HC_OPTS)
3845N/A
3845N/A### interactive
3845N/Aghci:
3845N/A $(HC)i $(HCI_OPTS)
3845N/A
3845N/A### christian's target
3845N/A### CASL parser
3845N/Acapa: CASL/capa
3845N/A
3845N/ACASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
3845N/A $(HC) --make -o $@ $< $(HC_OPTS)
3845N/A
3845N/A### HasCASL parser
3845N/Ahacapa: HasCASL/hacapa
3845N/A
3845N/AHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
3845N/A $(HC) --make -o $@ $< $(HC_OPTS)
3845N/A
3845N/A### Haskell analysis
3845N/Ahana: Haskell/hana
3845N/A
3845N/AHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
3845N/A $(HC) --make -o $@ $< $(HC_OPTS)
3845N/A
3845N/A### Haskell to Isabelle-HOLCF translation
3845N/Ah2hf: ToHaskell/h2hf
3845N/A
3845N/AToHaskell/h2hf: ToHaskell/h2hf.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs Isabelle/*.hs Common/*.hs
3845N/A $(HC) --make -o $@ $< $(HC_OPTS)
3845N/A
3845N/A### HasCASL to Haskell translation
3845N/Ah2h: ToHaskell/h2h
3845N/A
3845N/AToHaskell/h2h: ToHaskell/h2h.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs
3845N/A $(HC) --make -o $@ $< $(HC_OPTS)
3845N/A
3845N/A### HetCASL parser
3845N/Ahetpa: Syntax/hetpa.hs Syntax/*.hs
3845N/A $(HC) --make -o $@ $< $(HC_OPTS)
### HetCASL parser
hetana: Static/hetana.hs Static/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### ATC test system
atctest: ATC/ATCTest.hs ATC/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
atctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs \
Common/Lib/*.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### ATerm.Lib test system
atermlibtest: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
Common/ATerm/*.hs Common/Lib/*.hs
$(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
hatermdiff: Common/ATerm/ATermDiffMain.hs Common/SimpPretty.hs \
Common/ATerm/*.hs Common/Lib/*.hs
$(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
### OWL_DL test target
OWL_DL/readAStest: OWL_DL/ToHaskellAS.hs Common/ATerm/*.hs \
Common/Lib/*.hs OWL_DL/*.hs
$(HC) --make -o $@ $< $(HC_OPTS) $(EXTRA_HC_OPTS)
### HetCASL with dev graph
hetdg: GUI/hetdg.hs $(drifted_files) *.hs
$(HC) --make -o $@ $< $(HC_OPTS)
### run tests in other directories
check:
for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
####################################################################
## Preparing the version of HetCATS
Driver/Version.hs: Driver/Version.in version_nr
$(RM) $@
$(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
####################################################################
## rules for DrIFT
.SUFFIXES:
%: %.hs
$(HC) --make -o $@ $<
%.hs: %.y
$(HAPPY) -o $@.tmp $<
echo "{-# OPTIONS -w #-}" > $@
cat $@.tmp >> $@
$(RM) $@.tmp
%.hs: %.der.hs $(DRIFT)
$(RM) $@
($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $(DRIFT_OPTS) $< > $@)
chmod 444 $@
## rules for inlineAxioms
%.hs: %.inline.hs $(INLINEAXIOMS)
$(RM) $@
$(INLINEAXIOMS) $< > $@
chmod 444 $@
## rule for cpp and haddock
%.hspp: %.hs
$(HC) -E -cpp -DUNI_PACKAGE -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$@
## 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 $@