Makefile revision b9625461755578f3eed04676d42a63fd2caebd0c
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# Author: Klaus L�ttich
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# This Makefile will compile the new hetcats system and provides also
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# targets for test programs during implementation phases.
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# !!! Note: This makefile is written for GNU make !!!
0662ed52e814f8f08ef0e09956413a792584eddffuankg# (gmake on solaris ; make on linux)
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes####################################################################
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes## Some varibles, which control the compilation
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesCOMMONLIB_PATH = Common/Lib:Common/Lib/Parsec:Common/ATerm
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesCLEAN_PATH = Common:Logic:CASL:Syntax:Static:GUI:HasCASL:Haskell:Haskell/Language:Modal:CSP-CASL:$(INCLUDE_PATH)
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesHC_FLAGS = -fglasgow-exts -fallow-overlapping-instances -Wall
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### Profiling and Warnings (only for debugging)
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### Attention every module must be compiled with profiling or the linker
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### cannot link the various .o files properly. So after switching on
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### Profiling, do an 'gmake clean; gmake'
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### If you need Profiling comment out the following line
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes#HC_PROF = -prof -auto-all -Wall
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### list of directories to run checks in
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes####################################################################
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes## sources for hetcats (semi - manually produced with a perl script)
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesobjects = $(patsubst %.lhs,%.o,$(sources:%.hs=%.o))
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesdrifted_files = Syntax/AS_Architecture.hs Syntax/AS_Library.hs\
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes Common/AS_Annotation.hs CASL/AS_Basic_CASL.hs Syntax/AS_Structured.hs
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# this variable holds the modules that should be documented
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# the imported parsec library is not included!
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesdoc_sources = $(filter-out Common/Lib/% ,$(sources))
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes####################################################################
cb2846ded4de1abbb5934b92132baf826f1babfebnicholeshetcats-make: hets.hs utils/create_sources.pl $(drifted_files)
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes $(HC) --make -o hets $< $(HC_OPTS) 2>&1 | tee hetcats-make && \
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes $(PERL) utils/create_sources.pl hetcats-make sources_hetcats.mk
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes###############################
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### TAGS files for (x)emacs
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# load them with "M-x" "visit-tags-table" from
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# use "M-." to search for a tag
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes# !!Beware this is somewhat instable, because it uses an absolute path!!
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes /home/ger/linux/ghc-5.04.2/bin/i386-unknown-linux/hasktags \
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes###############################
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### Documentation via haddock
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes -t 'HetCATS -- a heterogenous CASL tool set'
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes###############
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### removes *.hi and *.o in all include directories
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### remove binaries
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### additonally removes *.d (dependency files) in every include directory
0662ed52e814f8f08ef0e09956413a792584eddffuankg### also delete *.d.bak (dependency file backups)
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### remove files also in own libraries
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes for p in $(subst :, ,$(COMMONLIB_PATH):$(CLEANPATH)) . ; do \
0662ed52e814f8f08ef0e09956413a792584eddffuankg### additionally removes the files that define the sources-variable
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### additionally removes files not in CVS tree
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes####################################################################
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### test targets
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes####################################################################
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### a parser to test annotation parser and Id parsers
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesCommon/test_parser: Common/test_parser.hs Common/AS_Annotation.der.hs
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### interactive
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### christian's target
bf1e7c075ccc3e6597d17de7641332ff6ff92e8astriker### CASL parser
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### HasCASL parser
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgHasCASL/hacapa: HasCASL/hacapa.lhs CASL/capa HasCASL/*.hs
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### Haskell parser
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesHaskell/hapa: Haskell/hapa.lhs Haskell/*.hs $(drifted_files) Haskell/Language/Parser.hs
cb2846ded4de1abbb5934b92132baf826f1babfebnicholesHaskell/Language/Parser.hs: Haskell/Language/Parser.ly
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### Haskell wrap parser
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### HetCASL parser
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### HetCASL parser
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes### HetCASL with dev graph
0cb770e9049c8e85ede0bbe3d47904785b15f868fuankg $(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg### run tests in other directories
609ef720afd62ca63391c9fdb415cd2faf29aa46bnicholes for i in $(TESTDIRS); do $(MAKE) -C $$i check; done
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg####################################################################
609ef720afd62ca63391c9fdb415cd2faf29aa46bnicholes## Preparing the version of HetCATS
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg $(PERL) utils/build_version.pl version_nr < hetcats/Version.in > $@
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes## two hardcoded dependencies for a correct generation of Version.hs
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes####################################################################
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg## rules for DrIFT
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes $(AG) $< -o $@
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg## compiling rules for object and interface files
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes## compiling rules for dependencies
cb2846ded4de1abbb5934b92132baf826f1babfebnicholes####################################################################
0662ed52e814f8f08ef0e09956413a792584eddffuankg## Setting a global search path (for dependency files)