Makefile revision a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4c
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# hetcats/Makefile
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# $Header$
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# Year: 2004
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# This Makefile will compile the new hetcats 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 ; make on linux)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maeder####################################################################
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder## Some varibles, which control the compilation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederINCLUDE_PATH = ghc:hetcats:fgl:hxt
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCOMMONLIB_PATH = Common/Lib:Common/ATerm:fgl/Data/Graph:fgl/Data/Graph/Inductive:fgl/Data/Graph/Inductive/Aux:fgl/Data/Graph/Inductive/Monad:fgl/Data/Graph/Inductive/Query
d27ad22f77ca7399742b54e9dce2cdceed12d5e0Christian MaederCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:utils/InlineAxioms:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:COL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet:Hatchet:Taxonomy:$(PFE_PATHS)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder## set ghc imports properly for your system
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}:${PFE_PATHS}'
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maederempty:=
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowskispace:= $(empty) $(empty)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# override on commandline for other architectures
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederDRIFT_deps = utils/DrIFT-src/*hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederINLINEAXIOMS_deps = utils/InlineAxioms/*hs $(drifted_files)
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederHC = ghc
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederPERL = perl
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederHAPPY = happy
8410667510a76409aca9bb24ff0eda0420088274Christian MaederDRIFT = $(DRIFT_ENV) utils/DrIFT
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederINLINEAXIOMS = utils/outlineAxioms
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder Haskell/ProgramaticaPrelude.hs
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichHADDOCK = haddock
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederCPPP = cpp
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederHC_FLAGS = -Wall -fglasgow-exts -fno-monomorphism-restriction \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder -fallow-overlapping-instances -fallow-undecidable-instances
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder# -ddump-minimal-imports
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder# flags also come in via ../uni/uni-package.conf
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder# but added it here in case of compilation without uni
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederHC_INCLUDE = $(addprefix -i, $(subst :, ,$(INCLUDE_PATH)))
d4892fa7401ceef014ea59d2d900773eaf88fcbdChristian Maeder
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederUNI_PACKAGE_CONF := $(wildcard ../uni/uni-package.conf)
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maederifneq ($(strip $(UNI_PACKAGE_CONF)),)
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder -package uni-server -DUNI_PACKAGE
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederlogics = CASL HasCASL Modal CoCASL COL CspCASL Hatchet
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian Maeder# some modules from uni for haddock
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder# if uni/server is included also HaXml sources are needed
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederuni_sources = $(wildcard ../uni/davinci/haddock/*.hs) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(wildcard ../uni/graphs/haddock/*.hs) \
e593b89bfd4952698dc37feced21cefe869d87a2Christian Maeder ../uni/htk/toplevel/HTk.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(wildcard ../uni/htk/haddock/*/*.hs) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(wildcard ../uni/events/haddock/*.hs) \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(wildcard ../uni/reactor/haddock/*.hs) \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder $(wildcard ../uni/util/haddock/*.hs) \
f13d1e86e58da53680e78043e8df182eed867efbChristian Maeder $(wildcard ../uni/posixutil/haddock/*.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederendif
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
a2d6702f18737cc5fff8e8631c08f221f8375c4bChristian MaederPFE_TOOLDIR := $(wildcard ../programatica/tools)
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maederifneq ($(strip $(PFE_TOOLDIR)),)
31c49f2fa23d4ac089f35145d80a224deb6ea7e4Till MossakowskiPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/transforms base/transforms/Deriving hs2html pfe property base \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder property/pfe property/syntax property/AST property/transforms \
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser \
8cacad2a09782249243b80985f28e9387019fe40Christian Maeder hs2stratego hs2stratego/AST
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_PATH = $(addprefix -i$(PFE_TOOLDIR)/, $(PFE_DIRS))
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder# add PFE_PATHS to DERIVEPATH if needed
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# but name clashes currently prevent ATC generation in a single file
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederPFE_PATHS = $(subst $(space),:,$(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS)))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederpfe_sources = $(wildcard $(subst :,/*hs , $(PFE_PATHS)))
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederPFE_FLAGS = -package data -package text $(PFE_PATH) -DPROGRAMATICA
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederhappy_files = $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(PFE_TOOLDIR)/base/parse2/Lexer/HsLex.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederlogics += Haskell
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederendif
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederhappy_files += Haskell/Hatchet/HsParser.hs
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### Profiling (only for debugging)
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder### Attention every module must be compiled with profiling or the linker
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder### cannot link the various .o files properly. So after switching on
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder### Profiling, do an 'gmake real_clean; gmake'
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### and comment out HC_PACKAGE variable definition above.
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### Comment in the following line for switching on profiling.
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder#HC_PROF = -prof -auto-all
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHCI_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_OPTS = $(HCI_OPTS) $(HC_PROF)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederDRIFT_OPTS = +RTS -K10m -RTS
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### list of directories to run checks in
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## sources for hetcats (semi - manually produced with a perl script)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGHCMAKE_OUTPUT = $(wildcard hetcats-make)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederifneq ($(strip $(GHCMAKE_OUTPUT)),)
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederinclude sources_hetcats.mk
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederelse
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederSOURCE_PATHS = $(COMMON_LIB_PATH):$(CLEAN_PATH)
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maedersources = $(wildcard $(subst :,/*hs , $(SOURCE_PATHS))/*hs)
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maederendif
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(gendrifted_files)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maederatc_files := Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/AS_Annotation.der.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Static/DevGraph.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Proofs/Proofs.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Isabelle/IsaSign.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederatc_der_files = $(foreach file, $(atc_files), \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder ATC/$(basename $(basename $(notdir $(file)))).der.hs)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederCASL_files := CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder CASL/AS_Basic_CASL.der.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHasCASL_files := HasCASL/As.hs HasCASL/Le.hs HasCASL/Morphism.hs \
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder HasCASL/Sublogic.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederModal_files := Modal/AS_Modal.hs Modal/ModalSign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCoCASL_files := CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCOL_files := COL/AS_COL.hs COL/COLSign.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederCspCASL_files := CspCASL/AS_CSP_CASL.hs CspCASL/SignCSP.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHatchet_files := Haskell/Hatchet/AnnotatedHsSyn.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Haskell/Hatchet/MultiModuleBasics.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Haskell/Hatchet/HsSyn.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Haskell/Hatchet/Representation.hs\
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Haskell/Hatchet/Env.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian MaederAst_Haskell_files := HsDeclStruct HsExpStruct HsFieldsStruct \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder HsModule HsName HsLiteral HsIdent
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederOther_PFE_files := property/AST/HsPropStruct base/defs/PNT \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder base/defs/UniqueNames base/Modules/TypedIds \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich base/TI/TiKinds \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich base/parse2/SourceNames base/syntax/SyntaxRec \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich property/syntax/PropSyntaxStruct
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHaskell_files = $(addsuffix .hs, \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
d272062059eea4d7479e1c6e8517469f02f61287Christian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Comorphisms/Modal2CASL.hs # Comorphisms/CASL2TopSort.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederderived_sources = $(drifted_files) hetcats/Version.hs $(happy_files) \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Haskell/PreludeString.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# sources that have {-# OPTIONS -cpp #-}
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maedercpp_sources = ./Isabelle/Logic_Isabelle.hs \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers ./Proofs/Proofs.hs hets.hs ./CASL/CCC/FreeTypes.hs \
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian Maeder ./Comorphisms/LogicList.hs ./Comorphisms/LogicGraph.hs
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder# this variable holds the modules that should be documented
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersdoc_sources = $(filter-out $(cpp_sources), $(filter-out $(pfe_sources), \
0799b5dc3f06d2640e66e9ab54b8b217348fd719Christian Maeder $(sources))) $(patsubst %.hs, %.hspp, $(cpp_sources))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckerstax_objects = $(patsubst %.hs,%.o,$(tax_sources))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder####################################################################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### targets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder.PHONY : all hets-opt hets-optimized clean d_clean real_clean bin_clean \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder lib_clean distclean check capa hacapa h2h clean_genRules genRules \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder taxonomy count doc apache_doc post_doc4apache \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder derivedSources install_hets install release
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder#.PRECIOUS: sources_hetcats.mk
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederall: hets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederhets: $(sources) $(derived_sources)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederhets-opt:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(MAKE) distclean
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(MAKE) derivedSources
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(MAKE) real_clean
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(MAKE) hets-optimized
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederhets-optimized: $(derived_sources)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder strip hets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhets-old: $(objects)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) $@
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(HC) -o hets $(HC_OPTS) $(objects)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maederhets.cgi: $(sources) GUI/hets_cgi.hs
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder ghc --make -package-conf /home/luettich/ghc-pkg/package.conf \
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_INCLUDE) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(HC_FLAGS) -O
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder strip hets.cgi
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedertaxonomy: Taxonomy/taxonomyTool.hs $(tax_sources)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -o Taxonomy/taxonomyTool $< -ifgl $(HC_OPTS)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich###############################
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich### TAGS files for (x)emacs
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner# load them with "M-x" "visit-tags-table" from
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner# "HetCATS/hetcats/hetcats.TAGS"
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# use "M-." to search for a tag
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# !!Beware this is somewhat instable, because it uses an absolute path!!
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederhetcats.TAGS: $(sources)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(sources); mv TAGS $@; mv tags hetcats.tags
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder###############################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### count lines of code
9e748851c150e1022fb952bab3315e869aaf0214Christian Maedercount: $(sources)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder wc -l $(sources)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski###############################
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### Documentation via haddock
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederdoc: docs/index.html
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# generate haddock documentation with links to sources
c9acb8681bcc512245b4f0d1a9f2b189c60e10d4Christian Maederdocs/index.html: $(doc_sources)
38352346eb1a67ba0f4eab8ad6f718528cf0cde0Christian Maeder $(HADDOCK) $(doc_sources) $(uni_sources) -o docs -h -v \
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian Maeder -i docs/base.haddock -i docs/parsec.haddock -s ../ \
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner -t 'hets -- a heterogenous Specification (CASL) tool set'
e5b79e9fe9606fd386dc840ea9f1514e7b9b32b9Christian Maeder
e2d849b4152a234bc0afaa2ab3a7c17d28de7565Christian Maeder# sources are not copied here
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederapache_doc:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) docs/*.*
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder cvs up -d
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(MAKE) hets-opt
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(MAKE) doc
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(MAKE) post_doc4apache
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(MAKE) o_clean
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(MAKE) hets.cgi
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederpost_doc4apache:
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(PERL) utils/post_process_docs.pl docs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder 'Common.Lib.Map.html:Common.Lib._Map.html'
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder cp docs/*.* a-docs/
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder###############################
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### release management
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian MaederderivedSources: $(derived_sources)
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederutils/DrIFT: $(DRIFT_deps)
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder strip ../DrIFT)
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederutils/genRules: $(GENERATERULES_deps)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder (cd utils/GenerateRules; \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -i../DrIFT-src -i../.. \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder GenerateRules.hs -o ../genRules && strip ../genRules)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs \
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder $(HC_OPTS) -o $(INLINEAXIOMS)
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski strip $(INLINEAXIOMS)
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettich
4017ebc0f692820736d796af3110c3b3018c108aChristian Maederrelease:
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder $(RM) -r HetCATS
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maeder cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository\
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder co -P HetCATS
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(RM) -r uni
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder -ln -s ../uni uni
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(RM) -r programatica
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder -mkdir programatica
b10267ae0a6523b73113fc2dee9ea628266fce60Christian Maeder -ln -s ../../programatica/tools programatica/tools
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder (cd HetCATS; $(MAKE) derivedSources; ./clean.sh; \
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(RM) clean.*; mv Makefile Makefile.orig; \
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder mv ReleaseMakefile Makefile)
ed9207cf24e96b0d6f59985822054ae28cb69b2eChristian Maeder tar cvf HetCATS.tar HetCATS
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maederinstall-hets:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder chmod g+w hets
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder cp -p version_nr $(INSTALLDIR)
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich (cd $(INSTALLDIR); $(RM) hets; \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederinstall: hets-opt install-hets
5c69cef4668bbd959d721668313a779126014d1eKlaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich#############################
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder### ATC DrIFT-rule generation
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder
53818ced114da21321063fff307aa41c1ab31dd3Achim MahnkegenRules: $(generated_rule_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder$(atc_der_files): $(atc_files) $(genrule_header_files) utils/genRules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(foreach file,$(atc_files),$(gen_atc_files))
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) utils/genRules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder utils/genRules -r $(rule) -o CASL $(CASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) utils/genRules
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder utils/genRules -r $(rule) -o HasCASL $(HasCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) utils/genRules
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich utils/genRules -r $(rule) -o Modal $(Modal_files)
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus LuettichCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) utils/genRules
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich utils/genRules -r $(rule) -o CoCASL $(CoCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian MaederCOL/ATC_COL.der.hs: $(COL_files) utils/genRules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder utils/genRules -r $(rule) -o COL $(COL_files)
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) utils/genRules
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder utils/genRules -r $(rule) -o CspCASL $(CspCASL_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
3a7788e09dd23b364a46c9488cbd1522369113dbChristian MaederHatchet/ATC_Hatchet.der.hs: $(Hatchet_files) utils/genRules
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder utils/genRules -r $(rule) -o Hatchet -h ATC/Hatchet.header.hs \
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich $(Hatchet_files)
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder
ef67402074be14deb95e4ff564737d5593144130Klaus LuettichHaskell/ATC_Haskell.der.hs: $(Haskell_files) utils/genRules
5958fabb264ec3f5b2125ac5602121bd34814a79Klaus Luettich utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
c9e197862d9d8ef2585270dd08f5194b3aed4a9dKlaus Luettich $(Haskell_files)
e7e1ab2ac3f1fded8611bb92ae00e8f3b8c693fbKlaus Luettich
ef67402074be14deb95e4ff564737d5593144130Klaus Luettichrule:= ShATermConvertible
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettichgen_atc_files = \
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich then utils/genRules -r $(rule) -o ATC -h \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
725a68ec81cba9b8aa8647bebfb5baa449803e7eKlaus Luettich else utils/genRules -r $(rule) -o ATC $(file); fi ;
d579f5b263e6c73d466c265f2fbfd45b0e69ca64Klaus Luettich
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maederclean_genRules:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder#############################
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder### programatica stuff
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederLEX_DIR := $(PFE_TOOLDIR)/base/parse2/Lexer
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $< > $@
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(LEX_DIR)/HsTokens.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -O -package data \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder -i$(PFE_TOOLDIR)/base/lib \
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder $@.hs -o $@
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder###############
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder### clean up
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederclean: bin_clean o_clean
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder### removes *.hi and *.o in all include directories
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maedero_clean:
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder (cd $$p ; $(RM) *.hi *.o *.hspp) ; done
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maeder
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder### remove binaries
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederbin_clean:
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian Maeder $(RM) hets
432b5019a1852dc850e776caa268fef30ce0d7ccChristian Maeder $(RM) test_parser
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(RM) CASL/capa
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(RM) HasCASL/hacapa
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(RM) Haskell/hapa
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) Haskell/hana
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(RM) Haskell/wrap
94d3aa05411444596b44ede4531f05dd7ac20fdfChristian Maeder $(RM) ToHaskell/h2h
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(RM) Syntax/hetpa
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder $(RM) Static/hetana
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder $(RM) GUI/hetdg
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder $(RM) hetpa
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder $(RM) hetana
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder $(RM) hetdg
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder $(RM) atctest2
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder $(RM) atctest
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder $(RM) Common/annos
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder $(RM) Haskell/Hatchet/hatch
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich $(RM) ToHaskell/translateAna
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich $(RM) Taxonomy/taxonomyTool
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### additonally removes *.d (dependency files) in every include directory
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### also delete *.d.bak (dependency file backups)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederd_clean: clean
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder for p in $(subst :, ,$(CLEAN_PATH)) . ; do \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder (cd $$p ; $(RM) *.d *.d.bak) ; done
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### remove files also in own libraries
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maederlib_clean:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder for p in $(subst :, ,$(COMMONLIB_PATH)) . ; do \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd $$p ; $(RM) *.hi *.d *.o) ; done
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### additionally removes the files that define the sources-variable
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederreal_clean: bin_clean lib_clean clean
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich $(RM) hetcats-make sources_hetcats.mk
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### additionally removes files not in CVS tree
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederdistclean: real_clean clean_genRules d_clean
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) $(derived_files)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder####################################################################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### test targets
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers####################################################################
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### a parser to test annotation parser and Id parsers
e96a0bf4040fd789339958c01f145c5057d26db6René Wagnertest_parser: Common/test_parser
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(HC) --make -o $@ $< $(HC_OPTS)
ba0ec5e897ef99d420c8c14c2374e0f32b7043dbKlaus Luettich
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder### interactive
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckersghci:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC)i $(HCI_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### christian's target
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich### CASL parser
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettichcapa: CASL/capa
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus LuettichCASL/capa: CASL/capa.hs Common/*.hs CASL/*.hs
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HasCASL parser
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maederhacapa: HasCASL/hacapa
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(HC) --make -o $@ $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell analysis
d67a33b40578beef2e255a274f89bb9c34aaf056Christian Maederhana: Haskell/hana
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski
d67a33b40578beef2e255a274f89bb9c34aaf056Christian MaederHaskell/hana: Haskell/hana.hs Haskell/HatAna.hs Haskell/PreludeString.hs
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder### HasCASL to Haskell translation
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maederh2h: ToHaskell/h2h
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder
ba904a15082557e939db689fcfba0c68c9a4f740Christian MaederToHaskell/h2h: ToHaskell/h2h.hs ToHaskell/*.hs Haskell/*.hs HasCASL/*.hs
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maeder### HetCASL parser
6ae5607d2def114f998fd49bac4eef12a2620fafChristian Maederhetpa: Syntax/hetpa.hs Syntax/*.hs
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### HetCASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhetana: Static/hetana.hs Static/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder### ATC test system
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederatctest: ATC/ATCTest.hs ATC/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maederatctest2: Common/ATerm/atctest2.hs Common/SimpPretty.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Common/ATerm/*.hs Common/Lib/*.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### ATerm.Lib test system
08e5741dd8b6bf9b7419e89298e384e18bc57f64Christian Maederatermlibtest: Common/ATerm/atermlibtest.hs Common/SimpPretty.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Common/ATerm/*.hs Common/Lib/*.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder### HetCASL with dev graph
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maederhetdg: GUI/hetdg.hs $(drifted_files) *.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### run tests in other directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedercheck: hetcats
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder####################################################################
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder## Preparing the version of HetCATS
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maederhetcats/Version.hs: hetcats/Version.in version_nr
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## two hardcoded dependencies for a correct generation of Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederhets.hs: hetcats/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rules for DrIFT
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.SUFFIXES:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder%: %.hs
481d4fe351800ab00fd323db8974559431227305Christian Maeder $(HC) --make -o $@ $<
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder%.hs: %.ly
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HAPPY) $<
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder%.hs: %.y
481d4fe351800ab00fd323db8974559431227305Christian Maeder $(HAPPY) -o $@ $<
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder%.hs: %.der.hs utils/DrIFT
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(DRIFT) $(DRIFT_OPTS) $< > $@
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski## rules for inlineAxioms
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder%.hs: %.inline.hs $(INLINEAXIOMS)
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(INLINEAXIOMS) $< > $@
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini## rule for appendHaskellPreludeString
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo TorriniHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(APPENDPRELUDESTRING)
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(APPENDPRELUDESTRING) < $< > $@
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini## rule for cpp and haddock
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder%.hspp: %.hs
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(HC) -E -cpp -DUNI_PACKAGE -optP -P $<
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder## compiling rules for object and interface files
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski%.o %.hi: %.hs
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(HC) -c $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder%.o %.hi: %.lhs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) -c $< $(HC_OPTS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for dependencies
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder%.d : %.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers%.d : %.lhs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder utils/genTransMFormFunc.pl $(INLINEAXIOMS)
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich $(PERL) utils/genTransMFormFunc.pl $< $@
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich
5d4038657f6a63e131f5804af2f7957b69e15a43Klaus Luettich# hetcats-make is created as side-effect of hets or hets-optimized
6da66254a8cff186a1e550b4ace23fb7bcac0d90Christian Maedersources_hetcats.mk: hetcats-make utils/create_sources.pl
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(PERL) utils/create_sources.pl hetcats-make sources_hetcats.mk
d6c6ad132dcecc84fe71dbeeab6dba0e21483393Klaus Luettich