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