Makefile revision 77a65251ee036c6aaf09c2775315a4ee24259fbd
# $Header$
# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2004
# Year: 2004
# 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:Modal:CspCASL:ATC:ToHaskell:Proofs:Comorphisms:$(INCLUDE_PATH):Haskell/Hatchet
## set ghc imports properly for your system
DRIFT_ENV = DERIVEPATH='.:ghc:hetcats:/home/linux-bkb/ghc/ghc-latest/lib/ghc-6.2/imports:${GHC_IMPORTS}'
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
### list of directories to run checks in
####################################################################
## sources for hetcats (semi - manually produced with a perl script)
# 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
# index for prelude is missing
-i docs/base.haddock \
-t 'hets -- a heterogenous Specification (CASL) tool set'
###############################
### release management
(cd utils/GenerateRules; \
#############################
### ATC DrIFT-rule generation
$(casl_files)
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)
$(RM) $(happy_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) $@
### HetCASL parser
$(RM) $@
### HetCASL parser
$(RM) $@
### ATC test system
$(RM) $@
$(RM) $@
### ATerm.Lib 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) $<
$(DRIFT) $(DRIFT_OPTS) $< > $@
## 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
sources_hetcats.mk: hetcats-make hetcats/Version.hs hets.hs utils/create_sources.pl $(drifted_files) $(happy_files)