Makefile revision d0279930f87bf39843e0bd2992a4789322662144
# Makefile
# $Id$
# Author: (c) Klaus L�ttich, Christian Maeder, Uni Bremen 2002-2005
# Year: 2004
# This Makefile will compile the new hets system and provides also
# targets for test programs during implementation phases.
# !!! Note: This makefile is written for GNU make !!!
# (gmake on solaris)
####################################################################
## Some varibles, which control the compilation
# the 'replacing spaces' example was taken from the (GNU) Make info manual
empty =
# override on commandline for other architectures
INSTALLDIR = \
else
# remove -fno-warn-orphans for older ghcs and add -ifgl
# -ddump-minimal-imports
# uncomment to above line to generate .imports files for displayDependencyGraph
UNI_PACKAGE_CONF = $(wildcard ../uni/uni-package.conf)
# some modules from uni for haddock
### list of directories to run checks in
PFE_TOOLDIR = $(wildcard ../programatica/tools)
echo "of programatica package found"; else \
(cd ../programatica/tools; \
echo "{-# OPTIONS -w #-}" > $@
$< >> $@
$@.hs -o $@
strip $@
## rule for appendHaskellPreludeString
$(RM) $@
$(APPENDPRELUDESTRING) < $< > $@
chmod 444 $@
#Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB
#Ti_Prop_files = property/TI/TiPropDecorate property/syntax/PropSyntaxRec
Haskell_files = $(addsuffix .hs, \
## rule for ATC generation
hs_der_files += $(hs_clean_files)
### 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'
### Comment in the following line for switching on profiling.
# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
####################################################################
## sources for hets
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
-i ATC.AS_Annotation -o $@ $<
# sources that have {-# OPTIONS -cpp #-}
cpp_sources = \
# unused, remove when header files are gone
nondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
# this variable holds the modules that should be documented
####################################################################
### targets
echo "of dataenc package found"; else \
echo "of HTTP package found"; else \
echo "of syb-generics package found"; else \
echo "of Shellac package found"; else \
echo "of Shellac-readline package found"; else \
echo "of Shellac-compatline package found"; else \
echo "of tagsoup package found"; else \
echo "of hxt package found"; else \
echo "of hxt-filter package found"; else \
echo "of HAIFA package found"; else \
$(RM) $@
cgi:
$(MAKE) real_clean
@echo 'File : Maintainer' > $@
@echo -n Generating $@ " "
sed -e 's/: *Maintainer *: */ : /' >> $@
@echo " done"
###############################
### count lines of code
###############################
### Documentation via haddock
# generate haddock documentation with links to sources
HINTERFACES=`echo $$HINTERFACES0 | \
-t 'Hets - the Heterogeneous Tool Set' \
# sources are not copied here
###############################
### release management
$(DRIFT): $(DRIFT_deps)
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules && strip ../genRules)
# "-package hssource" for ghc-5.04.2
$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
-i../.. -o $(INLINEAXIOMS)
$(RM) -r programatica
if [ -d ../programatica ] ; then \
./clean.sh; \
## TODO: add more dependencies and use hets-opt
# compile $< -b . -k web -o $@
###################################
### Common/LaTeX_maps.hs generation
strip $@
@echo -n "Generating pretty/LaTeX_maps.hs ... "
@(cd pretty >/dev/null; ../utils/genItCorrections \
@echo "ready"
@echo "please copy the file manually to Common"
#############################
### ATC DrIFT-rule generation
$(GENRULECALL) -o $@ $(Isabelle_files)
###############
### clean up
### removes all *.o, *.hi and *.p_o files in all subdirectories
### remove binaries
$(RM) $(TESTTARGETS)
### additionally removes the library files
### clean user packages
### additionally removes generated files not in the CVS tree
$(RM) $(derived_sources)
####################################################################
### test targets
####################################################################
### interactive
ghci: $(derived_sources)
### christian's target
### CASL parser
### Annos parser
### CASL parser
### HasCASL parser
### Haskell analysis
### Haskell to Isabelle-HOLCF translation
### HasCASL to Haskell translation
### test program to check the known provers
### run tests in other directories
check: $(TESTTARGETS)
####################################################################
## Preparing the version of Hets
$(RM) $@
< Driver/Version.in > $@
chmod 444 $@
## two hardcoded dependencies for a correct generation of Version.hs
## two dependencies for avoidence of circular prerequisites
####################################################################
## rules for DrIFT
.SUFFIXES:
%.hs: %.y
echo "{-# OPTIONS -w #-}" > $@
$(RM) $@
chmod 444 $@
## rules for inlineAxioms
$(RM) $@
$(INLINEAXIOMS) $< > $@
chmod 444 $@
## rule for cpp and haddock
## compiling rules for object and interface files
## compiling rules for dependencies
%.d : %.hs
%.d : %.lhs
## generate the inline file for the predefined CASL_DL sign
$(RM) $@
echo " )" >> $@
chmod 444 $@
# Warning: Don't change the order of the depencies!!
$(RM) $@
$(PERL) $+ > $@
chmod 444 $@
## rule for Modal/ModalSystems.hs needed for ModalLogic Translation
# uses intransparently utils/outlineAxioms
$(RM) $@
chmod 444 $@
INSTALLER_DIR = ../installers
HETS_VERSION := `cat version_nr`
# or `date +%F`
mkdir -p $(INSTALLER_DIR)
> $(INSTALLER_DIR)/Makefile
@echo Please do
@echo " -> make"