Makefile revision ac43fa22d2d3f91a17674ac164cba3cf39a17795
# $Id$
# Author: Klaus L�ttich
# Year: 2003
# This Makefile will compile the new hetcats system and provides also
# targets for test programs during implementation phases.
# !!! Note: This makefile is written for GNU make !!!
# (gmake on solaris ; make on linux)
####################################################################
## Some varibles, which control the compilation
CLEAN_PATH = Common:Logic:CASL:Syntax:Static:GUI:HasCASL:Haskell:Haskell/Language:Modal:CspCASL:$(INCLUDE_PATH)
HC_INCLUDE = -i$(INCLUDE_PATH)
### Profiling and Warnings (only for debugging)
### Attention every module must be compiled with profiling or the linker
### cannot link the various .o files properly. So after switching on
### Profiling, do an 'gmake clean; gmake'
### If you need Profiling comment out the following line
#HC_PROF = -prof -auto-all -Wall
### list of directories to run checks in
####################################################################
## sources for hetcats (semi - manually produced with a perl script)
genrule_files = Common/Lib/Graph.hs Common/Id.hs Common/Result.hs Common/AS_Annotation.der.hs Common/Named.hs \
Syntax/AS_Structured.der.hs Syntax/AS_Architecture.der.hs Common/GlobalAnnotations.hs Syntax/AS_Library.der.hs \
# this variable holds the modules that should be documented
# the imported parsec library is not included!
####################################################################
### targets
#.PRECIOUS: sources_hetcats.mk
$(RM) $@
###############################
### TAGS files for (x)emacs
# load them with "M-x" "visit-tags-table" from
# use "M-." to search for a tag
# !!Beware this is somewhat instable, because it uses an absolute path!!
hetcats.TAGS: $(sources)
###############################
### Documentation via haddock
-i/home/linux-bkb/ghc/ghc-6.0/share/ghc-6.0/html/base,/home/linux-bkb/ghc/ghc-6.0/share/ghc-6.0/html/base/base.haddock \
-t 'hets -- a heterogenous Specification (CASL) tool set'
#############################
### ATC DrIFT-rule generation
utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
else \
fi ;
$(RM) $(generated_rule_files)
###############
### clean up
### removes *.hi and *.o in all include directories
### remove binaries
$(RM) test_parser
### additonally removes *.d (dependency files) in every include directory
### also delete *.d.bak (dependency file backups)
### remove files also in own libraries
### additionally removes the files that define the sources-variable
### additionally removes files not in CVS tree
$(RM) $(drifted_files)
####################################################################
### test targets
####################################################################
### a parser to test annotation parser and Id parsers
$(RM) $@
### interactive
ghci:
### christian's target
### CASL parser
$(RM) $@
### HasCASL parser
$(RM) $@
### Haskell parser
$(RM) $@
### Haskell wrap parser
$(RM) $@
### HetCASL parser
$(RM) $@
### HetCASL parser
$(RM) $@
### ATC test system
$(RM) $@
### HetCASL with dev graph
$(RM) $@
$(HC) --make -o $@ $< $(HC_OPTS) -package-conf ../uni/uni-package.conf -package uni-davinci -package uni-server
### run tests in other directories
####################################################################
## Preparing the version of HetCATS
## two hardcoded dependencies for a correct generation of Version.hs
####################################################################
## rules for DrIFT
$(HAPPY) $<
#%.hs: %.ag.hs
# $(AG) $<
$(DRIFT) $(DRIFT_OPTS) $< > $@
#%.hs: %.ag
# $(AG) $< -o $@
$(DRIFT) $< > $@
## compiling rules for object and interface files
## compiling rules for dependencies
%.d : %.hs
%.d : %.lhs
####################################################################
## Setting a global search path (for dependency files)
## include every .d file in INCLUDE_PATH