Makefile revision 36f63902db2b3463faa9f59912ad106e2d5aaa24
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# Makefile
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# $Header$
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# Year: 2004
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# This Makefile will compile the new hets system and provides also
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# targets for test programs during implementation phases.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# !!! Note: This makefile is written for GNU make !!!
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# (gmake on solaris)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maederall: patch hets
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## Some varibles, which control the compilation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
d27ad22f77ca7399742b54e9dce2cdceed12d5e0Christian MaederINCLUDE_PATH = hxt
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederHXT_PATHS = Data Data/Tree Data/Tree/NTree Data/Digest Text Text/XML \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Text/XML/HXT Text/XML/HXT/IO Text/XML/HXT/DOM Text/XML/HXT/Arrow \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Text/XML/HXT/XPath Text/XML/HXT/Validator Text/XML/HXT/Parser \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Text/XML/HXT/RelaxNG Text/XML/HXT/ProtocolHandler Codec Codec/ASN1 \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder Codec/Binary Codec/Encryption Codec/Encryption/RSA System Control \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder Control/Arrow Control/Monad Network
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian MaederCLEAN_PATH = . utils/itcor \
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowski utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CspCASL ATC Proofs Comorphisms Isabelle Driver \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Taxonomy CASL_DL SPASS OWL_DL OMDoc $(PFE_PATHS) \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(addprefix hxt/, $(HXT_PATHS))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maederempty =
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederspace = $(empty) $(empty)
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder## set ghc imports properly for your system
8410667510a76409aca9bb24ff0eda0420088274Christian MaederGHC_IMPORTS = `$(HC) --print-libdir`/imports
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# import directories for ghc-5.04.2
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
8410667510a76409aca9bb24ff0eda0420088274Christian MaederDRIFT_ENV = \
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder# override on commandline for other architectures
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederINSTALLDIR = \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederDRIFT_deps = utils/DrIFT-src/*hs
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps) Common/Utils.hs
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs Common/Utils.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/Lib/Map.hs Common/Lib/Set.hs
d4892fa7401ceef014ea59d2d900773eaf88fcbdChristian MaederINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/Lib/Pretty.hs Common/Keywords.hs Common/Lib/Set.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/Lib/Map.hs Common/Lib/Rel.hs Common/Lib/State.hs Common/Id.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs CASL/ShowMixfix.hs \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder CASL/Utils.hs Common/Lexer.hs Common/Token.hs Common/Anno_Parser.hs \
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich Common/GlobalAnnotations.hs Common/PrettyPrint.hs Common/Partial.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/Print_AS_Annotation.hs Common/PPUtils.hs CASL/LiteralFuns.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CASL/Print_AS_Basic.hs Common/AnnoState.hs CASL/Formula.hs \
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian Maeder CASL/OpItem.hs CASL/SortItem.hs CASL/Inject.hs Common/Result.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/ConvertLiteral.hs Common/Earley.hs CASL/MixfixParser.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder CASL/Parse_AS_Basic.hs CASL/Sign.hs CASL/Overload.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CASL/StaticAna.hs Modal/AS_Modal.hs Modal/Parse_AS.hs \
e593b89bfd4952698dc37feced21cefe869d87a2Christian Maeder Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC = ghc
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederPERL = perl
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederHAPPY = happy -sga
f13d1e86e58da53680e78043e8df182eed867efbChristian MaederGENRULES = utils/genRules
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -i Common.DynamicUtils -i Common.ATerm.Lib
a2d6702f18737cc5fff8e8631c08f221f8375c4bChristian MaederDRIFT = utils/DrIFT
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian MaederINLINEAXIOMS = utils/outlineAxioms
31c49f2fa23d4ac089f35145d80a224deb6ea7e4Till MossakowskiHADDOCK = haddock
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus LuettichCPPP = cpp
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian MaederHC_WARN = -Wall -fno-warn-orphans
8cacad2a09782249243b80985f28e9387019fe40Christian MaederHC_FLAGS = \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC_WARN) -fglasgow-exts -fno-monomorphism-restriction \
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maeder -fallow-overlapping-instances -fallow-undecidable-instances
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# -ddump-minimal-imports
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# flags also come in via ../uni/uni-package.conf
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# but added it here in case of compilation without uni
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SPASS OWL_DL ConstraintCASL
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederTESTTARGETS += test_parser hetpa hetana Test.o wrap isa fromKif \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder atermlibtest hatermdiff atctest atctest2
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maederifneq ($(strip $(UNI_PACKAGE_CONF)),)
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder -package uni-server -DUNI_PACKAGE
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# some modules from uni for haddock
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder# if uni/server is included also HaXml sources are needed
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ../uni/reactor ../uni/util ../uni/posixutil
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(wildcard ../uni/htk/haddock/*/*.hs)
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederTESTTARGETS += hetdg OWL_DL/readAStest taxonomy
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederendif
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### list of directories to run checks in
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederTESTDIRS += Common CASL HasCASL test
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederifneq ($(strip $(PFE_TOOLDIR)),)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder base/transforms base/transforms/Deriving property \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder property/syntax property/AST property/transforms \
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
4017ebc0f692820736d796af3110c3b3018c108aChristian MaederPFE_PATH = $(addprefix -i, $(PFE_PATHS))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederLEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian Maederpatch: Haskell/Programatica.patch
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder patch -usNlp0 -d $(PFE_TOOLDIR) -i `pwd`/$< \
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maeder base/parse2/NumberNames.hs || exit 0
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder echo "{-# OPTIONS -w #-}" > $@
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $< >> $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(LEX_DIR)/HsTokens.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(HC) --make -O -package data \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -i$(PFE_TOOLDIR)/base/lib \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $@.hs -o $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder strip $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maederlogics += Haskell
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(LEX_DIR)Gen/HsLexerGen
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Haskell/ProgramaticaPrelude.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## rule for appendHaskellPreludeString
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(APPENDPRELUDESTRING)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(APPENDPRELUDESTRING) < $< > $@
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder chmod 444 $@
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder HsModule HsName HsLiteral HsIdent
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich#files in base/TI/
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus LuettichOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/syntax/PropSyntaxStruct
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHaskell_files = $(addsuffix .hs, \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for ATC generation
d272062059eea4d7479e1c6e8517469f02f61287Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
0cfef6179a1bfec4f07f460686dd629a27b4b778Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederhs_der_files += Haskell/TiATC.hs Haskell/TiDecorateATC.hs Haskell/TiPropATC.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederTESTDIRS += ToHaskell Haskell/test
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederTESTTARGETS += hana h2hf
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederendif
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### Profiling (only for debugging)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Attention every module must be compiled with profiling or the linker
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### cannot link the various .o files properly. So after switching on
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maeder### Profiling, do an 'gmake real_clean; gmake'
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### Comment in the following line for switching on profiling.
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian Maeder#HC_PROF = -prof -auto-all -fignore-asserts
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian MaederHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers -DCASLEXTENSIONS
0799b5dc3f06d2640e66e9ab54b8b217348fd719Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## sources for hets
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersnon_sources = Common/LaTeX_maps.svmono.hs CspCASL/Main.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder Common/CaslLanguage.hs ./Test.hs Static/LogicStructured.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederSOURCE_PATHS = $(CLEAN_PATH)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maedersources = hets.hs $(filter-out $(non_sources), \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder#endif
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederobjects = $(sources:%.hs=%.o)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder HasCASL/As.hs ATC/DevGraph.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ConstraintCASL/AS_ConstraintCASL.hs\
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(gendrifted_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
e220b2051a2342a9291721e6c7f408860bed01b7Jorina Freya Gerken Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Logic/Prover.hs #Common/Id.hs Common/Result.hs OWL_DL/AS.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_der_files = $(foreach file, $(atc_files), \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/Id.der.hs: Common/Id.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder $(GENRULECALL) -o $@ $<
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus LuettichATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner
e96a0bf4040fd789339958c01f145c5057d26db6René WagnerATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(GENRULECALL) -x ProverTemplate -i ATC.AS_Annotation -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CASL/AS_Basic_CASL.der.hs
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
43b4c41fbb07705c9df321221ab9cb9832460407Christian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederIsabelle_files = Isabelle/IsaSign.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs CoCASL/Sublogic.hs
e96a0bf4040fd789339958c01f145c5057d26db6René WagnerCOL_files = COL/AS_COL.hs COL/COLSign.hs
e5b79e9fe9606fd386dc840ea9f1514e7b9b32b9Christian MaederCspCASL_files = CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
e2d849b4152a234bc0afaa2ab3a7c17d28de7565Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederSPASS_files = SPASS/Sign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederOWL_DL_files = OWL_DL/Sign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2CFOL.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke# sources that have {-# OPTIONS -cpp #-}
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedercpp_sources = Common/DynamicUtils.hs \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke Common/Lib/Set.hs Common/Lib/Map.hs ATC/Set.hs\
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Isabelle/CreateTheories.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder SPASS/Logic_SPASS.hs GUI/Utils.hs Driver/WriteFn.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder hxt/Text/XML/HXT/ProtocolHandler/ProtocolHandler.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder# unused, remove when header files are gone
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettichnondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder $(wildcard utils/DrIFT-src/*.lhs) \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder $(wildcard utils/GenerateRules/*.hs) \
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maeder $(wildcard utils/InlineAxioms/*.hs) \
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(genrule_header_files) $(generated_rule_files) \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder Modal/GeneratePatterns.inline.hs \
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder CASL/CCC/FreeTypes.hs \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder $(patsubst %.hs, %.der.hs, $(drifted_files))
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder
ed9207cf24e96b0d6f59985822054ae28cb69b2eChristian Maeder# this variable holds the modules that should be documented
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichtax_objects = $(patsubst %.hs, %.o, $(tax_sources))
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich####################################################################
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich### targets
5c69cef4668bbd959d721668313a779126014d1eKlaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder real_clean bin_clean distclean \
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder check capa hacapa wrap isa h2h h2hf clean_genRules genRules \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke taxonomy count doc apache_doc post_doc4apache fromKif \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder derivedSources install_hets install release cgi patch ghci
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederpatch:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhets: $(sources) $(derived_sources)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ hets.hs $(HC_OPTS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhets-opt:
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(MAKE) distclean
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(MAKE) derivedSources
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(MAKE) clean
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(MAKE) hets-optimized
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettichhets-optimized: $(derived_sources)
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(HC) --make -O -o hets hets.hs $(HC_OPTS)
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich strip hets
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettichhets-old: $(objects)
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(RM) $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) -o hets $(HC_OPTS) $(objects)
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichcgi:
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich $(MAKE) distclean
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich $(MAKE) derivedSources
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(MAKE) real_clean
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder $(MAKE) hets.cgi
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maederhets.cgi: $(sources) GUI/hets_cgi.hs
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_INCLUDE) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC_FLAGS) $(PFE_FLAGS) -O
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder strip hets.cgi
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder###############################
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder### TAGS files for (x)emacs
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder# load them with "M-x" "visit-tags-table" from
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder# "HetCATS/hetcats.TAGS"
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder# use "M-." to search for a tag
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maederhetcats.TAGS: $(sources)
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich
5958fabb264ec3f5b2125ac5602121bd34814a79Klaus Luettichhets_maintainers.txt: $(sources)
c9e197862d9d8ef2585270dd08f5194b3aed4a9dKlaus Luettich @echo 'File : Maintainer' > $@
e7e1ab2ac3f1fded8611bb92ae00e8f3b8c693fbKlaus Luettich @echo -n Generating $@ " "
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich @$(PERL) -e \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich 'foreach my $$f (@ARGV) { open I, "<$$f"; \
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich print "$$f :"; while (<I>) \
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich print " $$1" ; last} }; print "\n"; close I; }' \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich $(sources) >> $@
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder @echo " done"
725a68ec81cba9b8aa8647bebfb5baa449803e7eKlaus Luettich
d579f5b263e6c73d466c265f2fbfd45b0e69ca64Klaus Luettich###############################
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder### count lines of code
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedercount: $(sources)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder wc -l $(sources)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder### Documentation via haddock
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maederdoc: docs/index.html
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# generate haddock documentation with links to sources
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# the interface treatment is stolen from uni/mk/suffix.mk
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederdocs/index.html: $(doc_sources)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(RM) -r docs
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich mkdir docs
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder cp -r ../uni/www docs/www || mkdir docs/www
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder HINTERFACES0=`find docs/www -name '*.haddock' \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -printf "--read-interface=www/%P,%p "` ; \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder HINTERFACES=`echo $$HINTERFACES0 | \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder $(PERL) -pe 's+/[^/]*.haddock,+,+g'` ; \
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder -t 'Hets - the Heterogeneous Tool Set' \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder -p Hets-Haddock-Prologue.txt $(doc_sources)
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski# sources are not copied here
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederapache_doc:
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(RM) -r docs
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder cvs up -d ; echo "CVS exited with: " $$?
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maeder $(MAKE) hets-opt
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(MAKE) doc
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder $(MAKE) post_doc4apache
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maeder $(MAKE) o_clean
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder $(MAKE) hets.cgi
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian Maederpost_doc4apache:
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(RM) -r a-docs
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder cp -r docs a-docs
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder 'Common.Lib.Map.html:Common.Lib._Map.html'
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(PERL) utils/post_process_docs.pl a-docs \
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder 'Data.Map.html:Data._Map.html'
94d3aa05411444596b44ede4531f05dd7ac20fdfChristian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder### release management
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian MaederderivedSources: $(derived_sources) $(hspp_sources)
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maederutils/DrIFT: $(DRIFT_deps)
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder strip ../DrIFT)
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder
8410667510a76409aca9bb24ff0eda0420088274Christian Maederutils/genRules: $(GENERATERULES_deps)
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich (cd utils/GenerateRules; \
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers GenerateRules.hs -o ../genRules && strip ../genRules)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers# "hssource" for ghc-5.04.2
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder -package hssource -i../.. -o $(INLINEAXIOMS)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder strip $(INLINEAXIOMS)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maederrelease:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) -r HetCATS
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder co -P HetCATS
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) -r uni
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder if [ -d ../uni ] ; then ln -s ../uni uni ; fi
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich $(RM) -r programatica
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder if [ -d ../programatica ] ; then \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder mkdir programatica; \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder ln -s ../../programatica/tools programatica/tools ; fi
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd HetCATS; $(MAKE) derivedSources; $(MAKE) clean; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cp Makefile Makefile.orig; \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder cp ReleaseMakefile Makefile; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ./clean.sh; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) clean.*)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder tar cvf HetCATS.tar HetCATS
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
e96a0bf4040fd789339958c01f145c5057d26db6René Wagnerinstall-hets:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder chmod g+w hets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers cp -p version_nr $(INSTALLDIR)
ba0ec5e897ef99d420c8c14c2374e0f32b7043dbKlaus Luettich (cd $(INSTALLDIR); $(RM) hets; \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
8555737bcc9bf1d0afb6624e4d8668f070bcaba1Christian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersinstall: hets-opt install-hets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Common/LaTeX_maps.hs generation
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettichutils/genItCorrections: $(GENITCORRECTIONS_deps)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $<
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich strip $@
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder @echo -n "Generating pretty/LaTeX_maps.hs ... "
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers gen_it_characters gen_it_words >> LaTeX_maps.hs)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo "ready"
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo "please copy the file manually to Common"
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski#############################
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maeder### ATC DrIFT-rule generation
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder
26f228bf3a3fea810223396e5794c217a79a8d5bChristian MaedergenRules: $(generated_rule_files)
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder
26f228bf3a3fea810223396e5794c217a79a8d5bChristian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder
ba904a15082557e939db689fcfba0c68c9a4f740Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(HasCASL_files)
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder
6ae5607d2def114f998fd49bac4eef12a2620fafChristian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian MaederSPASS/ATC_SPASS.der.hs: $(SPASS_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SPASS_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -o $@ $(OWL_DL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maederclean_genRules:
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder Haskell/ATC_Haskell.der.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder###############
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### clean up
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederclean: bin_clean o_clean clean_pretty
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### removes *.hi and *.o in all include directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedero_clean:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for p in $(CLEAN_PATH) ; do \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder (cd $$p ; $(RM) *.hi *.o) ; done
481d4fe351800ab00fd323db8974559431227305Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### remove binaries
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederbin_clean:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) hets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) hets.cgi
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) test_parser
481d4fe351800ab00fd323db8974559431227305Christian Maeder $(RM) CASL/fromKif
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) CASL/capa
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) HasCASL/hacapa
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(RM) Haskell/hana
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(RM) Haskell/wrap
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(RM) Isabelle/isa
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder $(RM) Haskell/h2h
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(RM) Haskell/h2hf
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(RM) Syntax/hetpa
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(RM) Static/hetana
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(RM) GUI/hetdg
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(RM) hetpa
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(RM) hetana
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(RM) hetdg
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(RM) atctest2
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(RM) atctest
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(RM) Common/annos
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(RM) Common/test_parser
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(RM) Taxonomy/taxonomyTool
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(RM) OWL_DL/readAStest
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederclean_pretty:
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder pretty/generated_words.tex
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### additionally removes the library files
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maederreal_clean: clean
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### additionally removes generated files not in the CVS tree
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersdistclean: clean clean_genRules
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) $(derived_sources)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich####################################################################
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich### test targets
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich####################################################################
6da66254a8cff186a1e550b4ace23fb7bcac0d90Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### a parser to test annotation parser and Id parsers
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettichtest_parser: Common/test_parser
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettich
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus LuettichCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettich $(HC) --make -o $@ $< $(HC_OPTS)
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettich
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### interactive
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettichghci: $(derived_sources)
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich $(HC)i $(HC_OPTS)
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### christian's target
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### CASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederfromKif: CASL/fromKif
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederCASL/fromKif: CASL/fromKif.hs Common/*.hs CASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### CASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedercapa: CASL/capa
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder### HasCASL parser
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maederhacapa: HasCASL/hacapa
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### Haskell wrapper parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederwrap: Haskell/wrap
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederHaskell/wrap: Haskell/wrap.hs Common/*.hs Haskell/Wrapper.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder### Isar parser
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maederisa: Isabelle/isa
fdef3358918491badb0e29e42b5d3b5a01950716Christian Maeder
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian MaederIsabelle/isa: Isabelle/isa.hs Common/*.hs Isabelle/*.hs
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder### Haskell analysis
fdef3358918491badb0e29e42b5d3b5a01950716Christian Maederhana: Haskell/hana
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian MaederHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
a368e3bc3e9e92cd1981f08987295234f3441736Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell to Isabelle-HOLCF translation
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowskih2hf: Haskell/h2hf
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs \
bf76f4fcf07abaebea587df8135de8356c26a363Till Mossakowski HasCASL/*.hs Isabelle/*.hs Common/*.hs
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### HasCASL to Haskell translation
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettichh2h: Haskell/h2h
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus LuettichHaskell/h2h: Haskell/h2h.hs Haskell/*.hs HasCASL/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhetpa: Syntax/hetpa.hs Syntax/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhetana: Static/hetana.hs Static/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### ATC test system
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederatctest: ATC/ATCTest.hs ATC/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettichatctest2: ATC/ATCTest2.hs Common/SimpPretty.hs Common/ATerm/*.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Common/Lib/*.hs
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder### ATerm.Lib test system
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettichatermlibtest: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder Common/ATerm/*.hs Common/Lib/*.hs
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(HC) --make -o $@ $< $(HC_OPTS)
hatermdiff: Common/ATerm/ATermDiffMain.hs Common/SimpPretty.hs \
Common/ATerm/*.hs Common/Lib/*.hs
$(HC) --make -o $@ $< $(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)
### HetCASL with dev graph
hetdg: GUI/hetdg.hs $(drifted_files) *.hs
$(HC) --make -o $@ $< $(HC_OPTS)
taxonomy: Taxonomy/taxonomyTool
Taxonomy/taxonomyTool: Taxonomy/taxonomyTool.hs $(tax_sources)
$(HC) --make -o $@ $< $(HC_OPTS)
### run tests in other directories
check: $(TESTTARGETS)
for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
####################################################################
## Preparing the version of HetCATS
Driver/Version.hs: Driver/Version.in version_nr
$(RM) $@
$(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) $< > $@)
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$@
## generate the inline file for the predefined CASL_DL sign
# Warning: Don't change the order of the depencies!!
CASL_DL/PredefinedSign.inline.hs: \
CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
CASL_DL/PredDatatypes.het
$(RM) $@
utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
< CASL_DL/PredefinedSign.inline.hs.in > $@
echo " )" >> $@
chmod 444 $@
CASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
CASL_DL/Datatypes.het
$(RM) $@
$(PERL) $+ > $@
chmod 444 $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
Modal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
utils/genTransMFormFunc.pl $(INLINEAXIOMS)
$(RM) $@
$(PERL) utils/genTransMFormFunc.pl $< $@
chmod 444 $@