Makefile revision 5ce19352a9cc47d982819cc889a71cd0a61ac171
749N/A# Makefile
749N/A# $Header$
749N/A# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
749N/A# Year: 2004
749N/A
749N/A# This Makefile will compile the new hets system and provides also
749N/A# targets for test programs during implementation phases.
749N/A
749N/A# !!! Note: This makefile is written for GNU make !!!
749N/A# (gmake on solaris)
749N/A
749N/Aall: patch hets
749N/A
749N/A####################################################################
749N/A## Some varibles, which control the compilation
749N/A
749N/AINCLUDE_PATH = hxt
749N/AHXT_PATHS = Data Data/Tree Data/Tree/NTree Data/Digest Text Text/XML \
749N/A Text/XML/HXT Text/XML/HXT/IO Text/XML/HXT/DOM Text/XML/HXT/Arrow \
749N/A Text/XML/HXT/XPath Text/XML/HXT/Validator Text/XML/HXT/Parser \
749N/A Text/XML/HXT/RelaxNG Text/XML/HXT/ProtocolHandler Codec Codec/ASN1 \
749N/A Codec/Binary Codec/Encryption Codec/Encryption/RSA System Control \
749N/A Control/Arrow Control/Monad Network
749N/A
749N/ACLEAN_PATH = . utils/itcor \
749N/A utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
749N/A Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
749N/A Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
749N/A CspCASL ATC Proofs Comorphisms Isabelle Driver \
749N/A Taxonomy CASL_DL SPASS OWL_DL OMDoc $(PFE_PATHS) \
749N/A $(addprefix hxt/, $(HXT_PATHS))
749N/A
749N/A# the 'replacing spaces' example was taken from the (GNU) Make info manual
749N/Aempty =
749N/Aspace = $(empty) $(empty)
749N/A
1233N/A## set ghc imports properly for your system
1233N/AGHC_IMPORTS = `$(HC) --print-libdir`/imports
749N/A# import directories for ghc-5.04.2
749N/AGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
749N/ADRIFT_ENV = \
749N/A DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
749N/A
749N/A# override on commandline for other architectures
749N/AINSTALLDIR = \
749N/A /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
749N/A
749N/ADRIFT_deps = utils/DrIFT-src/*hs
749N/AGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
749N/AGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
749N/A Common/Lib/Map.hs Common/Lib/Set.hs
749N/AINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
749N/A Common/Lib/*.hs Common/*.hs CASL/*.hs Modal/AS_Modal.hs \
749N/A Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
749N/A
749N/AHC = ghc
749N/APERL = perl
749N/AHAPPY = happy -sga
749N/AGENRULES = utils/genRules
749N/AGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
749N/A -i Common.DynamicUtils -i Common.ATerm.Lib
749N/ADRIFT = utils/DrIFT
749N/AINLINEAXIOMS = utils/outlineAxioms
749N/AHADDOCK = haddock
749N/ACPPP = cpp
749N/A
749N/A# remove -fno-warn-orphans for older ghcs and add -ifgl
749N/AHC_WARN = -Wall -fno-warn-orphans
749N/AHC_FLAGS = \
749N/A $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
749N/A -fallow-overlapping-instances -fallow-undecidable-instances
749N/A# -ddump-minimal-imports
749N/A# flags also come in via ../uni/uni-package.conf
749N/A# but added it here in case of compilation without uni
749N/A
749N/AHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
749N/A
749N/Alogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS OWL_DL ConstraintCASL
749N/A
749N/ATESTTARGETS += test_parser hetpa hetana Test.o wrap isa fromKif \
749N/A atermlibtest hatermdiff atctest atctest2
749N/A
749N/AUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
749N/Aifneq ($(strip $(UNI_PACKAGE_CONF)),)
749N/AHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
749N/A -package uni-server -DUNI_PACKAGE
749N/A
749N/A# some modules from uni for haddock
749N/A# if uni/server is included also HaXml sources are needed
749N/Auni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
749N/A ../uni/reactor ../uni/util ../uni/posixutil
749N/A
749N/Auni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
749N/A $(wildcard ../uni/htk/haddock/*/*.hs)
749N/ATESTTARGETS += hetdg OWL_DL/readAStest taxonomy
749N/Aendif
749N/A
749N/A### list of directories to run checks in
749N/ATESTDIRS += Common CASL HasCASL test
749N/A
749N/APFE_TOOLDIR = $(wildcard ../programatica/tools)
749N/Aifneq ($(strip $(PFE_TOOLDIR)),)
749N/APFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
749N/A base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
749N/A base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
749N/A base/transforms base/transforms/Deriving property \
749N/A property/syntax property/AST property/transforms \
749N/A property/TI property/defs property/parse2 property/parse2/Parser
749N/A
749N/APFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
749N/Apfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
749N/APFE_PATH = $(addprefix -i, $(PFE_PATHS))
749N/APFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
749N/Ahappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
749N/A
749N/ALEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
749N/A
749N/Apatch: Haskell/Programatica.patch
749N/A patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< \
749N/A base/parse2/NumberNames.hs || exit 0
749N/A
749N/A$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
749N/A echo "{-# OPTIONS -w #-}" > $@
749N/A $< >> $@
749N/A
749N/A$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
749N/A $(LEX_DIR)/HsTokens.hs
749N/A $(HC) --make -O -package data \
749N/A -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
749N/A -i$(PFE_TOOLDIR)/base/lib \
749N/A -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
749N/A $@.hs -o $@
749N/A strip $@
749N/A
749N/Alogics += Haskell
749N/Aderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
749N/A $(LEX_DIR)Gen/HsLexerGen
749N/A
749N/AAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
749N/A Haskell/ProgramaticaPrelude.hs
749N/A
749N/A## rule for appendHaskellPreludeString
749N/AHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
749N/A $(APPENDPRELUDESTRING)
749N/A $(APPENDPRELUDESTRING) < $< > $@
749N/A chmod 444 $@
749N/A
749N/AAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
749N/A HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
749N/A HsModule HsName HsLiteral HsIdent
749N/A
749N/A#files in base/TI/
749N/A#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
749N/A
749N/A#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
749N/A
749N/AOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
749N/A base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
749N/A base/parse2/SourceNames base/syntax/SyntaxRec \
749N/A property/syntax/PropSyntaxStruct
749N/A
749N/AHaskell_files = $(addsuffix .hs, \
749N/A $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
749N/A $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
749N/A
749N/A## rule for ATC generation
749N/AHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
749N/A $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
749N/A
749N/Ahs_der_files += Haskell/TiATC.hs Haskell/TiDecorateATC.hs Haskell/TiPropATC.hs
749N/A
749N/ATESTDIRS += ToHaskell Haskell/test
749N/ATESTTARGETS += hana h2hf
749N/Aendif
749N/A
749N/A### Profiling (only for debugging)
749N/A### Attention every module must be compiled with profiling or the linker
749N/A### cannot link the various .o files properly. So after switching on
749N/A### Profiling, do an 'gmake real_clean; gmake'
749N/A### Comment in the following line for switching on profiling.
749N/A#HC_PROF = -prof -auto-all -fignore-asserts
749N/A
749N/AHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
749N/A -DCASLEXTENSIONS
749N/A
749N/A####################################################################
749N/A## sources for hets
749N/A
749N/Anon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
749N/A Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs
749N/A
749N/ASOURCE_PATHS = $(CLEAN_PATH)
749N/A
749N/Asources = hets.hs $(filter-out $(non_sources), \
749N/A $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
749N/A
749N/A#endif
749N/A
749N/Aobjects = $(sources:%.hs=%.o)
749N/A
749N/Adrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
749N/A Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
749N/A HasCASL/As.hs ATC/DevGraph.hs \
749N/A Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
749N/A ConstraintCASL/AS_ConstraintCASL.hs\
749N/A $(gendrifted_files)
749N/A
749N/Aatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
749N/A Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
749N/A Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
749N/A Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
749N/A
749N/Aatc_der_files = $(foreach file, $(atc_files), \
749N/A ATC/$(basename $(basename $(notdir $(file)))).der.hs)
749N/A
749N/AATC/Id.der.hs: Common/Id.hs $(GENRULES)
749N/A $(GENRULECALL) -o $@ $<
749N/A
749N/AATC/Result.der.hs: Common/Result.hs $(GENRULES)
749N/A $(GENRULECALL) -o $@ $<
749N/A
749N/AATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
749N/A $(GENRULECALL) -o $@ $<
749N/A
749N/AATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
749N/A $(GENRULECALL) -o $@ $<
749N/A
749N/AATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
749N/A
749N/AATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
749N/A
749N/AATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
749N/A
749N/AATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
749N/A
749N/AATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
749N/A $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
749N/A
749N/ACASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
749N/A CASL/AS_Basic_CASL.der.hs
749N/A
749N/AHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
749N/A
749N/AIsabelle_files = Isabelle/IsaSign.hs
749N/A
749N/AModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
749N/AConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
749N/ACoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs CoCASL/Sublogic.hs
749N/ACOL_files = COL/AS_COL.hs COL/COLSign.hs
749N/ACspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
749N/A
749N/ACASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
749N/A
749N/ASPASS_files = SPASS/Sign.hs
749N/A
749N/AOWL_DL_files = OWL_DL/Sign.hs
749N/A
749N/Aatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
749N/A
749N/Agenerated_rule_files = $(atc_der_files) $(atc_logic_files)
749N/A
749N/Agendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
749N/A
749N/Ainline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2CFOL.hs \
749N/A Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
749N/A Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
749N/A
749N/Agen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
749N/A
749N/Aderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
749N/A $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
749N/A OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
749N/A
749N/A# sources that have {-# OPTIONS -cpp #-}
749N/Acpp_sources = Common/DynamicUtils.hs \
749N/A Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
749N/A Isabelle/CreateTheories.hs \
749N/A SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
749N/A Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
749N/A Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
749N/A hxt/Text/XML/HXT/ProtocolHandler/ProtocolHandler.hs
749N/A
749N/A# unused, remove when header files are gone
749N/Agenrule_header_files = $(wildcard ATC/*.header.hs)
749N/A
749N/Anondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
749N/A $(wildcard utils/DrIFT-src/*.lhs) \
749N/A $(wildcard utils/GenerateRules/*.hs) \
749N/A $(wildcard utils/InlineAxioms/*.hs) \
749N/A $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
749N/A $(genrule_header_files) $(generated_rule_files) \
749N/A $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
749N/A Modal/GeneratePatterns.inline.hs \
749N/A Comorphisms/test/showKP.hs \
749N/A CASL/CCC/FreeTypes.hs \
749N/A Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
749N/A $(patsubst %.hs, %.der.hs, $(drifted_files))
749N/A
749N/Ahspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
749N/A
749N/A# this variable holds the modules that should be documented
749N/Adoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
749N/A
749N/Atax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
749N/A Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
749N/A
749N/Atax_objects = $(patsubst %.hs, %.o, $(tax_sources))
749N/A
749N/A####################################################################
749N/A### targets
749N/A
749N/A.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
749N/A real_clean bin_clean distclean \
749N/A check capa hacapa wrap isa h2h h2hf clean_genRules genRules \
749N/A taxonomy count doc apache_doc post_doc4apache fromKif \
749N/A derivedSources install_hets install release cgi patch ghci
749N/A
749N/A.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
749N/A
749N/Apatch:
749N/A
749N/Ahets: $(sources) $(derived_sources)
749N/A $(HC) --make -o $@ hets.hs $(HC_OPTS)
749N/A
749N/Ahets-opt:
749N/A $(MAKE) distclean
749N/A $(MAKE) derivedSources
749N/A $(MAKE) clean
749N/A $(MAKE) hets-optimized
749N/A
749N/Ahets-optimized: $(derived_sources)
749N/A $(HC) --make -O -o hets hets.hs $(HC_OPTS)
749N/A strip hets
749N/A
749N/Ahets-old: $(objects)
749N/A $(RM) $@
749N/A $(HC) -o hets $(HC_OPTS) $(objects)
749N/A
749N/Acgi:
749N/A $(MAKE) distclean
749N/A $(MAKE) derivedSources
749N/A $(MAKE) real_clean
749N/A $(MAKE) hets.cgi
749N/A
749N/Ahets.cgi: $(sources) GUI/hets_cgi.hs
749N/A ghc --make GUI/hets_cgi.hs -o $@ $(HC_INCLUDE) \
749N/A $(HC_FLAGS) $(PFE_FLAGS) -O
749N/A strip hets.cgi
749N/A
749N/A###############################
749N/A### TAGS files for (x)emacs
749N/A# load them with "M-x" "visit-tags-table" from
749N/A# "HetCATS/hetcats.TAGS"
749N/A# use "M-." to search for a tag
749N/A# !!Beware this is somewhat instable, because it uses an absolute path!!
749N/Ahetcats.TAGS: $(sources)
749N/A /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
749N/A $(sources); mv TAGS $@; mv tags hetcats.tags
749N/A
749N/Ahets_maintainers.txt: $(sources)
749N/A @echo 'File : Maintainer' > $@
749N/A @echo -n Generating $@ " "
749N/A @$(PERL) -e \
749N/A 'foreach my $$f (@ARGV) { open I, "<$$f"; \
749N/A print "$$f :"; while (<I>) \
749N/A { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
749N/A print " $$1" ; last} }; print "\n"; close I; }' \
749N/A $(sources) >> $@
749N/A @echo " done"
749N/A
749N/A###############################
749N/A### count lines of code
749N/Acount: $(sources)
749N/A wc -l $(sources)
749N/A###############################
749N/A### Documentation via haddock
749N/Adoc: docs/index.html
749N/A
749N/A# generate haddock documentation with links to sources
749N/A# the interface treatment is stolen from uni/mk/suffix.mk
749N/Adocs/index.html: $(doc_sources)
749N/A $(RM) -r docs
749N/A mkdir docs
749N/A cp -r ../uni/www docs/www || mkdir docs/www
749N/A HINTERFACES0=`find docs/www -name '*.haddock' \
749N/A -printf "--read-interface=www/%P,%p "` ; \
749N/A HINTERFACES=`echo $$HINTERFACES0 | \
749N/A $(PERL) -pe 's+/[^/]*.haddock,+,+g'` ; \
749N/A $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
749N/A -t 'Hets - the Heterogeneous Tool Set' \
749N/A -p Hets-Haddock-Prologue.txt $(doc_sources)
749N/A
749N/A# sources are not copied here
749N/Aapache_doc:
749N/A $(RM) -r docs
749N/A cvs up -d ; echo "CVS exited with: " $$?
749N/A $(MAKE) hets-opt
749N/A $(MAKE) doc
749N/A $(MAKE) post_doc4apache
749N/A $(MAKE) o_clean
749N/A $(MAKE) hets.cgi
749N/A
749N/Apost_doc4apache:
749N/A $(RM) -r a-docs
749N/A cp -r docs a-docs
749N/A $(PERL) utils/post_process_docs.pl a-docs \
749N/A 'Common.Lib.Map.html:Common.Lib._Map.html'
749N/A $(PERL) utils/post_process_docs.pl a-docs \
749N/A 'Data.Map.html:Data._Map.html'
749N/A
749N/A###############################
749N/A### release management
749N/A
749N/AderivedSources: $(derived_sources) $(hspp_sources)
749N/A
749N/Autils/DrIFT: $(DRIFT_deps)
749N/A (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
749N/A strip ../DrIFT)
749N/A
749N/Autils/genRules: $(GENERATERULES_deps)
749N/A (cd utils/GenerateRules; \
749N/A $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
749N/A GenerateRules.hs -o ../genRules && strip ../genRules)
749N/A
749N/A# "hssource" for ghc-5.04.2
749N/A$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
749N/A $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
749N/A -package hssource -i../.. -o $(INLINEAXIOMS)
749N/A strip $(INLINEAXIOMS)
749N/A
749N/Arelease:
749N/A $(RM) -r HetCATS
749N/A cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
749N/A co -P HetCATS
749N/A $(RM) -r uni
749N/A if [ -d ../uni ] ; then ln -s ../uni uni ; fi
749N/A $(RM) -r programatica
749N/A if [ -d ../programatica ] ; then \
749N/A mkdir programatica; \
749N/A ln -s ../../programatica/tools programatica/tools ; fi
749N/A (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
749N/A cp Makefile Makefile.orig; \
749N/A cp ReleaseMakefile Makefile; \
749N/A ./clean.sh; \
749N/A find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
749N/A $(RM) clean.*)
749N/A tar cvf HetCATS.tar HetCATS
749N/A
749N/Ainstall-hets:
749N/A chmod g+w hets
749N/A cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
749N/A cp -p version_nr $(INSTALLDIR)
749N/A (cd $(INSTALLDIR); $(RM) hets; \
749N/A ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
749N/A
749N/Ainstall: hets-opt install-hets
749N/A
749N/A###################################
749N/A### Common/LaTeX_maps.hs generation
749N/A
749N/Autils/genItCorrections: $(GENITCORRECTIONS_deps)
749N/A $(HC) --make -o $@ $<
749N/A strip $@
749N/A
749N/Apretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
749N/A pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
749N/A @echo -n "Generating pretty/LaTeX_maps.hs ... "
749N/A @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
749N/A @(cd pretty >/dev/null; ../utils/genItCorrections \
749N/A gen_it_characters gen_it_words >> LaTeX_maps.hs)
749N/A @echo "ready"
749N/A @echo "please copy the file manually to Common"
749N/A
749N/A#############################
749N/A### ATC DrIFT-rule generation
749N/A
749N/AgenRules: $(generated_rule_files)
749N/A
749N/ACASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
749N/A $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
749N/A
749N/AHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(HasCASL_files)
749N/A
749N/AIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
749N/A
749N/AModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
749N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
749N/A
749N/AConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
749N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
749N/A
749N/ACASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
749N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
749N/A
749N/ACoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
749N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
749N/A
749N/ACOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
749N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
749N/A
749N/ACspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
749N/A $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
749N/A
749N/ASPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
749N/A
749N/AOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
749N/A $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
749N/A -o $@ $(OWL_DL_files)
749N/A
749N/Aclean_genRules:
749N/A $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
749N/A Haskell/ATC_Haskell.der.hs
749N/A
749N/A###############
749N/A### clean up
749N/A
749N/Aclean: bin_clean o_clean clean_pretty
749N/A
749N/A### removes *.hi and *.o in all include directories
749N/Ao_clean:
749N/A for p in $(CLEAN_PATH) ; do \
749N/A (cd $$p ; $(RM) *.hi *.o) ; done
749N/A
749N/A### remove binaries
749N/Abin_clean:
749N/A $(RM) hets
749N/A $(RM) hets.cgi
749N/A $(RM) test_parser
749N/A $(RM) CASL/fromKif
749N/A $(RM) CASL/capa
749N/A $(RM) HasCASL/hacapa
749N/A $(RM) Haskell/hana
749N/A $(RM) Haskell/wrap
749N/A $(RM) Isabelle/isa
749N/A $(RM) Haskell/h2h
749N/A $(RM) Haskell/h2hf
749N/A $(RM) Syntax/hetpa
749N/A $(RM) Static/hetana
749N/A $(RM) GUI/hetdg
749N/A $(RM) hetpa
749N/A $(RM) hetana
749N/A $(RM) hetdg
749N/A $(RM) atctest2
749N/A $(RM) atctest
749N/A $(RM) Common/annos
749N/A $(RM) Common/test_parser
749N/A $(RM) Taxonomy/taxonomyTool
749N/A $(RM) OWL_DL/readAStest
749N/A
749N/Aclean_pretty:
749N/A $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
749N/A pretty/generated_words.tex
749N/A
749N/A### additionally removes the library files
749N/Areal_clean: clean
749N/A
749N/A### additionally removes generated files not in the CVS tree
749N/Adistclean: clean clean_genRules
749N/A $(RM) $(derived_sources)
749N/A $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
749N/A $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
749N/A $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
749N/A
749N/A####################################################################
749N/A### test targets
749N/A####################################################################
749N/A
749N/A### a parser to test annotation parser and Id parsers
749N/Atest_parser: Common/test_parser
749N/A
749N/ACommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### interactive
749N/Aghci: $(derived_sources)
749N/A $(HC)i $(HC_OPTS)
749N/A
749N/A### christian's target
749N/A### CASL parser
749N/AfromKif: CASL/fromKif
749N/A
749N/ACASL/fromKif: CASL/fromKif.hs Common/*.hs CASL/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### CASL parser
749N/Acapa: CASL/capa
749N/A
749N/ACASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### HasCASL parser
749N/Ahacapa: HasCASL/hacapa
749N/A
749N/AHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### Haskell wrapper parser
749N/Awrap: Haskell/wrap
749N/A
749N/AHaskell/wrap: Haskell/wrap.hs Common/*.hs Haskell/Wrapper.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### Isar parser
749N/Aisa: Isabelle/isa
749N/A
749N/AIsabelle/isa: Isabelle/isa.hs Common/*.hs Isabelle/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### Haskell analysis
749N/Ahana: Haskell/hana
749N/A
749N/AHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### Haskell to Isabelle-HOLCF translation
749N/Ah2hf: Haskell/h2hf
749N/A
749N/AHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
749N/A Common/Lib/*.hs Comorphisms/*.hs
749N/A $(HC) -O --make -o $@ $< $(HC_FLAGS) $(PFE_FLAGS)
749N/A
749N/A### HasCASL to Haskell translation
749N/Ah2h: Haskell/h2h
749N/A
749N/AHaskell/h2h: Haskell/h2h.hs Haskell/*.hs HasCASL/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### HetCASL parser
749N/Ahetpa: Syntax/hetpa.hs Syntax/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### HetCASL parser
749N/Ahetana: Static/hetana.hs Static/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### test program to check the known provers
749N/AshowKP: Comorphisms/test/showKP.hs Comorphisms/*.hs Common/*.hs Logic/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### ATC test system
749N/Aatctest: ATC/ATCTest.hs ATC/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/Aatctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs \
749N/A Common/Lib/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### ATerm.Lib test system
749N/Aatermlibtest: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
749N/A Common/ATerm/*.hs Common/Lib/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/Ahatermdiff: Common/ATerm/ATermDiffMain.hs Common/SimpPretty.hs \
749N/A Common/ATerm/*.hs Common/Lib/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### OWL_DL test target
749N/AOWL_DL/readAStest: OWL_DL/ToHaskellAS.hs Common/ATerm/*.hs \
749N/A Common/Lib/*.hs OWL_DL/*.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### HetCASL with dev graph
749N/Ahetdg: GUI/hetdg.hs $(drifted_files) *.hs
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/Ataxonomy: Taxonomy/taxonomyTool
749N/A
749N/ATaxonomy/taxonomyTool: Taxonomy/taxonomyTool.hs $(tax_sources)
749N/A $(HC) --make -o $@ $< $(HC_OPTS)
749N/A
749N/A### run tests in other directories
749N/Acheck: $(TESTTARGETS)
749N/A for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
749N/A
749N/A####################################################################
749N/A## Preparing the version of HetCATS
749N/ADriver/Version.hs: Driver/Version.in version_nr
749N/A $(RM) $@
749N/A $(PERL) utils/build_version.pl version_nr < Driver/Version.in > $@
749N/A chmod 444 $@
749N/A
749N/A## two hardcoded dependencies for a correct generation of Version.hs
749N/ADriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
749N/Ahets.hs: Driver/Version.hs
749N/A####################################################################
749N/A## rules for DrIFT
749N/A.SUFFIXES:
749N/A
749N/A%: %.hs
749N/A $(HC) --make -o $@ $<
749N/A
749N/A%.hs: %.y
749N/A $(HAPPY) -o $@.tmp $<
749N/A echo "{-# OPTIONS -w #-}" > $@
749N/A cat $@.tmp >> $@
749N/A $(RM) $@.tmp
749N/A
749N/A%.hs: %.der.hs $(DRIFT)
749N/A $(RM) $@
749N/A ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
749N/A chmod 444 $@
749N/A
749N/A## rules for inlineAxioms
749N/A%.hs: %.inline.hs $(INLINEAXIOMS)
749N/A $(RM) $@
749N/A $(INLINEAXIOMS) $< > $@
749N/A chmod 444 $@
749N/A
749N/A## rule for cpp and haddock
749N/A%.hspp: %.hs
749N/A $(HC) -E -cpp -DUNI_PACKAGE -optP -P $<
749N/A
749N/A## compiling rules for object and interface files
749N/A%.o %.hi: %.hs
749N/A $(HC) -c $< $(HC_OPTS)
749N/A
749N/A%.o %.hi: %.lhs
749N/A $(HC) -c $< $(HC_OPTS)
749N/A
749N/A## compiling rules for dependencies
749N/A%.d : %.hs
749N/A $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
749N/A
749N/A%.d : %.lhs
749N/A $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
749N/A
749N/A## generate the inline file for the predefined CASL_DL sign
749N/A# Warning: Don't change the order of the depencies!!
749N/ACASL_DL/PredefinedSign.inline.hs: \
749N/A CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
749N/A CASL_DL/PredDatatypes.het
749N/A $(RM) $@
749N/A utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
749N/A < CASL_DL/PredefinedSign.inline.hs.in > $@
749N/A echo " )" >> $@
749N/A chmod 444 $@
749N/A
749N/ACASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
749N/A CASL_DL/Datatypes.het
749N/A $(RM) $@
749N/A $(PERL) $+ > $@
749N/A chmod 444 $@
749N/A
749N/A## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
749N/A# uses intransparently utils/outlineAxioms
749N/AModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
749N/A utils/genTransMFormFunc.pl $(INLINEAXIOMS)
749N/A $(RM) $@
749N/A $(PERL) utils/genTransMFormFunc.pl $< $@
749N/A chmod 444 $@
749N/A
749N/A