Makefile revision 621799f077b3a1ed0f5a35382cfad0602c255b20
6bdda696b3ea703c47e87fea61017ec655f91d92nd# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
6bdda696b3ea703c47e87fea61017ec655f91d92nd# Year: 2004
6bdda696b3ea703c47e87fea61017ec655f91d92nd# This Makefile will compile the new hetcats system and provides also
6bdda696b3ea703c47e87fea61017ec655f91d92nd# targets for test programs during implementation phases.
6bdda696b3ea703c47e87fea61017ec655f91d92nd# !!! Note: This makefile is written for GNU make !!!
6bdda696b3ea703c47e87fea61017ec655f91d92nd# (gmake on solaris ; make on linux)
6bdda696b3ea703c47e87fea61017ec655f91d92nd####################################################################
6bdda696b3ea703c47e87fea61017ec655f91d92nd## Some varibles, which control the compilation
6bdda696b3ea703c47e87fea61017ec655f91d92ndCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
6bdda696b3ea703c47e87fea61017ec655f91d92ndCLEAN_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
6bdda696b3ea703c47e87fea61017ec655f91d92nd## set ghc imports properly for your system
6bdda696b3ea703c47e87fea61017ec655f91d92ndLINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
16b55a35cff91315d261d1baa776138af465c4e4fuankgDRIFT_ENV = DERIVEPATH='.:ghc:hetcats:${LINUX_IMPORTS}:${GHC_IMPORTS}'
16b55a35cff91315d261d1baa776138af465c4e4fuankg# override on commandline for other architectures
6bdda696b3ea703c47e87fea61017ec655f91d92ndINSTALLDIR = /home/www/agbkb/forschung/formal_methods/CoFI/hets/`utils/sysname.sh`
6bdda696b3ea703c47e87fea61017ec655f91d92ndGENERATERULES_deps = utils/GenerateRules/*hs $(DRIFT_deps)
6bdda696b3ea703c47e87fea61017ec655f91d92nd# -fglasgow-exts comes in via ../uni/uni-package.conf
6bdda696b3ea703c47e87fea61017ec655f91d92ndHC_PACKAGE = -package-conf ../uni/uni-package.conf -package uni-davinci \
6bdda696b3ea703c47e87fea61017ec655f91d92nd### Profiling and Warnings (only for debugging)
6bdda696b3ea703c47e87fea61017ec655f91d92nd### Attention every module must be compiled with profiling or the linker
6bdda696b3ea703c47e87fea61017ec655f91d92nd### cannot link the various .o files properly. So after switching on
6bdda696b3ea703c47e87fea61017ec655f91d92nd### Profiling, do an 'gmake clean; gmake'
6bdda696b3ea703c47e87fea61017ec655f91d92nd### If you need Profiling comment out the following line
6bdda696b3ea703c47e87fea61017ec655f91d92nd#HC_PROF = -prof -auto-all
6bdda696b3ea703c47e87fea61017ec655f91d92nd### list of directories to run checks in
6bdda696b3ea703c47e87fea61017ec655f91d92ndTESTDIRS = Common CASL HasCASL Haskell/Hatchet/examples ToHaskell/test
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg####################################################################
6bdda696b3ea703c47e87fea61017ec655f91d92nd## sources for hetcats (semi - manually produced with a perl script)
6bdda696b3ea703c47e87fea61017ec655f91d92nddrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs \
6bdda696b3ea703c47e87fea61017ec655f91d92nd Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs \
6bdda696b3ea703c47e87fea61017ec655f91d92ndgenrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs \
0662ed52e814f8f08ef0e09956413a792584eddffuankg Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs \
6bdda696b3ea703c47e87fea61017ec655f91d92nd CASL/Morphism.hs CASL/Sign.hs CASL/AS_Basic_CASL.der.hs \
6bdda696b3ea703c47e87fea61017ec655f91d92nd Haskell/Hatchet/Class.hs Haskell/Hatchet/KindInference.hs \
6bdda696b3ea703c47e87fea61017ec655f91d92ndgendrifted_files = ATC/Graph.hs ATC/Id.hs ATC/Result.hs ATC/AS_Annotation.hs \
0662ed52e814f8f08ef0e09956413a792584eddffuankggenerated_rule_files = $(patsubst %.hs,%.der.hs,$(gendrifted_files))
6bdda696b3ea703c47e87fea61017ec655f91d92ndinline_axiom_files = Comorphisms/CASL2PCFOL.hs Comorphisms/PCFOL2FOL.hs Comorphisms/Modal2CASL.hs
ac7985784d08a3655291f24f711812b4d8b1cbcffuankggen_inline_axiom_files = $(patsubst %.hs,%.inline.hs,$(inline_axiom_files))
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# this variable holds the modules that should be documented
6bdda696b3ea703c47e87fea61017ec655f91d92nd# the imported parsec library is not included!
6bdda696b3ea703c47e87fea61017ec655f91d92nddoc_sources = $(filter-out ./Isabelle/IsaSign.hs ,$(sources))
6bdda696b3ea703c47e87fea61017ec655f91d92nd####################################################################
6bdda696b3ea703c47e87fea61017ec655f91d92nd### targets
6bdda696b3ea703c47e87fea61017ec655f91d92nd.PHONY : clean d_clean real_clean bin_clean check hetana hetpa hetdg \
6bdda696b3ea703c47e87fea61017ec655f91d92nd.SECONDARY : %.hs %.d $(generated_rule_files) $(gen_inline_axiom_files)
6bdda696b3ea703c47e87fea61017ec655f91d92nd $(HC) --make -o $@ hets.hs $(HC_OPTS) 2>&1 | tee hetcats-make
6bdda696b3ea703c47e87fea61017ec655f91d92ndproblematic_objs = Common/Lib/Rel.o Common/Id.o Common/Lexer.o Common/Lib/Pretty.o Common/GlobalAnnotations.o Common/PPUtils.o
6bdda696b3ea703c47e87fea61017ec655f91d92nd $(HC) --make -O -o hets hets.hs $(HC_OPTS) -w 2>&1 | tee hetcats-make
6bdda696b3ea703c47e87fea61017ec655f91d92nd ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_OPTS)
ac7985784d08a3655291f24f711812b4d8b1cbcffuankghetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files) $(inline_axiom_files) Modal/ModalSystems.hs
6bdda696b3ea703c47e87fea61017ec655f91d92nd $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make
6bdda696b3ea703c47e87fea61017ec655f91d92nd###############################
6bdda696b3ea703c47e87fea61017ec655f91d92nd### TAGS files for (x)emacs
6bdda696b3ea703c47e87fea61017ec655f91d92nd# load them with "M-x" "visit-tags-table" from
6bdda696b3ea703c47e87fea61017ec655f91d92nd# use "M-." to search for a tag
6bdda696b3ea703c47e87fea61017ec655f91d92nd# !!Beware this is somewhat instable, because it uses an absolute path!!
6bdda696b3ea703c47e87fea61017ec655f91d92nd /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
6bdda696b3ea703c47e87fea61017ec655f91d92nd###############################
6bdda696b3ea703c47e87fea61017ec655f91d92nd### count lines of code
6bdda696b3ea703c47e87fea61017ec655f91d92nd###############################
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg### Documentation via haddock
6bdda696b3ea703c47e87fea61017ec655f91d92nd# index for prelude is missing
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg -t 'hets -- a heterogenous Specification (CASL) tool set'
6bdda696b3ea703c47e87fea61017ec655f91d92nd###############################
6bdda696b3ea703c47e87fea61017ec655f91d92nd### release management
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgderivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files) Modal/ModalSystems.hs
6bdda696b3ea703c47e87fea61017ec655f91d92nd (cd utils/DrIFT-src; $(HC) --make DrIFT.hs -o ../DrIFT && \
6bdda696b3ea703c47e87fea61017ec655f91d92nd $(HC) --make '-i../..:../DrIFT-src' -package text GenerateRules.hs -o ../genRules && \
utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
atc_files := $(filter-out CASL/% HasCASL/% Modal/% CoCASL/% COL/% CspCASL/% Haskell/% ,$(genrule_files))
### also delete *.d.bak (dependency file backups)
$(RM) $@
ghci:
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
$(RM) $@
### ATerm.Lib test system
$(RM) $@
$(RM) $@
$(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
## 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)