Makefile revision c55a0f77be7e88d3620b419ec8961f4379a586e3
# $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:ATC:ToHaskell:Proofs:Comorphisms:$(INCLUDE_PATH):Haskell/Hatchet
# please remove '-O2' if compilation lasts to long on your system
# but please don't commit to cvs server
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
$(MAKE) real_clean
$(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
--read-interface=http://www.haskell.org/ghc/docs/latest/html/libraries/base,/home/linux-bkb/ghc/ghc-6.0.1/share/ghc-6.0.1/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)
$(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) $@
### Haskell wrap 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) $<
#%.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
sources_hetcats.mk: hetcats-make hetcats/Version.hs hets.hs utils/create_sources.pl $(drifted_files) $(happy_files)