Makefile revision 51e836611726885f6d2719d959ed1b51f8fd06f4
a34684a59b60a4173c25035d0c627ef17e6dc215rpluem# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
1337c7673efc1f80f634139fbad7cbb98a0dc657ylavic# Year: 2004
1337c7673efc1f80f634139fbad7cbb98a0dc657ylavic# This Makefile will compile the new hetcats system and provides also
1337c7673efc1f80f634139fbad7cbb98a0dc657ylavic# targets for test programs during implementation phases.
4da61833a1cbbca94094f9653fd970582b97a72etrawick# !!! Note: This makefile is written for GNU make !!!
4da61833a1cbbca94094f9653fd970582b97a72etrawick# (gmake on solaris ; make on linux)
4da61833a1cbbca94094f9653fd970582b97a72etrawick####################################################################
4789804be088bcd86ae637a29cdb7fda25169521jailletc## Some varibles, which control the compilation
4789804be088bcd86ae637a29cdb7fda25169521jailletcCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
e50c3026198fd496f183cda4c32a202925476778covenerCLEAN_PATH = utils/DrIFT-src:utils/GenerateRules:utils/inlineAxioms:Common:Logic:CASL:CASL/CCC:Syntax:Static:GUI:HasCASL:Haskell:Modal:CoCASL:COL:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:Isabelle:$(INCLUDE_PATH):Haskell/Hatchet
e50c3026198fd496f183cda4c32a202925476778covener## set ghc imports properly for your system
5b88c8507d5ef6d0c4cfbc78230294968175b638minfrinLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
5b88c8507d5ef6d0c4cfbc78230294968175b638minfrinDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
6c3b9cebb551140fbb25d58bae08b539b3802133ylavic# override on commandline for other architectures
6c3b9cebb551140fbb25d58bae08b539b3802133ylavicINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
0a0df13b7f1f4f1a74fe295253d89ca3911b301aylavicGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
d58a848a016d401b965111e50ef829e1641f7834minfrin# -fglasgow-exts comes in via ../uni/uni-package.conf
2e6f4d654c96c98b761fb012fd25c5d5b1558c44sfHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
17e6c95f3b22d18acdf8380fb26a8d0e10c80767ylavic### Profiling and Warnings (only for debugging)
17e6c95f3b22d18acdf8380fb26a8d0e10c80767ylavic### Attention every module must be compiled with profiling or the linker
17e6c95f3b22d18acdf8380fb26a8d0e10c80767ylavic### cannot link the various .o files properly. So after switching on
17e6c95f3b22d18acdf8380fb26a8d0e10c80767ylavic### Profiling, do an 'gmake clean; gmake'
17e6c95f3b22d18acdf8380fb26a8d0e10c80767ylavic### If you need Profiling comment out the following line
e8bd80a4bb88199d2f9a24a50345688e52d9c116ylavic#HC_PROF = -prof -auto-all
330e16bea8fe9cace4de90c349750c03dfb1fe64ylavic### list of directories to run checks in
330e16bea8fe9cace4de90c349750c03dfb1fe64ylavicTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell/test
d7205b1a86c51c27b71a2c458dc453fd53a261c1covener####################################################################
d7205b1a86c51c27b71a2c458dc453fd53a261c1covener## sources for hetcats (semi - manually produced with a perl script)
3060ce7f798fbda7999cd4ddf89b525d2b294185covenerdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
c1a63b8fad09c419c1a64f75993feb8a343a6801ylavic Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
c1a63b8fad09c419c1a64f75993feb8a343a6801ylavic Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
e466c40e1801982602ee0200c9e8b61cc148742djailletcgenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
457468b82e59d01eba00dd9d0817309c8f5e414ejim Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
04983e3bd1754764eec7d6bb772fe3b0bf391771jorton CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
28c31fb73c1264bd1d0ff932573677030b024c7dwrowe Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
63b9f1f5880391261705f696d7d65507bbe9ace3covenergendrifted_files = ATC/Graph.hs ATC/Id.hs ATC/Result.hs ATC/AS_Annotation.hs \
3c990331fc6702119e4f5b8ba9eae3021aea5265jim Modal/ATC_Modal.hs CoCASL/ATC_CoCASL.hs COL/ATC_COL.hs \
3c990331fc6702119e4f5b8ba9eae3021aea5265jimgenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
fc42512879dd0504532f52fe5d0d0383dda96a1eniqinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs Comorphisms/Modal2CASL.hs
fc42512879dd0504532f52fe5d0d0383dda96a1eniqgen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
da0442c0440caef34706e2c2f3af05cb65921cc0jailletc# this variable holds the modules that should be documented
983528026996668ea295be95aedb9c7a346af470ylavic# the imported parsec library is not included!
da0442c0440caef34706e2c2f3af05cb65921cc0jailletcdoc_sources = $(filter-out ./Isabelle/IsaSign.hs ,$(sources))
06b8f183140c8e02e0974e938a05078b511d1603covener####################################################################
15890c9306ba98f6fc243e15a3c4778ddc7d773erpluem.PHONY : clean d_clean real_clean bin_clean check hetana hetpa hetdg \
259878293a997ff49f5ddfc53d3739cbdc25444ecovener.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
65967d05f839dbf27cf91d91fa79585eeae19660minfrin $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
75f5c2db254c0167a0e396254460de09b775d203trawick $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
5716f9c6daa92dde5f2f9d11ed63f7c9549c223atrawick ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_OPTS)
54d750a84a175d8e338880514d440773eb986b50covenerhetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files) $(inline_axiom_files) Modal/ModalSystems.hs
54d750a84a175d8e338880514d440773eb986b50covener $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make
54d750a84a175d8e338880514d440773eb986b50covener###############################
54d750a84a175d8e338880514d440773eb986b50covener### TAGS files for (x)emacs
54d750a84a175d8e338880514d440773eb986b50covener# load them with "M-x" "visit-tags-table" from
54d750a84a175d8e338880514d440773eb986b50covener# use "M-." to search for a tag
54d750a84a175d8e338880514d440773eb986b50covener# !!Beware this is somewhat instable, because it uses an absolute path!!
4e30ef014533a7e93c92d88306291f5e49c9692ftrawick /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
5f066f496cd9f20a2a701255bc67d44e7cb46daetrawick###############################
5f066f496cd9f20a2a701255bc67d44e7cb46daetrawick### count lines of code
2e15620d724fb8e3a5be183b917359a2fd6e9468covener###############################
2e15620d724fb8e3a5be183b917359a2fd6e9468covener### Documentation via haddock
1b988c41ee505962781d110a3e4c2c90f1ea0aa4covener# index for prelude is missing
b8efdc95bec9cf089aa1be0bfd07d46aa1137a7acovener -t 'hets -- a heterogenous Specification (CASL) tool set'
7b7430e701e9a31ce809da7c220bb8dfcf68c86etrawick###############################
ccc20788c1e5fc973f36df634399c89acb70deaejerenkrantz### release management
ccc20788c1e5fc973f36df634399c89acb70deaejerenkrantzderivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files)
273e512f20f262e5e2aa8e0e83371d1929fb76adjkaluza (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
993d1261a278d7322bccef219101220b7b4fb8c5jkaluza $(HC) --make '-i../..:../DrIFT-src' -package text GenerateRules.hs -o ../genRules && \
ba050a6f942b9fa0e81ed73437588005c569655ccovenerModal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in utils/genTransMFormFunc.pl
efe780dcf13b2b95effabf897d694d8f23feac74trawick cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository co HetCATS
9b0076ddd1103e5fa9c1f9bafde4b06ce244fbaecovener find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
56589be3d7a3e9343370df240010c6928cc78b39jkaluza cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
77ca16c5676da23155311e13cee61e7eaba9fa3ejailletc ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
f87299dab99bc04b51a6b8cad51b6795db862c0atrawick#############################
f87299dab99bc04b51a6b8cad51b6795db862c0atrawick### ATC DrIFT-rule generation
85eacfc96a04547ef25aabbc06440039715084c2jorton$(generated_rule_files): $(genrule_files) utils/genRules #$(genrule_header_files)
a4df2cd1e1391575a327c2a90ba4315f805a0a78covener utils/genRules -r $(rule) -o HasCASL $(hascasl_files)
cb666b29f81df1d11d65002250153353568021fccovener utils/genRules -r $(rule) -o CspCASL $(cspcasl_files)
6a80c3c6f4b8ea7ba5e89402b8b779b09ce020e0covener utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
75a230a728338d84dcfe81edd375352f34de22d0covenergen_atc_files = if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; then \
1f50dc34ae069adeed20b2986e5ffdefa5c410e0covener utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
63a5ea80bddcc84a462e40f402b4f330e0e05411coveneratc_files := $(filter-out CASL/% HasCASL/% Modal/% CoCASL/% COL/% CspCASL/% Haskell/% ,$(genrule_files))
74e7f6c55fd67b10cb400b3f6d1dc718a303d944minfrinhaskell_files := $(filter Haskell/%,$(genrule_files))
a511a29faf2ff7ead3b67680154a624effb31aafminfrin###############
a511a29faf2ff7ead3b67680154a624effb31aafminfrin### clean up
a511a29faf2ff7ead3b67680154a624effb31aafminfrin### removes *.hi and *.o in all include directories
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin### remove binaries
c12917da693bae4028a1d5a5e8224bceed8c739dsf### additonally removes *.d (dependency files) in every include directory
eafcc0ebf263d0ba69855b6e10958c4c1a2361bdsf### also delete *.d.bak (dependency file backups)
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sf### remove files also in own libraries
4576c1a9ef54cd1e5555ee07d016a7f559f80338sf### additionally removes the files that define the sources-variable
88fac54d9d64f85bbdab5d7010816f4377f95bd7rjung### additionally removes files not in CVS tree
bd3f5647b96d378d9c75c954e3f13582af32c643sf# $(RM) $(happy_files)
2a7beea91d46beb41f043a84eaad060047ee04aafabien####################################################################
2a7beea91d46beb41f043a84eaad060047ee04aafabien### test targets
2a7beea91d46beb41f043a84eaad060047ee04aafabien####################################################################
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csf### a parser to test annotation parser and Id parsers
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sfCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
f6b9c755a0b793e8a3a3aebd327ca20a86478117sf### interactive
132ee6ac1c26d6e8953836316ba50734eefab47bsf### christian's target
85eacfc96a04547ef25aabbc06440039715084c2jorton### CASL parser
79c5787b92ac5f0e1cc82393816c77a006399316trawick### HasCASL parser
79c5787b92ac5f0e1cc82393816c77a006399316trawickHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
79c5787b92ac5f0e1cc82393816c77a006399316trawick### Haskell parser
7b395e4e878c28a4784919cfd2e704ddd14a3390jortonHaskell/hapa: Haskell/hapa.hs Haskell/Hatchet/*.hs $(happy_files)
536e48c08d674acac5d44929318f2ad928edc361jorton### HetCASL parser
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jorton### HetCASL parser
53e9b27aba029b18be814df40bcf6f0428771d1efuankg### ATC test system
6bb524f1895f30265a1431afc460977d391cb36bsfatctest2: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs Common/ATerm/*.hs Common/Lib/*.hs
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin### ATerm.Lib test system
23f1535d6a60817d2846bac0aea230ea475d7dccminfrinatermlibtest: Common/ATerm/ATermLibTest.hs Common/ATerm/*.hs Common/SimpPretty.hs
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung### HetCASL with dev graph
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung $(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung### run tests in other directories
0827cb14e550f6f65018431c22c2c913631c8f25kbrand####################################################################
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick## Preparing the version of HetCATS
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim## two hardcoded dependencies for a correct generation of Version.hs
cfa64348224b66dd1c9979b809406c4d15b1c137fieldinghetcats/Options.hs hetcats/WriteFn.hs hetcats/ReadFn.hs: hetcats/Version.hs
cfa64348224b66dd1c9979b809406c4d15b1c137fielding####################################################################
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim## rules for DrIFT
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs