Makefile revision 621799f077b3a1ed0f5a35382cfad0602c255b20
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)
c1a63b8fad09c419c1a64f75993feb8a343a6801ylavicdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
c1a63b8fad09c419c1a64f75993feb8a343a6801ylavic Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
e6b4bd1113567627ab6bb6c6a7105e1e01a7d889jailletc Modal/AS_Modal.hs CoCASL/AS_CoCASL.hs COL/AS_COL.hs \
457468b82e59d01eba00dd9d0817309c8f5e414ejimgenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
04983e3bd1754764eec7d6bb772fe3b0bf391771jorton Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
04983e3bd1754764eec7d6bb772fe3b0bf391771jorton Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
15660979a30d251681463de2e0584853890082accovener CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
8491e0600f69b0405e156ea8a419653c065c645bcovener Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
49dacedb6c387b786b7911082ff35121a45f414bcovenergendrifted_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 \
fc42512879dd0504532f52fe5d0d0383dda96a1eniqgenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
0451df5dc50fa5d8b3e07d92ee6a92e36a1181a5niqinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs Comorphisms/Modal2CASL.hs
0451df5dc50fa5d8b3e07d92ee6a92e36a1181a5niqgen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
da0442c0440caef34706e2c2f3af05cb65921cc0jailletc# this variable holds the modules that should be documented
da0442c0440caef34706e2c2f3af05cb65921cc0jailletc# the imported parsec library is not included!
06b8f183140c8e02e0974e938a05078b511d1603covenerdoc_sources = $(filter-out ./Isabelle/IsaSign.hs ,$(sources))
06b8f183140c8e02e0974e938a05078b511d1603covener####################################################################
259878293a997ff49f5ddfc53d3739cbdc25444ecovener.PHONY : clean d_clean real_clean bin_clean check hetana hetpa hetdg \
15890c9306ba98f6fc243e15a3c4778ddc7d773erpluem.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
65967d05f839dbf27cf91d91fa79585eeae19660minfrin $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
4f0358189bfa57b8e75bd6b94db264302a8f336amrumphproblematic_objs = Common/Lib/Rel.o Common/Id.o Common/Lexer.o Common/Lib/Pretty.o Common/GlobalAnnotations.o Common/PPUtils.o
54d750a84a175d8e338880514d440773eb986b50covener $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
54d750a84a175d8e338880514d440773eb986b50covener ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_OPTS)
4e30ef014533a7e93c92d88306291f5e49c9692ftrawickhetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files) $(inline_axiom_files) Modal/ModalSystems.hs
5f066f496cd9f20a2a701255bc67d44e7cb46daetrawick $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make
5f066f496cd9f20a2a701255bc67d44e7cb46daetrawick###############################
2e15620d724fb8e3a5be183b917359a2fd6e9468covener### TAGS files for (x)emacs
2e15620d724fb8e3a5be183b917359a2fd6e9468covener# load them with "M-x" "visit-tags-table" from
2e15620d724fb8e3a5be183b917359a2fd6e9468covener# use "M-." to search for a tag
1b988c41ee505962781d110a3e4c2c90f1ea0aa4covener# !!Beware this is somewhat instable, because it uses an absolute path!!
1b988c41ee505962781d110a3e4c2c90f1ea0aa4covener /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
b8efdc95bec9cf089aa1be0bfd07d46aa1137a7acovener###############################
b8efdc95bec9cf089aa1be0bfd07d46aa1137a7acovener### count lines of code
f06e7c4b1bce6b6491e5de0b7998d3f5696b293dchrisd###############################
179565be4043d7e5f9161aa75271fa0a001866d9covener### Documentation via haddock
111436a32ba1254291e4883292fb116d15fe8f64covener# index for prelude is missing
fce4949fb0b309a5744afcd503c6ed2d35621ee2covener -t 'hets -- a heterogenous Specification (CASL) tool set'
993d1261a278d7322bccef219101220b7b4fb8c5jkaluza###############################
993d1261a278d7322bccef219101220b7b4fb8c5jkaluza### release management
ba050a6f942b9fa0e81ed73437588005c569655ccovenerderivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files) Modal/ModalSystems.hs
ba050a6f942b9fa0e81ed73437588005c569655ccovener (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
001a44c352f89c9ec332ffd3e0a6927dcd19432chumbedooh $(HC) --make '-i../..:../DrIFT-src' -package text GenerateRules.hs -o ../genRules && \
249d09d51808cb7981af99762c3b3736ca126cd5jkaluza cvs -d :pserver:cvsread@cvs-agbkb.informatik.uni-bremen.de:/repository co HetCATS
56589be3d7a3e9343370df240010c6928cc78b39jkaluza find . -name CVS -o -name \*.o -o -name \*.hi | xargs $(RM) -r; \
f87299dab99bc04b51a6b8cad51b6795db862c0atrawick cp -p hets $(INSTALLDIR)/versions/hets-`cat version_nr`
4d12805e6c18253040223ea637acd6b3b3c18f60jorton ln -s versions/hets-`cat version_nr` hets; $(RM) version_nr)
a4df2cd1e1391575a327c2a90ba4315f805a0a78covener#############################
a4df2cd1e1391575a327c2a90ba4315f805a0a78covener### ATC DrIFT-rule generation
cb666b29f81df1d11d65002250153353568021fccovener$(generated_rule_files): $(genrule_files) utils/genRules #$(genrule_header_files)
75a230a728338d84dcfe81edd375352f34de22d0covener utils/genRules -r $(rule) -o HasCASL $(hascasl_files)
1f50dc34ae069adeed20b2986e5ffdefa5c410e0covener utils/genRules -r $(rule) -o CspCASL $(cspcasl_files)
1f50dc34ae069adeed20b2986e5ffdefa5c410e0covener utils/genRules -r $(rule) -o Haskell -h ATC/Haskell.header.hs \
65a4e663b82f8bce28ac22ab2edfd7502de36998sfgen_atc_files = if [ -f ATC/$(basename $(basename $(notdir $(file)))).header.hs ]; then \
65a4e663b82f8bce28ac22ab2edfd7502de36998sf utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
74e7f6c55fd67b10cb400b3f6d1dc718a303d944minfrinatc_files := $(filter-out CASL/% HasCASL/% Modal/% CoCASL/% COL/% CspCASL/% Haskell/% ,$(genrule_files))
74e7f6c55fd67b10cb400b3f6d1dc718a303d944minfrinhascasl_files := $(filter HasCASL/% ,$(genrule_files))
a511a29faf2ff7ead3b67680154a624effb31aafminfrincspcasl_files := $(filter CspCASL/% ,$(genrule_files))
a511a29faf2ff7ead3b67680154a624effb31aafminfrinhaskell_files := $(filter Haskell/%,$(genrule_files))
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin###############
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin### clean up
6d601599d3d65df0410eae6e573e75b2dbfb1fb4minfrin### removes *.hi and *.o in all include directories
05a5a9c3e16f21566e1b61f4bd68025ce1b741ccjoes### remove binaries
d7ffd2da16d58b1a0de212e4d56f7aebb72bef26sf### additonally removes *.d (dependency files) in every include directory
4576c1a9ef54cd1e5555ee07d016a7f559f80338sf### also delete *.d.bak (dependency file backups)
9811aed12bbc71783d2e544ccb5fecd193843eadsf### remove files also in own libraries
bd3f5647b96d378d9c75c954e3f13582af32c643sf### additionally removes the files that define the sources-variable
2a7beea91d46beb41f043a84eaad060047ee04aafabien### additionally removes files not in CVS tree
584a85dd4047e38d3ed3a29b6662fcc9d100ae4csf# $(RM) $(happy_files)
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sf####################################################################
f21e9e3d0bfb7a507ecc5bc963f2159d693503d1sf### test targets
f6b9c755a0b793e8a3a3aebd327ca20a86478117sf####################################################################
f6b9c755a0b793e8a3a3aebd327ca20a86478117sf### a parser to test annotation parser and Id parsers
132ee6ac1c26d6e8953836316ba50734eefab47bsfCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
536d2e7cd1fdec1255b8c3bdf41fdc714c506a54trawick### interactive
79c5787b92ac5f0e1cc82393816c77a006399316trawick### christian's target
79c5787b92ac5f0e1cc82393816c77a006399316trawick### CASL parser
79c5787b92ac5f0e1cc82393816c77a006399316trawick### HasCASL parser
7b395e4e878c28a4784919cfd2e704ddd14a3390jortonHasCASL/hacapa: HasCASL/hacapa.hs Common/*.hs HasCASL/*.hs
536e48c08d674acac5d44929318f2ad928edc361jorton### Haskell parser
3e4e54d4e3fc0123c63d57aa84ac7ad7a8c73ff8jortonHaskell/hapa: Haskell/hapa.hs Haskell/Hatchet/*.hs $(happy_files)
53e9b27aba029b18be814df40bcf6f0428771d1efuankg### HetCASL parser
6bb524f1895f30265a1431afc460977d391cb36bsf### HetCASL parser
e6dd71992459d05a676b98b7963423dc5dc1e24aminfrin### ATC test system
23f1535d6a60817d2846bac0aea230ea475d7dccminfrinatctest2: Common/ATerm/ATermLibTest.hs Common/SimpPretty.hs Common/ATerm/*.hs Common/Lib/*.hs
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjung### ATerm.Lib test system
ec7520b24cd80d34d82bbcaca153cbb23cc04bc0rjungatermlibtest: Common/ATerm/ATermLibTest.hs Common/ATerm/*.hs Common/SimpPretty.hs
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick### HetCASL with dev graph
6249dfa569d3b4f1f539665b979a80c6e335d93etrawick $(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
cfa64348224b66dd1c9979b809406c4d15b1c137fielding### run tests in other directories
cfa64348224b66dd1c9979b809406c4d15b1c137fielding for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
cfa64348224b66dd1c9979b809406c4d15b1c137fielding####################################################################
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim## Preparing the version of HetCATS
74499a117b3b2cd9666715a14f90c0e5d1a4ee8ajim $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
## two hardcoded dependencies for a correct generation of Version.hs
$(HAPPY) $<
$(INLINEAXIOMS) $< > $@
%.d : %.hs
%.d : %.lhs
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
Modal/ModalSystems.hs: Modal/GeneratePatterns.inline.hs.in utils/genTransMFormFunc.pl $(INLINEAXIOMS)