Makefile revision b36f451c8ccd631dac70b541450c880b65d86f3b
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# This Makefile will compile the new hets system and provides also
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# targets for test programs during implementation phases.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# !!! Note: This makefile is written for GNU make !!!
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# (gmake on solaris)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte####################################################################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## Some varibles, which control the compilation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# the 'replacing spaces' example was taken from the (GNU) Make info manual
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# override on commandline for other architectures
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# list glade files
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortelogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ConstraintCASL Propositional OWL RelationalScheme VSE OMDoc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### list of directories to run checks in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte base/transforms base/transforms/Deriving property \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte property/syntax property/AST property/transforms \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte property/TI property/defs property/parse2 property/parse2/Parser
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortepfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of programatica package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -i `pwd`/Haskell/Programatica.patch || exit 0); \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte cp -f utils/programatica.cabal ../programatica/tools; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "{-# OPTIONS -w #-}" > $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortederived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## rule for appendHaskellPreludeString
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan KannappanOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
4558d122136f151d62acbbc02ddb42df89a5ef66Viswanathan Kannappan base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## rule for ATC generation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
c946faca5d4627284fb79c6b04e652b471034495allan# remove -fno-warn-orphans for older ghcs and add -ifgl
c946faca5d4627284fb79c6b04e652b471034495allan# INCLUDE_PATH =
c946faca5d4627284fb79c6b04e652b471034495allan# uncomment for profiling
c946faca5d4627284fb79c6b04e652b471034495allan# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# -ddump-minimal-imports
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# uncomment to above line to generate .imports files for displayDependencyGraph
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte####################################################################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte## sources for hets
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortenon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
d8c54e3d070f57cc1b4d6c8262f0868219c8ce7cSam Cramer Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ATC/$(basename $(basename $(notdir $(file)))).der.hs)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GENRULECALL) -i ATC.LibName -i ATC.Grothendieck -o $@ $<
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortegenerated_rule_files = $(atc_der_files) $(atc_logic_files)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortegendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortegen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortederived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# sources that have {-# OPTIONS -cpp #-}
c946faca5d4627284fb79c6b04e652b471034495allan SoftFOL/Logic_SoftFOL.hs GUI/Utils.hs Driver/WriteFn.hs \
c946faca5d4627284fb79c6b04e652b471034495allan Propositional/Logic_Propositional.hs GUI/GraphMenu.hs \
c946faca5d4627284fb79c6b04e652b471034495allan PGIP/InfoCommands.hs OWL/Logic_OWL.hs GUI/ShowGraph.hs \
c946faca5d4627284fb79c6b04e652b471034495allan# unused, remove when header files are gone
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortegenrule_header_files = $(wildcard ATC/*.header.hs)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortenondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(genrule_header_files) $(generated_rule_files) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortehspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# this variable holds the modules that should be documented
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortedoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetax_objects = $(patsubst %.hs, %.o, $(tax_sources))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte####################################################################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte real_clean bin_clean package_clean distclean packages \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte base64_pkg http_pkg syb_pkg shellac_pkg shread_pkg shcompat_pkg \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte tagsoup_pkg hxt_pkg hxtfilter_pkg haifa_pkg programatica_pkg \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte check capa hacapa h2h h2hf showKP clean_genRules genRules \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte derivedSources install_hets install release cgi ghci
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
a79493184c9332129c9c91500069322f6f3fafddReed echo "of syb-generics package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte echo "of HAIFA package found"; else \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @echo 'File : Maintainer' > $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @echo " done"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte###############################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### count lines of code
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte###############################
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte### Documentation via haddock
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# generate haddock documentation with links to sources
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# the interface treatment is stolen from uni/mk/suffix.mk
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte HINTERFACES0=`find -L docs/www -name '*.haddock' \
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
-i../.. -o $(INLINEAXIOMS)
if [ -d ../programatica ] ; then \
./clean.sh; \
### Common/LaTeX_maps.hs generation
strip $@
@echo -n "Generating pretty/LaTeX_maps.hs ... "
@(cd pretty >/dev/null; ../utils/genItCorrections \
$(RM) $@
## two hardcoded dependencies for a correct generation of Version.hs
.SUFFIXES:
%.hs: %.y
$(RM) $@
$(RM) $@
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs
$(RM) $@
$(RM) $@
$(PERL) $+ > $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
$(RM) $@
@echo Please do