Makefile revision cd36bffee51c77cdadcb9f916b34fa512e311946
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# Makefile
c63ebf815c8a874525cf18670ad74847f7fc7b26Christian Maeder# $Id$
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
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maederall: hets
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder####################################################################
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder## Some varibles, which control the compilation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederINCLUDE_PATH =
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHAIFA_PATHS = Network Network/Server Org Org/W3 Org/W3/N2001 \
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich Org/Xmlsoap Org/Xmlsoap/Schemas Org/Xmlsoap/Schemas/Soap \
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich Text Text/XML Text/XML/HXT Text/XML/Schema Text/XML/Schema/TypeMapper \
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich Text/XML/Serializer
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich
a737caf82de97c1907027c03e4b4509eb492b4b8Christian MaederSOURCE_PATHS = . utils/itcor \
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
01e383014b555bbcf639c0ca60c5810b3eff83c0Christian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski CspCASL ATC Proofs Comorphisms Isabelle Driver \
9dac90ec2be2a72e03893095461960d483fe2fc2Christian Maeder Taxonomy CASL_DL SoftFOL OWL_DL OMDoc PGIP Propositional
5e5d3e82af3bc2834f8718a52d9f45da80220273Dominik Luecke
317bcd45211dd8f28a8ebb3dee7a67197391fc0dDominik Luecke# the 'replacing spaces' example was taken from the (GNU) Make info manual
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowskiempty =
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederspace = $(empty) $(empty)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## set ghc imports properly for your system
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGHC_IMPORTS = `$(HC) --print-libdir`/imports
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian Maeder# import directories for ghc-5.04.2
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederGHC5 = $(GHC_IMPORTS)/base:$(GHC_IMPORTS)/haskell98
8410667510a76409aca9bb24ff0eda0420088274Christian MaederDRIFT_ENV = \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder DERIVEPATH=.:$(GHC_IMPORTS):$(GHC5):$(subst $(space),:,$(PFE_PATHS))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder# override on commandline for other architectures
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichINSTALLDIR = \
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian MaederDRIFT_deps = utils/DrIFT-src/*hs
4cb215739e9ab13447fa21162482ebe485b47455Christian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
8ef75f1cc0437656bf622cec5ac9e8ea221da8f2Christian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
8d97ef4f234681b11bb5924bd4d03adef858d2d2Christian MaederHC = ghc
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederHCPKG = ghc-pkg
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPERL = perl
e593b89bfd4952698dc37feced21cefe869d87a2Christian MaederHAPPY = happy -sga
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENRULES = utils/genRules
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian Maeder -i Data.Typeable -i Common.ATerm.Lib
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederDRIFT = utils/DrIFT
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederINLINEAXIOMS = utils/outlineAxioms
51d769d55d88dfa88bdf54bee78d8fa85a2deba8Christian MaederHADDOCK = haddock
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian MaederOSBYUNAME = $(shell uname)
51d769d55d88dfa88bdf54bee78d8fa85a2deba8Christian Maederifneq ($(findstring SunOS, $(OSBYUNAME)),)
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederTAR = gtar
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederelse
c3053d57f642ca507cdf79512e604437c4546cb9Christian MaederTAR = tar
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederendif
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederARCH = $(subst $(space),,$(shell uname -m))
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian MaederSETUP = utils/Setup
d0279930f87bf39843e0bd2992a4789322662144Christian MaederSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
c2fcc35abb03cf0b4ca4b050efeb10827f38c322Christian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederSETUPPACKAGE = ../$(SETUP) clean; \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder ../$(SETUP) configure -p $(SETUPPREFIX); \
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederHAXMLVERSION = $(shell $(HCPKG) field HaXml version)
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maederifneq ($(findstring 1.13.2, $(HAXMLVERSION)),)
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian MaederHAXML_PACKAGE = -package HaXml -DHAXML_PACKAGE
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettichendif
317bcd45211dd8f28a8ebb3dee7a67197391fc0dDominik Luecke
8cacad2a09782249243b80985f28e9387019fe40Christian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederHC_WARN = -Wall -fno-warn-orphans
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian MaederHC_FLAGS = $(HAXML_PACKAGE) \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(HC_WARN) -fglasgow-exts -fallow-overlapping-instances \
8a28707e9155465c6f2236a06eac6580a65c7025Christian Maeder# -ddump-minimal-imports
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich# uncomment to above line to generate .imports files for displayDependencyGraph
797ccd67cb8ae127be097cd43448801b673e3b69Christian Maeder
797ccd67cb8ae127be097cd43448801b673e3b69Christian Maeder
431d34c7007a787331c4e5ec997badb0f8190fc7Christian MaederHC_OPTS_MAC := $(if $(findstring Darwin,$(shell uname -s)), \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder -optl-F$(HOME)/Library/Frameworks -optl-framework -optlGNUreadline,)
498aa48bdb931ab50990d3b74318a5db2312186cChristian Maeder
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maederlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder OWL_DL ConstraintCASL Propositional
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederUNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederifneq ($(strip $(UNI_PACKAGE_CONF)),)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederHC_PACKAGE = -package-conf $(UNI_PACKAGE_CONF) -package uni-davinci \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder -package uni-server -DUNI_PACKAGE
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder# some modules from uni for haddock
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# if uni/server is included also HaXml sources are needed
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederuni_dirs = ../uni/davinci ../uni/graphs ../uni/events \
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder ../uni/reactor ../uni/util ../uni/posixutil
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian Maederuni_sources = $(wildcard $(addsuffix /haddock/*.hs, $(uni_dirs))) \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder $(wildcard ../uni/htk/haddock/*/*.hs)
51d769d55d88dfa88bdf54bee78d8fa85a2deba8Christian MaederTESTTARGETFILES += OWL_DL/ToHaskellAS.hs Taxonomy/taxonomyTool.hs \
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder SoftFOL/tests/CMDL_tests.hs
2d130d212db7208777ca896a7ecad619a8944971Christian Maederendif
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder### list of directories to run checks in
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederTESTDIRS += Common CASL HasCASL test
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian Maederhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian 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 \
a9b59eb2ce961014974276cdae0e9df4419bd212Christian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/transforms base/transforms/Deriving property \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder property/syntax property/AST property/transforms \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder property/TI property/defs property/parse2 property/parse2/Parser
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian MaederPFE_PATH = $(addprefix -i, $(PFE_PATHS))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPFE_FLAGS = -package programatica -DPROGRAMATICA
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederLEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(LEX_DIR)/HsLex.hs $(SETUP)
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder @if $(HCPKG) field programatica version; then \
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder echo "of programatica package found"; else \
b568982efd0997d877286faa592d81b03c8c67b8Christian Maeder (patch -usNlp0 -d $(PFE_TOOLDIR) \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -i `pwd`/Haskell/Programatica.patch || exit 0); \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich cp -f utils/programatica.cabal ../programatica/tools; \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder cp -f $(SETUP) ../programatica/tools; \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder (cd ../programatica/tools; \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ./Setup configure $(SETUPPREFIX); \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ./Setup build; ./Setup install --user) fi
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder echo "{-# OPTIONS -w #-}" > $@
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder $< >> $@
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(LEX_DIR)/HsTokens.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(HC) --make -fno-monomorphism-restriction -O \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -i$(PFE_TOOLDIR)/base/lib \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $@.hs -o $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder strip $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederlogics += Haskell
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(LEX_DIR)Gen/HsLexerGen
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maederutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder $(HC) --make -o $@ $<
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder
e6d5dbbc3308f05197868806e0b860f4f53875f1Christian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder Haskell/ProgramaticaPrelude.hs
06ba24fa9695b698437546276f37aa5e1924ad1bChristian Maeder
06ba24fa9695b698437546276f37aa5e1924ad1bChristian Maeder## rule for appendHaskellPreludeString
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder $(APPENDPRELUDESTRING)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(RM) $@
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder $(APPENDPRELUDESTRING) < $< > $@
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder chmod 444 $@
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
13731dfbb4b6a31b35dd210e832e920065b6ac45Christian Maeder HsModule HsName HsLiteral HsIdent
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder#files in base/TI/
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
42b12fba6830ada5057949f825fc27edf5574e5fChristian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
42b12fba6830ada5057949f825fc27edf5574e5fChristian Maeder property/syntax/PropSyntaxStruct
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederHaskell_files = $(addsuffix .hs, \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rule for ATC generation
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maeder
93f5b72fdb9ee734caa750b43dd79bbb590dcd73Christian Maederhs_der_files += $(hs_clean_files)
328a85c807f2a95c3f147d10b05927eaf862ebebChristian Maeder
a6db617ca58eb6a0587b6366e913107dfecb71b5Heng JiangTESTDIRS += ToHaskell Haskell/test
06dd4e7c29f33f6122a910719e3bd9062256e397Andy GimblettTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
317bcd45211dd8f28a8ebb3dee7a67197391fc0dDominik Lueckeendif
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Profiling (only for debugging)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder### Attention every module must be compiled with profiling or the linker
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder### cannot link the various .o files properly. So after switching on
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder### Profiling, do an 'gmake real_clean; gmake'
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers### Comment in the following line for switching on profiling.
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder#HC_PROF = -prof -auto-all -fignore-asserts
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederHC_OPTS = $(HC_FLAGS) $(HC_INCLUDE) $(HC_PACKAGE) $(PFE_FLAGS) $(HC_PROF) \
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder -DCASLEXTENSIONS $(HC_OPTS_MAC)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder####################################################################
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder## sources for hets
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maedernon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder $(SETUP).hs
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maeder
a14767aeac3e78ed100f5b75e210ba563ee10dbaChristian Maedersources = hets.hs $(filter-out $(non_sources), \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederobjects = $(sources:%.hs=%.o)
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maederdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder ATC/DevGraph.hs \
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs CASL_DL/AS_CASL_DL.hs\
f9e0b18852b238ddb649d341194e05d7200d1bbeChristian Maeder ConstraintCASL/AS_ConstraintCASL.hs\
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder Propositional/AS_BASIC_Propositional.hs\
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder $(gendrifted_files)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder 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)
697e63e30aa3c309a1ef1f9357745111f8dfc5a9Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/Id.der.hs: Common/Id.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -o $@ $<
ac34194a668399bb8ef238da77c3a09e93fb253bChristian Maeder
ac34194a668399bb8ef238da77c3a09e93fb253bChristian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -o $@ $<
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder
4c8d3c5a9e938633f6147b5a595b9b93bfca99e6Christian MaederATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
1842453990fed8a1bd7a5ac792d7982c1d2bfcd5Christian Maeder $(GENRULECALL) -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
986d3f255182539098a97ac86da9eeee5b7a72e3Christian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian Maeder
01e278bdd7dce13b9303ed3d79683d83c89d09f9Liam O'ReillyATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke
8c812cd83569e973f10cf69a342424ceabc07af9Christian MaederATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder $(GENRULECALL) -i ATC.AS_Architecture -o $@ $<
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder
05a206508bc898f87fe6ab6e069814df3c29d303Dominik LueckeATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Luecke $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -i ATC.AS_Annotation -o $@ $<
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder
0b349288edfa50fdf38fda1a14e1562d03f92574Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder CASL/AS_Basic_CASL.der.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
1b3a2f98d1cd01fc9e0591f69507e20526727559Dominik LueckeHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich
a4d469c9b085a55257fdf67133b6d0dbabb88032Dominik LueckeIsabelle_files = Isabelle/IsaSign.hs
e39a1626bee36d6ad13a2c0014a80ef179a65bcbChristian Maeder
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian MaederPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs\
c70ef4c3b3a62764f715510c9fd67dde3acfe454Christian Maeder Propositional/Sublogic.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederCOL_files = COL/AS_COL.hs COL/COLSign.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
b9b960bc75e34658e70c4a0231dbc6a6e7373f2dChristian Maeder CspCASL/SignCSP.hs
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maeder
846d851fc0c2c49e949763cd3407634ba0f726c0Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederSoftFOL_files = SoftFOL/Sign.hs
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
43b4c41fbb07705c9df321221ab9cb9832460407Christian MaederOWL_DL_files = OWL_DL/Sign.hs
8c812cd83569e973f10cf69a342424ceabc07af9Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
70731e5459a18fc473bdc962ca94d1c12de974afChristian Maeder
edd1b7f4720bc2eea51fa0685417e1e4f3be4915Klaus Luettichgendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
7809fb14d290d257ed6d46a2dd563227e227fcf3Christian Maeder
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maederinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
bd54a9917cd87169b8e40bcc5616c537fed85815Christian Maeder Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
4485d1c9ef1ff5a45c3ac3f76b7e952099625678Christian Maeder Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
e059476130210dbb1896e753eb0a5e8c4f219f4aChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maedergen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files) \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder OWL_DL/ReadWrite.hs ConstraintCASL/AS_ConstraintCASL.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# sources that have {-# OPTIONS -cpp #-}
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedercpp_sources = \
8d401657e07a01e10400265f508f75353a9fba4cChristian Maeder Isabelle/CreateTheories.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder SoftFOL/Logic_SoftFOL.hs GUI/Utils.hs Driver/WriteFn.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Propositional/Logic_Propositional.hs \
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maeder Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder PGIP/InfoCommands.hs PGIP/ProveCommands.hs
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian Maeder# unused, remove when header files are gone
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maedernondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(wildcard utils/DrIFT-src/*.lhs) \
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maeder $(wildcard utils/GenerateRules/*.hs) \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(wildcard utils/InlineAxioms/*.hs) \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(genrule_header_files) $(generated_rule_files) \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Modal/GeneratePatterns.inline.hs \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder SoftFOL/MathServCommunication.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(patsubst %.hs, %.der.hs, $(drifted_files))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
368c26b8ad68a4b2c42963626087667000c2eebfChristian Maeder# this variable holds the modules that should be documented
368c26b8ad68a4b2c42963626087667000c2eebfChristian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
368c26b8ad68a4b2c42963626087667000c2eebfChristian Maeder
f443a57f2a8e0ca3daa7431b0c89a18ba52c337aChristian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maedertax_objects = $(patsubst %.hs, %.o, $(tax_sources))
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettich####################################################################
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder### targets
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
12251a9d23f842673978d0ad6692527ef320c55dChristian Maeder real_clean bin_clean package_clean distclean packages \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder check capa hacapa h2h h2hf showKP clean_genRules genRules \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder count doc apache_doc post_doc4apache fromKif \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder programatica_pkg maintainer-clean annos \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder derivedSources install_hets install release cgi ghci
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
26fd6c96325cc67ca85f4a87e18c4047a2448567Dominik Luecke.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
6d549a835ffd3a11c3ed74e0f8fda30fda6a9528Christian Maeder
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder$(SETUP): utils/Setup.hs
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder $(HC) --make -O -o $@ $<
b886e9e5db2098d0112cc4f70aeba232962939ddChristian Maeder
c4451dc7da4a15726ba96179aecf046a5df5cae1Christian Maederpackages: http_pkg syb_pkg shellac_pkg shread_pkg hxt_pkg haifa_pkg \
c4451dc7da4a15726ba96179aecf046a5df5cae1Christian Maeder programatica_pkg
c4451dc7da4a15726ba96179aecf046a5df5cae1Christian Maeder
27785f379d6810811b4e6d23feab18845fde9a98Christian Maederhttp_pkg: utils/http.tgz $(SETUP)
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder @if $(HCPKG) field HTTP version; then \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder echo "of HTTP package found"; else \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(RM) -r http; \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(TAR) zxf utils/http.tgz; \
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder (cd http; $(SETUPPACKAGE)) fi
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maedersyb_pkg: $(SETUP)
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder @if $(HCPKG) field syb-generics version; then \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder echo "of syb-generics package found"; else \
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder (cd syb-generics; $(SETUPPACKAGE)) fi
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maedershellac_pkg: utils/shellac.tgz $(SETUP)
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder @if $(HCPKG) field Shellac version; then \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo "of shellac package found"; else \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder $(RM) -r shellac; \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(TAR) zxf utils/shellac.tgz; \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder (cd shellac; $(SETUPPACKAGE)) fi
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettichshread_pkg: utils/shread.tgz $(SETUP) shellac_pkg
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich @if $(HCPKG) field Shellac-readline version; then \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich echo "of shellac-readline package found"; else \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich $(RM) -rf shread; \
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich $(TAR) zxf utils/shread.tgz; \
a883cd4d01fe39d23219cf5333425f195be24d8bChristian Maeder (cd shread; $(SETUPPACKAGE)) fi
5c69cef4668bbd959d721668313a779126014d1eKlaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichhxt_pkg: $(SETUP) http_pkg
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich @if $(HCPKG) field hxt version; then \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich echo "of hxt package found"; else \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(RM) -rf hxt; \
5818d884784339c1b8aa6c6d972bad4eafd36ccbKlaus Luettich $(TAR) zxf utils/hxt.tgz; \
5818d884784339c1b8aa6c6d972bad4eafd36ccbKlaus Luettich (cd hxt; $(SETUPPACKAGE)) fi
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettichhaifa_pkg: $(SETUP) hxt_pkg syb_pkg
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @if $(HCPKG) field HAIFA version; then \
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich echo "of HAIFA package found"; else \
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich (cd haifa-lite; $(SETUPPACKAGE)) fi
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettichprogramatica_pkg:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maederhets-opt:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(MAKE) distclean
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(MAKE) derivedSources
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(MAKE) clean
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(MAKE) hets-optimized
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maederhets-optimized: $(derived_sources)
c1bf9cc3bc3729b0bf925be3be123cbb59bea2a6Christian Maeder $(HC) --make -O -o hets hets.hs $(HC_OPTS)
c1bf9cc3bc3729b0bf925be3be123cbb59bea2a6Christian Maeder strip hets
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maederhets-old: $(objects)
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder $(RM) $@
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(HC) -o hets $(HC_OPTS) $(objects)
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maedercgi:
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich $(MAKE) distclean
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(MAKE) derivedSources
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich $(MAKE) real_clean
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder $(MAKE) hets.cgi
c9e197862d9d8ef2585270dd08f5194b3aed4a9dKlaus Luettich
e7e1ab2ac3f1fded8611bb92ae00e8f3b8c693fbKlaus Luettichhets.cgi: $(sources) GUI/hets_cgi.hs
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich strip hets.cgi
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettichhets_maintainers.txt: $(sources)
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich @echo 'File : Maintainer' > $@
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich @echo -n Generating $@ " "
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder @$(PERL) -e \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder 'foreach my $$f (@ARGV) { open I, "<$$f"; \
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder print "$$f :"; while (<I>) \
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder { if(m,^\s*Maintainer\s*:\s*(.*)$$,o) { \
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder print " $$1" ; last} }; print "\n"; close I; }' \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(sources) >> $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder @echo " done"
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder###############################
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder### count lines of code
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maedercount: $(sources)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder wc -l $(sources)
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maeder###############################
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich### Documentation via haddock
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederdoc: docs/index.html
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
aebb0b18fe5e6ba7dd7e4c66a16a905611ef7ba9Christian Maeder# generate haddock documentation with links to sources
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder# the interface treatment is stolen from uni/mk/suffix.mk
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederdocs/index.html: $(doc_sources)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(RM) -r docs
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder mkdir docs
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder cp -r -L ../uni/www docs/www || mkdir docs/www
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder HINTERFACES0=`find -L docs/www -name '*.haddock' \
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder -printf "--read-interface=www/%P,%p "` ; \
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder HINTERFACES=`echo $$HINTERFACES0 | \
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder $(PERL) -pe 's+/[^/]*.haddock,+,+g'` ; \
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder -t 'Hets - the Heterogeneous Tool Set' \
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder -p Hets-Haddock-Prologue.txt $(doc_sources)
1dfba1f850f6a43094962b459998d1ea11472461Christian Maeder
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder# sources are not copied here
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederapache_doc:
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder $(RM) -r docs
fa0f3519d71f719d88577b716b1579776b4a2535Christian Maeder cvs up -d ; echo "CVS exited with: " $$?
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(MAKE) hets-opt
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder $(MAKE) doc
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maeder $(MAKE) post_doc4apache
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder $(MAKE) o_clean
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(MAKE) hets.cgi
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian Maeder
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maederpost_doc4apache:
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(RM) -r a-docs
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder cp -r docs a-docs
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
c59d1c38ef94b4fb1c8d9fda9573bc1e1d2801e7Christian Maeder 'Common.Lib.Map.html:Common.Lib._Map.html'
cd36bffee51c77cdadcb9f916b34fa512e311946Christian Maeder $(PERL) utils/post_process_docs.pl a-docs \
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder 'Data.Map.html:Data._Map.html'
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder###############################
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder### release management
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian MaederderivedSources: $(derived_sources) $(hspp_sources)
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maederutils/DrIFT: $(DRIFT_deps)
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder strip ../DrIFT)
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maederutils/genRules: $(GENERATERULES_deps)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich (cd utils/GenerateRules; \
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich GenerateRules.hs -o ../genRules && strip ../genRules)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich# "-package hssource" for ghc-5.04.2
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich -i../.. -o $(INLINEAXIOMS)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich strip $(INLINEAXIOMS)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich# set this variable from the command line to i,e. RELEASETAG='-rrelease-0-7'
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichRELEASETAG =
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichrelease:
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich $(RM) -r Hets
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/trunk Hets
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) -r uni
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich if [ -d ../uni ] ; then ln -s ../uni uni ; fi
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(RM) -r programatica
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich if [ -d ../programatica ] ; then \
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich mkdir programatica; \
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich ln -s ../../programatica/tools programatica/tools ; fi
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder cp Makefile Makefile.orig; \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers cp ReleaseMakefile Makefile; \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ./clean.sh; \
18c1d987ce5818ecf0bfc8af3f43aed2ce86e1eaChristian Maeder find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) clean.*; utils/replaceAllHeaders.sh)
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Luecke $(TAR) cvf Hets.tar Hets
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Luecke
05a206508bc898f87fe6ab6e069814df3c29d303Dominik Lueckeinstall-hets:
b891e9ad7dd358a7df24b59bf00d51515078497cChristian Maeder chmod g+w hets
b891e9ad7dd358a7df24b59bf00d51515078497cChristian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke cp -p version_nr $(INSTALLDIR)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder (cd $(INSTALLDIR); $(RM) hets; \
1c9a63e4f7c6879f51fe0f32154a9116f2c126dbChristian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederinstall: hets-opt install-hets
b891e9ad7dd358a7df24b59bf00d51515078497cChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ## TODO: add more dependencies and use hets-opt
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder compile $< -b . -k standard -o $@
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich# compile $< -b . -k web -o $@
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski###################################
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski### Common/LaTeX_maps.hs generation
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederutils/genItCorrections: $(GENITCORRECTIONS_deps)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(HC) --make -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder strip $@
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder @echo -n "Generating pretty/LaTeX_maps.hs ... "
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder gen_it_characters gen_it_words >> LaTeX_maps.hs)
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner @echo "ready"
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich @echo "please copy the file manually to Common"
f04e8f3ff56405901be968fd4c6e9769239f1a9bKlaus Luettich
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich#############################
81c15526a787941b48b02ae8786782f9fb578801Christian Maeder### ATC DrIFT-rule generation
b891e9ad7dd358a7df24b59bf00d51515078497cChristian Maeder
b891e9ad7dd358a7df24b59bf00d51515078497cChristian MaedergenRules: $(generated_rule_files)
e39a1626bee36d6ad13a2c0014a80ef179a65bcbChristian Maeder
7868299829c1318b888152243ec2cea4f598b568Christian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
e39a1626bee36d6ad13a2c0014a80ef179a65bcbChristian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian Maeder
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian MaederPropositional/ATC_Propositional.der.hs: $(Propositional_files) \
f8e1a1eca871a26a535a4ee7d51902ba94b1db1eChristian Maeder $(GENRULES)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ \
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder $(Propositional_files)
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Isabelle_files)
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich
82e29b77f0ef4cccd7ed734692c5e1e93dbbc645Christian MaederModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
13731dfbb4b6a31b35dd210e832e920065b6ac45Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
d0652648f9879c67a194f8b03baafe2700c68eb4Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
210aa1071465039588fa9e38c10e343631c34655Christian Maeder
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian MaederOWL_DL/ATC_OWL_DL.der.hs: $(OWL_DL_files) $(GENRULES)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i OWL_DL.ReadWrite \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder -o $@ $(OWL_DL_files)
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maederclean_genRules:
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
c5e3fc166373b0d90f6e36e8aa234396a1dcd879Christian Maeder $(hs_clean_files)
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich###############
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### clean up
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder
e1559d046eb2c6dde0e6e272b37b6756eac0e8adChristian Maederclean: bin_clean o_clean clean_pretty
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### removes *.hi and *.o in all include directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedero_clean:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder find . -name \*.o -o -name \*.hi | xargs $(RM) -r
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### remove binaries
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maederbin_clean:
b36f451c8ccd631dac70b541450c880b65d86f3bChristian Maeder $(RM) hets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) hets.cgi
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $(TESTTARGETS)
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder
50515239e7e190f4a34ca581dd685d002148fbddChristian Maederclean_pretty:
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder pretty/generated_words.tex
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder### additionally removes the library files
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederreal_clean: clean
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### clean user packages
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederpackage_clean:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HCPKG) unregister HAIFA --user || exit 0
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(HCPKG) unregister programatica --user || exit 0
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(HCPKG) unregister hxt --user || exit 0
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(HCPKG) unregister Shellac-readline --user || exit 0
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski $(HCPKG) unregister HTTP --user || exit 0
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(HCPKG) unregister syb-generics --user || exit 0
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maeder $(HCPKG) unregister Shellac --user || exit 0
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder### additionally removes generated files not in the CVS tree
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maederdistclean: clean clean_genRules
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder $(RM) $(derived_sources)
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maeder $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder
e50e41135ece589f7202bd4ef8d6b97531c2a56eKlaus Luettichmaintainer-clean: distclean package_clean
47b0e9f3cb008cb7997f4e3bae26e4d62dcc887aChristian Maeder $(RM) $(SETUP)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### test targets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
99afa6000472f3d291fdf9193ea19d334a58658dChristian Maeder### interactive
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maederghci: $(derived_sources)
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder $(HC)i $(HC_OPTS)
d5d349836d8b1fa93ea49a59d977b106c6e9233bKlaus Luettich
d5d349836d8b1fa93ea49a59d977b106c6e9233bKlaus Luettich### christian's target
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder### CASL parser
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederfromKif: CASL/fromKif
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder### Annos parser
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maederannos: Common/annos
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maeder### CASL parser
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maedercapa: CASL/capa
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich### HasCASL parser
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettichhacapa: HasCASL/hacapa
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich### Haskell analysis
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettichhana: Haskell/hana
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### Haskell to Isabelle-HOLCF translation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederh2hf: Haskell/h2hf
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder Common/Lib/*.hs Comorphisms/*.hs
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(HC) -O --make -o $@ $< $(HC_FLAGS) $(PFE_FLAGS)
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder
fdef3358918491badb0e29e42b5d3b5a01950716Christian Maeder### HasCASL to Haskell translation
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maederh2h: Haskell/h2h
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder### test program to check the known provers
88318aafc287e92931dceffbb943d58a9310001dChristian MaedershowKP: Comorphisms/test/showKP
fdef3358918491badb0e29e42b5d3b5a01950716Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### run tests in other directories
88318aafc287e92931dceffbb943d58a9310001dChristian Maedercheck: $(TESTTARGETS)
7767474aba4fa2dc51a6c68017d3bcef3b773001Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski## Preparing the version of Hets
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian MaederDriver/Version.hs: Driver/Version.in version_nr
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder $(RM) $@
bf76f4fcf07abaebea587df8135de8356c26a363Till Mossakowski LANG=C $(PERL) utils/build_version.pl version_nr \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder < Driver/Version.in > $@
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski chmod 444 $@
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettich## two hardcoded dependencies for a correct generation of Version.hs
473bc1f3f3443f18e0ee83e4642fab42183470f2Christian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
473bc1f3f3443f18e0ee83e4642fab42183470f2Christian Maederhets.hs: Driver/Version.hs
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettich
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederATC/DevGraph.hs: Static/DevGraph.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich## two dependencies for avoidence of circular prerequisites
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederCASL_DEPENDENT_BINARIES= hets CASL/capa CASL/fromKif \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Common/annos Common/test_parser Comorphisms/test/showKP \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# CASL_DL/Logic.hs: CASL_DL/PredefinedSign.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## rules for DrIFT
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.SUFFIXES:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
1a6464613c59e35072b90ca296ae402cbe956144Christian Maeder%: %.hs packages
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder $(HC) --make -o $@ $< $(HC_OPTS)
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder%.hs: %.y
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder $(HAPPY) -o $@.tmp $<
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder echo "{-# OPTIONS -w #-}" > $@
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder cat $@.tmp >> $@
8b767d09a78927b111f5596fdff9ca7d2c1a439fChristian Maeder $(RM) $@.tmp
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich%.hs: %.der.hs $(DRIFT)
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich $(RM) $@
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich chmod 444 $@
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich## rules for inlineAxioms
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich%.hs: %.inline.hs $(INLINEAXIOMS)
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich $(RM) $@
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich $(INLINEAXIOMS) $< > $@
5818d884784339c1b8aa6c6d972bad4eafd36ccbKlaus Luettich chmod 444 $@
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich
2e62113845a35e07cb46db05714627c95450f267Klaus Luettich## rule for cpp and haddock
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich%.hspp: %.hs
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich $(HC) -E -cpp -D__HADDOCK__ \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettich## compiling rules for object and interface files
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder%.o %.hi: %.hs
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder $(HC) -c $< $(HC_OPTS)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder%.o %.hi: %.lhs
438f9bd974c8e668203e636b0f2bc80c589af043Klaus Luettich $(HC) -c $< $(HC_OPTS)
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder
feac53e31a8351e3e3c6621f6a14b5714008bfc7Heng Jiang## compiling rules for dependencies
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder%.d : %.hs
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder%.d : %.lhs
fd2c22348e5a69231f92fb44e35a9970b47c4e93Christian Maeder $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder## generate the inline file for the predefined CASL_DL sign
89c9d707aa817684b88036a2dad66c3437840677Heng Jiang# Warning: Don't change the order of the depencies!!
f78ce817f35574674d54e30ad1861a9b4ced20caChristian MaederCASL_DL/PredefinedSign.inline.hs: \
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
f78ce817f35574674d54e30ad1861a9b4ced20caChristian Maeder CASL_DL/PredDatatypes.het
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder $(RM) $@
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder < CASL_DL/PredefinedSign.inline.hs.in > $@
bea81dabd203833818cb4a5f3758977c695728cdHeng Jiang echo " )" >> $@
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke chmod 444 $@
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke
bf7b17b0e19362e9228672782218678cab275d1eDominik LueckeCASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke CASL_DL/Datatypes.het
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke $(RM) $@
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke $(PERL) $+ > $@
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke chmod 444 $@
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
bf7b17b0e19362e9228672782218678cab275d1eDominik Luecke# uses intransparently utils/outlineAxioms
bf7b17b0e19362e9228672782218678cab275d1eDominik LueckeModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
utils/genTransMFormFunc.pl $(INLINEAXIOMS)
$(RM) $@
$(PERL) utils/genTransMFormFunc.pl $< $@
chmod 444 $@
initialize_installer:
@if [ -d $(INSTALLER_DIR) ] ; then \
echo "copy file to $(INSTALLER_DIR)" ; \
else \
echo "create $(INSTALLER_DIR)" ;\
mkdir -p $(INSTALLER_DIR) ; \
fi
@sed "s/^\(HETS_VERSION=\).*/\1`cat version_nr`/" Makefile.installer > Makefile.inst ;\
sed "s/^\(SPASS_DIR_MAC=\).*/\1`ls utils/SPASS-ppc-mac/ | grep SPASS`/" Makefile.inst > Makefile.inst2 ;\
rm Makefile.inst ;\
mv Makefile.inst2 $(INSTALLER_DIR)/Makefile
@echo =========================================================================
@echo If you have not logged in \'cvs.haskell.org\' and \'cvs-agbkb.informatik.uni-bremen.de\'
@echo "then please first login:"
@echo " cvs -d :pserver:anoncvs@cvs.haskell.org:/cvs login"
@echo " the password is cvs"
@echo " cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository login "
@echo " the password is "
@echo =========================================================================
@echo Ready to create installers for Hets
@echo Please do
@echo " -> cd $(INSTALLER_DIR)"
@echo " -> make"
@echo and wait until it is finished