Makefile revision 317bcd45211dd8f28a8ebb3dee7a67197391fc0d
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder# Makefile
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian 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
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederinclude var.mk
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder## Some varibles, which control the compilation
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus Luettich
a53841f6d6e86ac751c12a33dc8aadf53f59d977Klaus LuettichHAIFA_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 \
a737caf82de97c1907027c03e4b4509eb492b4b8Christian Maeder Text/XML/Serializer
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian MaederSOURCE_PATHS = . utils/itcor \
01e383014b555bbcf639c0ca60c5810b3eff83c0Christian Maeder utils utils/DrIFT-src utils/GenerateRules utils/InlineAxioms Common \
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski Common/Lib Common/ATerm Logic CASL CASL/CCC CASL/CompositionTable \
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maeder Syntax Static GUI HasCASL Haskell Modal CoCASL COL ConstraintCASL \
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder CspCASL ATC Proofs Comorphisms Isabelle Driver Modifications \
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowski Taxonomy CASL_DL SoftFOL OWL OMDoc PGIP Propositional RelationalScheme \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder VSE
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# the 'replacing spaces' example was taken from the (GNU) Make info manual
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederempty =
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederspace = $(empty) $(empty)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
2e2094a642e3775b0d76b890556407941d3a53b6Christian MaederDRIFT_ENV = DERIVEPATH=$(subst $(space),:,$(PFE_PATHS))
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder# override on commandline for other architectures
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian MaederINSTALLDIR = \
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederDRIFT_deps = utils/DrIFT-src/*hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
8410667510a76409aca9bb24ff0eda0420088274Christian MaederGENITCORRECTIONS_deps = utils/itcor/GenItCorrections.hs
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichINLINEAXIOMS_deps = utils/InlineAxioms/InlineAxioms.hs \
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder Common/Doc.hs CASL/ToDoc.hs Modal/AS_Modal.hs \
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder Modal/Parse_AS.hs Modal/ModalSign.hs Modal/Print_AS.hs Modal/StatAna.hs
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder
4cb215739e9ab13447fa21162482ebe485b47455Christian MaederPERL = perl
8ef75f1cc0437656bf622cec5ac9e8ea221da8f2Christian MaederHAPPY = happy -sga
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus LuettichGENRULES = utils/genRules
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederGENRULECALL = $(GENRULES) -r Typeable -r ShATermConvertible \
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maeder -i Data.Typeable -i Common.ATerm.Lib
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederDRIFT = utils/DrIFT
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian MaederINLINEAXIOMS = utils/outlineAxioms
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederHADDOCK = haddock
8d97ef4f234681b11bb5924bd4d03adef858d2d2Christian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian MaederOSBYUNAME = $(shell uname)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederifneq ($(findstring SunOS, $(OSBYUNAME)),)
e593b89bfd4952698dc37feced21cefe869d87a2Christian MaederTAR = gtar
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederPATCH = gpatch
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederelse
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian MaederTAR = tar
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederPATCH = patch
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederendif
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian MaederARCH = $(subst $(space),,$(shell uname -m))
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederSETUP = utils/Setup
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederSETUPPREFIX = --prefix=$(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
c3053d57f642ca507cdf79512e604437c4546cb9Christian Maeder
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian MaederSETUPPACKAGE = ../$(SETUP) clean; \
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder ../$(SETUP) configure $(SETUPPREFIX) --user; \
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder ../$(SETUP) build; ../$(SETUP) haddock; ../$(SETUP) install --user
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder# list glade files
c2fcc35abb03cf0b4ca4b050efeb10827f38c322Christian MaederGTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
1aee4aaddde105264c1faf394d88e302c05094ffChristian MaederGTK_GLADE_HSFILES = $(subst .glade,.hs,$(GTK_GLADE_FILES))
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maeder
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maederderived_sources += $(GTK_GLADE_HSFILES)
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maeder
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maederlogics = CASL HasCASL Isabelle Modal CoCASL COL CspCASL CASL_DL SoftFOL \
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maeder ConstraintCASL Propositional OWL RelationalScheme VSE OMDoc
0206ab93ef846e4e0885996d052b9b73b9dc66b0Christian Maeder
f13d1e86e58da53680e78043e8df182eed867efbChristian MaederTESTTARGETFILES += CASL/fromKif.hs CASL/capa.hs HasCASL/hacapa.hs \
c2a4d8ae266aa37cc922eba97077520229a19902Christian Maeder Haskell/wrap.hs Isabelle/isa.hs Syntax/hetpa.hs \
757e6c79ec40491d45dc72c82b5eb59a386634b0Jian Chun Wang ATC/ATCTest.hs ATC/ATCTest2.hs Common/ATerm/ATermLibTest.hs \
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder Common/ATerm/ATermDiffMain.hs Common/annos.hs Common/test_parser.hs \
757e6c79ec40491d45dc72c82b5eb59a386634b0Jian Chun Wang SoftFOL/tests/PrintTPTPTests.hs Comorphisms/test/showKP.hs \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder SoftFOL/tests/soapTest.hs Comorphisms/test/sublogicGraph.hs \
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maeder SoftFOL/dfg.hs
31c49f2fa23d4ac089f35145d80a224deb6ea7e4Till Mossakowski
c55a0f77be7e88d3620b419ec8961f4379a586e3Klaus Luettich### list of directories to run checks in
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus LuettichTESTDIRS += Common CASL HasCASL test
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich
363939beade943a02b31004cea09dec34fa8a6d9Christian Maederhs_clean_files = Haskell/TiATC.hs Haskell/TiDecorateATC.hs \
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke Haskell/TiPropATC.hs Haskell/ATC_Haskell.der.hs
8cacad2a09782249243b80985f28e9387019fe40Christian Maeder
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederPFE_TOOLDIR = $(wildcard ../programatica/tools)
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian Maederifneq ($(strip $(PFE_TOOLDIR)),)
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederPFE_DIRS = base/AST base/TI base/parse2 base/parse2/Lexer base/parse2/Parser \
8a28707e9155465c6f2236a06eac6580a65c7025Christian Maeder base/parse2/LexerGen base/parse2/LexerSpec base/tests/HbcLibraries \
df35538fec1d9135602308d577255c0d466b6365Christian Maeder base/pretty base/syntax base/lib base/lib/Monads base/Modules base/defs \
df35538fec1d9135602308d577255c0d466b6365Christian Maeder base/transforms base/transforms/Deriving property \
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder property/syntax property/AST property/transforms \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder property/TI property/defs property/parse2 property/parse2/Parser
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maeder
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederPFE_PATHS = $(addprefix $(PFE_TOOLDIR)/, $(PFE_DIRS))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederpfe_sources = $(wildcard $(addsuffix /*hs, $(PFE_PATHS)))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederPFE_PATH = $(addprefix -i, $(PFE_PATHS))
9e748851c150e1022fb952bab3315e869aaf0214Christian Maederhappy_files += $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederLEX_DIR = $(PFE_TOOLDIR)/base/parse2/Lexer
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maederprogramatica_pkg: $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(LEX_DIR)/HsLex.hs $(SETUP)
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder @if $(HCPKG) field programatica version; then \
a7c27282e71cf4505026645f96d4f5cb8a284e32Christian Maeder echo "of programatica package found"; else \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder ($(PATCH) -usNlp0 -d $(PFE_TOOLDIR) \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder -i `pwd`/Haskell/Programatica.patch || exit 0); \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder cp -f utils/programatica.cabal ../programatica/tools; \
776a1a086df734581431e6edb4343ed4c8d34d55Christian Maeder cp -f $(SETUP) ../programatica/tools; \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder (cd ../programatica/tools; \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder ./Setup configure $(SETUPPREFIX); \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder ./Setup build; ./Setup install --user) fi
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$(LEX_DIR)/HsLex.hs: $(LEX_DIR)Gen/HsLexerGen
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder echo "{-# OPTIONS -w #-}" > $@
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder $< >> $@
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$(LEX_DIR)Gen/HsLexerGen: $(LEX_DIR)Gen/*.hs $(LEX_DIR)Spec/*.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(LEX_DIR)/HsTokens.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(HC) --make -fno-monomorphism-restriction -O \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder -i$(PFE_TOOLDIR)/base/tests/HbcLibraries \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder -i$(PFE_TOOLDIR)/base/lib \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder -i$(LEX_DIR) -i$(LEX_DIR)Gen -i$(LEX_DIR)Spec \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $@.hs -o $@
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder strip $@
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederlogics += Haskell
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederderived_sources += Haskell/PreludeString.hs $(LEX_DIR)/HsLex.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(LEX_DIR)Gen/HsLexerGen
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian MaederAPPENDPRELUDESTRING = utils/appendHaskellPreludeString \
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian Maeder Haskell/ProgramaticaPrelude.hs
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder## rule for appendHaskellPreludeString
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian MaederHaskell/PreludeString.hs: Haskell/PreludeString.append.hs \
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maeder $(APPENDPRELUDESTRING)
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder $(RM) $@
bc8cbf12aa172bf5673b92a9e7a0151d4aa4c315Christian Maeder $(APPENDPRELUDESTRING) < $< > $@
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder chmod 444 $@
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder
2d130d212db7208777ca896a7ecad619a8944971Christian MaederAst_Haskell_files = HsDeclStruct HsExpStruct HsFieldsStruct \
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder HsGuardsStruct HsKindStruct HsPatStruct HsTypeStruct HsAssocStruct \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder HsModule HsName HsLiteral HsIdent
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder#files in base/TI/
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
a9b59eb2ce961014974276cdae0e9df4419bd212Christian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederOther_PFE_files = property/AST/HsPropStruct base/defs/PNT \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/defs/UniqueNames base/Modules/TypedIds base/Modules/Ents \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder base/parse2/SourceNames base/syntax/SyntaxRec \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder property/syntax/PropSyntaxStruct
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederHaskell_files = $(addsuffix .hs, \
a3c6d8e0670bf2aa71bc8e2a3b1f45d56dd65e4cChristian Maeder $(addprefix $(PFE_TOOLDIR)/base/AST/, $(Ast_Haskell_files)) \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(addprefix $(PFE_TOOLDIR)/, $(Other_PFE_files)))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## rule for ATC generation
363939beade943a02b31004cea09dec34fa8a6d9Christian MaederHaskell/ATC_Haskell.der.hs: $(Haskell_files) $(GENRULES)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(GENRULECALL) -i Haskell.BaseATC -o $@ $(Haskell_files)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederhs_der_files += $(hs_clean_files)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederTESTDIRS += ToHaskell
ca074a78b8dcccbb8c419586787882f98d0c6163Christian MaederTESTTARGETFILES += Haskell/hana.hs Haskell/h2h.hs Haskell/h2hf.hs
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maederelse
4017ebc0f692820736d796af3110c3b3018c108aChristian MaederPFE_FLAGS =
b568982efd0997d877286faa592d81b03c8c67b8Christian Maederendif
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
0be0db405c49906bd7057255069bf6df53395ac9Klaus LuettichTESTTARGETS = Test.o $(subst .hs,,$(TESTTARGETFILES))
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder# remove -fno-warn-orphans for older ghcs and add -ifgl
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_WARN = -Wall -fno-warn-orphans
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# INCLUDE_PATH =
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederHC_INCLUDE = $(addprefix -i, $(INCLUDE_PATH))
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder# uncomment for profiling
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian MaederHC_OPTS += $(HC_WARN) $(HC_INCLUDE) $(HC_PROF)
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder# -ddump-minimal-imports
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder# uncomment to above line to generate .imports files for displayDependencyGraph
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder####################################################################
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder## sources for hets
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maedernon_sources = Common/LaTeX_maps.svmono.hs Common/CaslLanguage.hs ./Test.hs \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(SETUP).hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedersources = hets.hs $(filter-out $(non_sources), \
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder $(wildcard $(addsuffix /[A-Z]*hs, $(SOURCE_PATHS))))
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederobjects = $(sources:%.hs=%.o)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maederdrifted_files = Common/AS_Annotation.hs \
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder CASL/AS_Basic_CASL.hs Modal/AS_Modal.hs \
d946c1bfdd7d58aa7c023efe864d5999eb44a61bChristian Maeder Syntax/AS_Structured.hs Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
89f7631cbfbd1bb99fc152b434bd362a7799d295Christian Maeder Propositional/AS_BASIC_Propositional.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder CASL_DL/AS_CASL_DL.hs OWL/ReadWrite.hs \
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder CspCASL/AS_CspCASL_Process.hs CspCASL/AS_CspCASL.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder RelationalScheme/AS.hs \
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(gendrifted_files)
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederatc_files = Common/AS_Annotation.der.hs Common/DefaultMorphism.hs \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder Logic/Prover.hs Common/LibName.hs Common/ExtSign.hs \
6b6773cf587b74259178641d811746a235faf056Christian Maeder Common/ProofTree.hs Static/DevGraph.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maederatc_der_files = $(foreach file, $(atc_files), \
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich ATC/$(basename $(basename $(notdir $(file)))).der.hs)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederATC/Id.der.hs: Common/Id.hs $(GENRULES)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(GENRULECALL) -o $@ $<
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
42b12fba6830ada5057949f825fc27edf5574e5fChristian MaederATC/Result.der.hs: Common/Result.hs $(GENRULES)
42b12fba6830ada5057949f825fc27edf5574e5fChristian Maeder $(GENRULECALL) -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian MaederATC/ProofTree.der.hs: Common/ProofTree.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/AS_Annotation.der.hs: Common/AS_Annotation.der.hs $(GENRULES)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(GENRULECALL) -o $@ $<
9df11f85fd7f8c4745d64464876e84ec4e263692Christian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersATC/LibName.der.hs: Common/LibName.hs $(GENRULES)
6770ec11184086a81daddba75e0cd1f45a2eff96Christian Maeder $(GENRULECALL) -o $@ $<
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till MossakowskiATC/ExtSign.der.hs: Common/ExtSign.hs $(GENRULES)
cf04ba46b9eb495d334466e24e082e391055ca7bDominik Luecke $(GENRULECALL) -o $@ $<
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersATC/DefaultMorphism.der.hs: Common/DefaultMorphism.hs $(GENRULES)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder $(GENRULECALL) -o $@ $<
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederATC/AS_Structured.der.hs: Syntax/AS_Structured.der.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -i ATC.Grothendieck -o $@ $<
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
9e748851c150e1022fb952bab3315e869aaf0214Christian MaederATC/AS_Architecture.der.hs: Syntax/AS_Architecture.der.hs $(GENRULES)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder $(GENRULECALL) -i ATC.AS_Structured -o $@ $<
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederATC/AS_Library.der.hs: Syntax/AS_Library.der.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(GENRULECALL) -i ATC.AS_Architecture -i ATC.LibName -o $@ $<
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian MaederATC/GlobalAnnotations.der.hs: Common/GlobalAnnotations.hs $(GENRULES)
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $<
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederATC/Prover.der.hs: Logic/Prover.hs $(GENRULES)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(GENRULECALL) -x Logic.Prover.ProverTemplate \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder -i ATC.AS_Annotation -o $@ $<
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder
819e29dba060687cf391e444e0f6ff88c1908cc3Christian MaederATC/DevGraph.der.hs: Static/DevGraph.hs $(GENRULES)
819e29dba060687cf391e444e0f6ff88c1908cc3Christian Maeder $(GENRULECALL) -i ATC.LibName -i ATC.Grothendieck -o $@ $<
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCASL_files = CASL/Sublogic.hs CASL/Morphism.hs CASL/Sign.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder CASL/AS_Basic_CASL.der.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederHasCASL_files = Common/Prec.hs HasCASL/As.hs HasCASL/Le.hs HasCASL/Sublogic.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederIsabelle_files = Isabelle/IsaSign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederPropositional_files = Propositional/Sign.hs Propositional/Morphism.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Propositional/AS_BASIC_Propositional.hs Propositional/Symbol.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Propositional/Sublogic.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederRS_files = RelationalScheme/AS.hs RelationalScheme/Sign.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
ac34194a668399bb8ef238da77c3a09e93fb253bChristian MaederModal_files = Modal/AS_Modal.hs Modal/ModalSign.hs
ac34194a668399bb8ef238da77c3a09e93fb253bChristian MaederConstraintCASL_files = ConstraintCASL/AS_ConstraintCASL.hs
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederCoCASL_files = CoCASL/AS_CoCASL.hs CoCASL/CoCASLSign.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCOL_files = COL/AS_COL.hs COL/COLSign.hs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederCspCASL_files = CspCASL/AS_CspCASL.hs CspCASL/AS_CspCASL_Process.hs \
4561227a776bdf0ab679b19fb92f1eaaed8786f7Christian Maeder CspCASL/SignCSP.hs
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian MaederCASL_DL_files = CASL_DL/AS_CASL_DL.hs CASL_DL/Sign.hs CASL_DL/Sublogics.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian MaederSoftFOL_files = SoftFOL/Sign.hs
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik LueckeOWL_files = OWL/Sign.hs
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik LueckeVSE_files = VSE/As.hs
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederOMDoc_files = OMDoc/OMDocInterface.hs
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maederatc_logic_files = $(foreach logic, $(logics), $(logic)/ATC_$(logic).der.hs)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maedergenerated_rule_files = $(atc_der_files) $(atc_logic_files)
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maedergendrifted_files = $(patsubst %.der.hs, %.hs, $(generated_rule_files))
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettichinline_axiom_files = Comorphisms/CASL2PCFOL.hs \
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner Comorphisms/Modal2CASL.hs Comorphisms/CASL2TopSort.hs \
e96a0bf4040fd789339958c01f145c5057d26db6René Wagner Comorphisms/CASL2SubCFOL.hs CASL_DL/PredefinedSign.hs
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettichgen_inline_axiom_files = $(patsubst %.hs,%.inline.hs, $(inline_axiom_files))
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederderived_sources += $(drifted_files) Driver/Version.hs $(happy_files) \
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(inline_axiom_files) Modal/ModalSystems.hs $(hs_der_files)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder# sources that have {-# OPTIONS -cpp #-}
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedercpp_sources = \
b9b960bc75e34658e70c4a0231dbc6a6e7373f2dChristian Maeder CASL/Logic_CASL.hs Isabelle/CreateTheories.hs \
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maeder SoftFOL/Logic_SoftFOL.hs GUI/Utils.hs Driver/WriteFn.hs \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich Propositional/Logic_Propositional.hs GUI/GraphMenu.hs \
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder Comorphisms/LogicList.hs Comorphisms/LogicGraph.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Comorphisms/KnownProvers.hs hets.hs $(happy_files) \
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski PGIP/InfoCommands.hs OWL/Logic_OWL.hs GUI/ShowGraph.hs \
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder VSE/Logic_VSE.hs
383aa66e5142365fe9b1f88b18c1da5b27cc8c04Christian Maeder
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski# unused, remove when header files are gone
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maedergenrule_header_files = $(wildcard ATC/*.header.hs)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maedernondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
356fa49fe3e6a8398f92d13e9f920d0f093697ecChristian Maeder $(wildcard utils/DrIFT-src/*.lhs) \
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder $(wildcard utils/GenerateRules/*.hs) \
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder $(wildcard utils/InlineAxioms/*.hs) \
bd54a9917cd87169b8e40bcc5616c537fed85815Christian Maeder $(wildcard utils/itcor/*.hs) \
7dfbfdd1c4175dc0f640b1731a70854526c0e5c6Christian Maeder $(cpp_sources) $(pfe_sources) $(gen_inline_axiom_files) \
11b55e6fbbc397b9fa41a7d61be53c6f4f027824Christian Maeder $(genrule_header_files) $(generated_rule_files) \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(PFE_TOOLDIR)/property/parse2/Parser/PropParser.hspp \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder Modal/GeneratePatterns.inline.hs \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder Haskell/PreludeString.append.hs Haskell/ProgramaticaPrelude.hs \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder SoftFOL/MathServCommunication.hs \
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder $(patsubst %.hs, %.der.hs, $(drifted_files))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederhspp_sources = $(patsubst %.hs, %.hspp, $(cpp_sources))
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder# this variable holds the modules that should be documented
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederdoc_sources = $(filter-out $(nondoc_sources), $(sources) $(hspp_sources))
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maedertax_sources = Taxonomy/AbstractGraphView.hs Taxonomy/MMiSSOntology.hs \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Taxonomy/MMiSSOntologyGraph.hs Taxonomy/OntoParser.hs
ffd3a0c7339cc3637f022c38e66a7aa9f0cf10d3Rainer Grabbe
e8db9a65830cf71504e33c6f441a67b4d184a3caChristian Maedertax_objects = $(patsubst %.hs, %.o, $(tax_sources))
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder####################################################################
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder### targets
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
6bf24e5eb644064ad650eb3fd9774483fccbf601Christian Maeder.PHONY : all hets-opt hets-optimized clean o_clean clean_pretty \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder real_clean bin_clean package_clean distclean packages \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke base64_pkg http_pkg syb_pkg shellac_pkg shread_pkg shcompat_pkg \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder tagsoup_pkg hxt_pkg hxtfilter_pkg haifa_pkg programatica_pkg \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke maintainer-clean annos \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder check capa hacapa h2h h2hf showKP clean_genRules genRules \
53818ced114da21321063fff307aa41c1ab31dd3Achim Mahnke count doc apache_doc post_doc4apache fromKif \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder derivedSources install_hets install release cgi ghci
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder$(SETUP): utils/Setup.hs
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder $(HC) --make -O -o $@ $<
f443a57f2a8e0ca3daa7431b0c89a18ba52c337aChristian Maeder
363939beade943a02b31004cea09dec34fa8a6d9Christian Maederpackages: syb_pkg haifa_pkg programatica_pkg
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder
a5e5b8c3e5c11177e5034ef2423813a5d28979edChristian Maedersyb_pkg: $(SETUP)
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder @if $(HCPKG) field syb-generics version; then \
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski echo "of syb-generics package found"; else \
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettich (cd syb-generics; $(SETUPPACKAGE)) fi
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederifneq ($(strip $(HXTFILTER_PACKAGE)),)
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederhaifa_pkg: $(SETUP) syb_pkg
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder @if $(HCPKG) field HAIFA version; then \
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder echo "of HAIFA package found"; else \
f041c9a6bda23de33a38490e35b831ae18d96b45Christian Maeder (cd haifa-lite; $(SETUPPACKAGE)) fi
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederelse
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederhaifa_pkg:
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederendif
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederprogramatica_pkg:
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederhets-opt:
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maeder $(MAKE) distclean
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(MAKE) derivedSources
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(MAKE) clean
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(MAKE) hets-optimized
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
dcbd32289a7bdf1e6edd06c6ab0698c6a9dbf37aChristian Maederhets-optimized: $(derived_sources)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HC) --make -O -o hets hets.hs $(HC_OPTS)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder strip hets
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maederhets-old: $(objects)
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder $(RM) $@
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(HC) -o hets $(HC_OPTS) $(objects)
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maedercgi:
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(MAKE) distclean
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder $(MAKE) derivedSources
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder $(MAKE) real_clean
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder $(MAKE) hets.cgi
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maederhets.cgi: $(sources) GUI/hets_cgi.hs
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder ghc --make GUI/hets_cgi.hs -o $@ $(HC_OPTS) -O
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder strip hets.cgi
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maeder
215d42ce4d6397a453d5887292bc786e8fa9c1a2Christian Maederhets_maintainers.txt: $(sources)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder @echo 'File : Maintainer' > $@
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder @echo -n Generating $@ " "
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder @egrep -m 1 "Maintainer" $(sources) | \
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder sed -e 's/: *Maintainer *: */ : /' >> $@
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder @echo " done"
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder###############################
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder### count lines of code
2d130d212db7208777ca896a7ecad619a8944971Christian Maedercount: $(sources)
2d130d212db7208777ca896a7ecad619a8944971Christian Maeder wc -l $(sources)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder###############################
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder### Documentation via haddock
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maederdoc: docs/index.html
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder# generate haddock documentation with links to sources
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder# the interface treatment is stolen from uni/mk/suffix.mk
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederdocs/index.html: $(doc_sources)
0c355dd0b739631ee472f9a656e266be27fa4e64Christian Maeder $(RM) -r docs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder mkdir docs
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder cp -r -L ../uni/www docs/www || mkdir docs/www
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder HINTERFACES0=`find -L docs/www -name '*.haddock' \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder -printf "--read-interface=www/%P,%p "` ; \
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder HINTERFACES=`echo $$HINTERFACES0 | \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(PERL) -pe 's+/[^/]*.haddock,+,+g'` ; \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(HADDOCK) -o docs -h -v -s ../%F $$HINTERFACES \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich -t 'Hets - the Heterogeneous Tool Set' \
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich -p Hets-Haddock-Prologue.txt $(doc_sources)
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich# sources are not copied here
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettichapache_doc:
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich $(RM) -r docs
a883cd4d01fe39d23219cf5333425f195be24d8bChristian Maeder cvs up -d ; echo "CVS exited with: " $$?
5c69cef4668bbd959d721668313a779126014d1eKlaus Luettich $(MAKE) hets-opt
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich $(MAKE) doc
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(MAKE) post_doc4apache
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(MAKE) o_clean
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(MAKE) hets.cgi
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettichpost_doc4apache:
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(RM) -r a-docs
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich cp -r docs a-docs
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(PERL) utils/post_process_docs.pl a-docs \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich 'Common.Lib.Map.html:Common.Lib._Map.html'
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich $(PERL) utils/post_process_docs.pl a-docs \
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich 'Data.Map.html:Data._Map.html'
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich###############################
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich### release management
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich
b905126bab9454b89041f92b3c50bb9efc85e427Klaus LuettichderivedSources: $(derived_sources) $(hspp_sources)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder$(DRIFT): $(DRIFT_deps)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder strip ../DrIFT)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder$(GENRULES): $(DRIFT) $(GENERATERULES_deps)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder (cd utils/GenerateRules; \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder $(HC) --make -i../DrIFT-src -i../.. $(HC_WARN) \
68aab98a58d1460c77a1573a86c32a891756a420Christian Maeder GenerateRules.hs -o ../genRules && strip ../genRules)
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder# "-package hssource" for ghc-5.04.2
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder $(HC) --make utils/InlineAxioms/InlineAxioms.hs $(HC_WARN) $(HC_PROF) \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder -i../.. -o $(INLINEAXIOMS)
3a7788e09dd23b364a46c9488cbd1522369113dbChristian Maeder strip $(INLINEAXIOMS)
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder
ef67402074be14deb95e4ff564737d5593144130Klaus Luettichutils/appendHaskellPreludeString: utils/appendHaskellPreludeString.hs
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder $(HC) --make -o $@ $<
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich
462d9dc583444aab82732e14a75610684d2dc7e9Christian MaederREV = trunk
c9e197862d9d8ef2585270dd08f5194b3aed4a9dKlaus Luettichrelease:
e7e1ab2ac3f1fded8611bb92ae00e8f3b8c693fbKlaus Luettich $(RM) -r Hets
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich svn co https://svn-agbkb.informatik.uni-bremen.de/Hets/$(REV) Hets
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich $(RM) -r uni
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich if [ -d ../uni ] ; then ln -s ../uni uni ; fi
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich $(RM) -r programatica
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich if [ -d ../programatica ] ; then \
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich mkdir programatica; \
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder ln -s ../../programatica/tools programatica/tools ; fi
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder (cd Hets; $(MAKE) derivedSources; $(MAKE) clean; \
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder cp Makefile Makefile.orig; \
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder cp ReleaseMakefile Makefile; \
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder ./clean.sh; \
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder find . -name .svn -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) clean.*; utils/replaceAllHeaders.sh)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder $(TAR) cvf Hets.tar Hets
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maederinstall-hets:
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder chmod g+w hets
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich cp -p version_nr $(INSTALLDIR)
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich (cd $(INSTALLDIR); $(RM) hets; \
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettichinstall: hets-opt install-hets
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maederpack/install-%.jar: pack/install-%.xml pack/UserInputSpec-%.xml hets.in hets
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ## TODO: add more dependencies and use hets-opt
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder compile $< -b . -k standard -o $@
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder# compile $< -b . -k web -o $@
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder
43bb71dfe7ec405f563864d57c1cacdaa8ce9a80Christian Maeder###################################
f2d9352f2999f82c36b4b65535d14a6a40ae5a82Christian Maeder### Common/LaTeX_maps.hs generation
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowskiutils/genItCorrections: $(GENITCORRECTIONS_deps)
aa6c527682224a4e1434f80eae8bc2ef67fb6ca6Christian Maeder $(HC) --make -o $@ $<
aa6c527682224a4e1434f80eae8bc2ef67fb6ca6Christian Maeder strip $@
37951dbd8e5f2418a07f072d9bf551d0c3a1eafcChristian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maederpretty/LaTeX_maps.hs: utils/words.pl utils/genItCorrections \
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder pretty/words.input pretty/fonts.input pretty/width-table.tex.templ
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder @echo -n "Generating pretty/LaTeX_maps.hs ... "
aa6c527682224a4e1434f80eae8bc2ef67fb6ca6Christian Maeder @(cd pretty >/dev/null; $(PERL) ../utils/words.pl > words.pl.log)
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder @(cd pretty >/dev/null; ../utils/genItCorrections \
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder gen_it_characters gen_it_words >> LaTeX_maps.hs)
9c3edf2b283c09d33b2820696886d1ed32fcadc8Christian Maeder @echo "ready"
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder @echo "please copy the file manually to Common"
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder
68b77966b2cf7bf2e340bf0fb6b9efc3e6a00467Christian Maeder#############################
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder### ATC DrIFT-rule generation
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder
5bb7eeaca10ea76595229375f907a5a388b7c882Christian MaedergenRules: $(generated_rule_files)
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian MaederCASL/ATC_CASL.der.hs: $(CASL_files) $(GENRULES)
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(CASL_files)
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian MaederRelationalScheme/ATC_RelationalScheme.der.hs: $(RS_files) $(GENRULES)
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(RS_files)
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian Maeder
ddc9315cc0b1f5dd3d8f99a77f1c75064db33b48Christian MaederPropositional/ATC_Propositional.der.hs: $(Propositional_files) $(GENRULES)
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(Propositional_files)
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian MaederHasCASL/ATC_HasCASL.der.hs: $(HasCASL_files) $(GENRULES)
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder $(GENRULECALL) -i ATC.GlobalAnnotations -o $@ $(HasCASL_files)
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder
8410667510a76409aca9bb24ff0eda0420088274Christian MaederIsabelle/ATC_Isabelle.der.hs: $(Isabelle_files) $(GENRULES)
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder $(GENRULECALL) -o $@ $(Isabelle_files)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus LuettichModal/ATC_Modal.der.hs: $(Modal_files) $(GENRULES)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(Modal_files)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichConstraintCASL/ATC_ConstraintCASL.der.hs: $(ConstraintCASL_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(ConstraintCASL_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichCASL_DL/ATC_CASL_DL.der.hs: $(CASL_DL_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CASL_DL_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichCoCASL/ATC_CoCASL.der.hs: $(CoCASL_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CoCASL_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichCOL/ATC_COL.der.hs: $(COL_files) $(GENRULES)
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(COL_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichCspCASL/ATC_CspCASL.der.hs: $(CspCASL_files) $(GENRULES)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich $(GENRULECALL) -i CASL.ATC_CASL -o $@ $(CspCASL_files)
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichSoftFOL/ATC_SoftFOL.der.hs: $(SoftFOL_files) $(GENRULES)
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich $(GENRULECALL) -i ATC.AS_Annotation -o $@ $(SoftFOL_files)
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix ReckersOWL/ATC_OWL.der.hs: $(OWL_files) $(GENRULES)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(GENRULECALL) -i OWL.ReadWrite -o $@ $(OWL_files)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian MaederVSE/ATC_VSE.der.hs: $(VSE_files) $(GENRULES)
18c1d987ce5818ecf0bfc8af3f43aed2ce86e1eaChristian Maeder $(GENRULECALL) -x VSE.As.FoldRec -i CASL.ATC_CASL -o $@ $(VSE_files)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik LueckeOMDoc/ATC_OMDoc.der.hs: $(OMDoc_files) $(GENRULES)
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder $(GENRULECALL) -i OMDoc.ATerm -o $@ $(OMDoc_files)
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Lueckeclean_genRules:
5ad5dffe06818a13e1632b1119fbca7881085fc1Dominik Luecke $(RM) $(generated_rule_files) $(gendrifted_files) $(hspp_sources) \
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(hs_clean_files)
1c9a63e4f7c6879f51fe0f32154a9116f2c126dbChristian Maeder
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder###############
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### clean up
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maederclean: bin_clean o_clean clean_pretty
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### removes all *.o, *.hi and *.p_o files in all subdirectories
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luetticho_clean:
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski find . -name \*.o -o -name \*.hi -o -name \*.p_o | xargs $(RM)
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski
3b06e23643a9f65390cb8c1caabe83fa7e87a708Till Mossakowski### remove binaries
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederbin_clean:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) hets
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(RM) hets.cgi
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) $(SETUP)
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) $(TESTTARGETS)
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maederclean_pretty:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder $(RM) pretty/*.c.* pretty/*.h.* pretty/gen_it_* \
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers pretty/generated_words.tex
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### additionally removes the library files
e96a0bf4040fd789339958c01f145c5057d26db6René Wagnerreal_clean: clean
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder### clean user packages
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettichpackage_clean:
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich $(HCPKG) unregister HAIFA --user || exit 0
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich $(HCPKG) unregister programatica --user || exit 0
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich $(HCPKG) unregister syb-generics --user || exit 0
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### additionally removes generated files not in the CVS tree
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederdistclean: clean clean_genRules
6dc9bc98d0854fe2e3dd3bfc4275096a0c28ee1cChristian Maeder $(RM) $(derived_sources)
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers $(RM) Modal/GeneratePatterns.inline.hs utils/appendHaskellPreludeString
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) utils/DrIFT utils/genRules $(INLINEAXIOMS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) utils/genItCorrections pretty/LaTeX_maps.hs pretty/words.pl.log
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichmaintainer-clean: distclean package_clean
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich $(RM) -r $(HOME)/.ghc/$(ARCH)-$(OSBYUNAME)-hets-packages
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich####################################################################
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder### test targets
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder### interactive
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederghci: $(derived_sources)
d0652648f9879c67a194f8b03baafe2700c68eb4Christian Maeder $(HC)i $(HC_OPTS)
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### christian's target
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder### CASL parser
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus LuettichfromKif: CASL/fromKif
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettich### Annos parser
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maederannos: Common/annos
36f63902db2b3463faa9f59912ad106e2d5aaa24Klaus Luettich
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### CASL parser
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maedercapa: CASL/capa
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
27785f379d6810811b4e6d23feab18845fde9a98Christian Maeder### HasCASL parser
2d130d212db7208777ca896a7ecad619a8944971Christian Maederhacapa: HasCASL/hacapa
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### Haskell analysis
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maederhana: Haskell/hana
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder### Haskell to Isabelle-HOLCF translation
27785f379d6810811b4e6d23feab18845fde9a98Christian Maederh2hf: Haskell/h2hf
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder
83394c6b6e6de128e71b67c9251ed7a84485d082Christian MaederHaskell/h2hf: Haskell/h2hf.hs Haskell/*.hs Isabelle/*.hs Common/*.hs \
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder Common/Lib/*.hs Comorphisms/*.hs
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder $(HC) -O --make -o $@ $< $(HC_OPTS)
c5e3fc166373b0d90f6e36e8aa234396a1dcd879Christian Maeder
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder### HasCASL to Haskell translation
3e61f574717499939bd8e0ff538ea9e7b72d4e2dKlaus Luettichh2h: Haskell/h2h
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder### test program to check the known provers
8451c0f87cd1c53edee413e5154dbe7e44448664Christian MaedershowKP: Comorphisms/test/showKP
68d10d143f29fcff3c637ba24f90e983995ceae6Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder### run tests in other directories
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedercheck: $(TESTTARGETS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder####################################################################
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maeder## Preparing the version of Hets
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian MaederDriver/Version.hs: Driver/Version.in version_nr
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder LANG=C $(PERL) utils/build_version.pl version_nr \
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder < Driver/Version.in > $@
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder chmod 444 $@
50515239e7e190f4a34ca581dd685d002148fbddChristian Maeder
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maeder## two hardcoded dependencies for a correct generation of Version.hs
0b349288edfa50fdf38fda1a14e1562d03f92574Christian MaederDriver/Options.hs Driver/WriteFn.hs Driver/ReadFn.hs: Driver/Version.hs
0b349288edfa50fdf38fda1a14e1562d03f92574Christian Maederhets.hs: Driver/Version.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederATC/DevGraph.hs: Static/DevGraph.hs
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## 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 \
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski CspCASL/print_csp HasCASL/hacapa Haskell/h2h Haskell/h2hf \
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski Haskell/hana Haskell/wrap Isabelle/isa Syntax/hetpa
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski$(CASL_DEPENDENT_BINARIES): $(sources) $(derived_sources)
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini# CASL_DL/Logic.hs: CASL_DL/PredefinedSign.hs
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maeder####################################################################
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini## rules for DrIFT
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder.SUFFIXES:
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder
5ce19352a9cc47d982819cc889a71cd0a61ac171Christian Maeder%: %.hs packages
bcaf979d9babe6346aa343687aa7d596e2894cccPaolo Torrini $(HC) --make -o $@ $< $(HC_OPTS)
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder
df29370ae8d8b41587957f6bcdcb43a3f1927e47Christian Maeder%.hs: %.y
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder $(HAPPY) -o $@.tmp $<
e50e41135ece589f7202bd4ef8d6b97531c2a56eKlaus Luettich echo "{-# OPTIONS -w #-}" > $@
47b0e9f3cb008cb7997f4e3bae26e4d62dcc887aChristian Maeder cat $@.tmp >> $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $@.tmp
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder%.hs: %.der.hs $(DRIFT)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ($(DRIFT_ENV); export DERIVEPATH; $(DRIFT) $< > $@)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder chmod 444 $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder## rules for inlineAxioms
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder%.hs: %.inline.hs $(INLINEAXIOMS)
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder $(RM) $@
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder $(INLINEAXIOMS) $< > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder chmod 444 $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder## rule for cpp and haddock
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder%.hspp: %.hs
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich $(HC) -E -cpp -D__HADDOCK__ \
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maeder -DUNI_PACKAGE -DCASLEXTENSIONS -DPROGRAMATICA -optP -P $<
9096f6c6aaded6cd8288656ceccd4c7b3bd0747eChristian Maeder
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich## compiling rules for object and interface files
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich%.o %.hi: %.hs
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich $(HC) -c $< $(HC_OPTS)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich%.o %.hi: %.lhs
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich $(HC) -c $< $(HC_OPTS)
e62d49c0dc2893da75faad896bd135e2e9a7087bKlaus Luettich
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder## compiling rules for dependencies
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder%.d : %.hs
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder%.d : %.lhs
363939beade943a02b31004cea09dec34fa8a6d9Christian Maeder $(HC) -M $< $(HC_OPTS) -optdep-f -optdep$@
c72c1e75a969ff4c336e77481c2a8e42603f13eeChristian Maeder
fdef3358918491badb0e29e42b5d3b5a01950716Christian Maeder## Rule to generate hs files from glade files. Needed for GTK
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder%.hs: %.glade utils/appendHaskellPreludeString \
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder GUI/Glade/Template.append.hs
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder b=`basename $< .glade`; \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder cat GUI/Glade/Template.append.hs | sed "s/\%s/$$b/" | \
fdef3358918491badb0e29e42b5d3b5a01950716Christian Maeder utils/appendHaskellPreludeString $< > $@
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder## generate the inline file for the predefined CASL_DL sign
7767474aba4fa2dc51a6c68017d3bcef3b773001Christian MaederCASL_DL/PredefinedSign.inline.hs: \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder CASL_DL/PredefinedSign.inline.hs.in utils/appendHaskellPreludeString \
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder CASL_DL/PredDatatypes.het
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski $(RM) $@
340706b6c0c6e3dbacdd7003e20e9cab7f9aa765Christian Maeder utils/appendHaskellPreludeString CASL_DL/PredDatatypes.het \
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder < CASL_DL/PredefinedSign.inline.hs.in > $@
bf76f4fcf07abaebea587df8135de8356c26a363Till Mossakowski echo " )" >> $@
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder chmod 444 $@
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder# Warning: Don't change the order of the depencies!!
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus LuettichCASL_DL/PredDatatypes.het: utils/transformLibAsBasicSpec.pl \
473bc1f3f3443f18e0ee83e4642fab42183470f2Christian Maeder CASL_DL/Datatypes.het
473bc1f3f3443f18e0ee83e4642fab42183470f2Christian Maeder $(RM) $@
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettich $(PERL) $+ > $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder chmod 444 $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# uses intransparently utils/outlineAxioms
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in \
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich utils/genTransMFormFunc.pl $(INLINEAXIOMS)
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(RM) $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder $(PERL) utils/genTransMFormFunc.pl $< $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder chmod 444 $@
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederINSTALLER_DIR = ../installers
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederifeq ($(strip $(HETS_VERSION)),)
1a6464613c59e35072b90ca296ae402cbe956144Christian MaederHETS_VERSION := `cat version_nr`
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich# or `date +%F`
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettichendif
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettichinitialize_installer:
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich mkdir -p $(INSTALLER_DIR)
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich sed "s/^\(HETS_VERSION =\).*/\1$(HETS_VERSION)/" Makefile.installer \
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich > $(INSTALLER_DIR)/Makefile
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich @echo Please do
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich @echo " -> cd $(INSTALLER_DIR)"
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich @echo " -> make"
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich @echo and wait until it is finished
0be0db405c49906bd7057255069bf6df53395ac9Klaus Luettich