Makefile revision f4505a64a089693012a3f5c3b1f12a82cd7a2a5a
# $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 = 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
## set ghc imports properly for your system
LINUX_IMPORTS = $(wildcard /home/linux-bkb/ghc/ghc-latest/lib/ghc-*/imports)
# override on commandline for other architectures
# -fglasgow-exts comes in via ../uni/uni-package.conf
# but added it here in case of compilation without uni
HC_INCLUDE = -i$(INCLUDE_PATH)
### Profiling (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 real_clean; gmake'
### and comment out HC_PACKAGE variable definition above.
### Comment in the following line for switching on profiling.
#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
problematic_objs = Common/Lib/Rel.o Common/Id.o Common/Lexer.o Common/Lib/Pretty.o Common/GlobalAnnotations.o Common/PPUtils.o
include $(problematic_objs:%.o=%.d)
$(RM) $@
ghc --make -package-conf /home/luettich/ghc-pkg/package.conf -package WASH-CGI GUI/hets_cgi.hs -o hets.cgi $(HC_OPTS) -O
hetcats-make: hets.hs utils/create_sources.pl $(drifted_files) $(happy_files) $(inline_axiom_files) Modal/ModalSystems.hs
###############################
### 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)
###############################
### count lines of code
###############################
### Documentation via haddock
# index for prelude is missing
-i docs/base.haddock \
-t 'hets -- a heterogenous Specification (CASL) tool set'
###############################
### release management
derivedSources: $(drifted_files) $(happy_files) hetcats/Version.hs $(inline_axiom_files) Modal/ModalSystems.hs
(cd utils/GenerateRules; \
$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
$(HC_OPTS) -o $(INLINEAXIOMS)
#############################
### ATC DrIFT-rule generation
utils/genRules -r $(rule) -o ATC -h ATC/$(basename $(basename $(notdir $(file)))).header.hs $(file); \
else \
fi ;
atc_files := $(filter-out CASL/% HasCASL/% Modal/% CoCASL/% COL/% CspCASL/% Haskell/% ,$(genrule_files))
$(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) $(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) $< > $@
## rules for inlineAxioms
$(INLINEAXIOMS) $< > $@
## rule for cpp and haddock
## compiling rules for object and interface files
## compiling rules for dependencies
%.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)
####################################################################
## 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)