Makefile revision 3d905881cf97e122fb28ed5b9a9b0b220c85ec33
# Makefile
# $Id$
# Author: (c) Klaus Luettich, Christian Maeder, Uni Bremen 2002-2009
# This Makefile will compile the hets system and provides also
# targets for test programs during implementation phases.
# !!! Note: This makefile is written for GNU make !!!
# (gmake on solaris)
# deprecated since haddock 2
# the 'replacing spaces' example was taken from the (GNU) Make info manual
empty =
-i Data.Typeable -i ATerm.Lib
else
# list glade files
GTK_GLADE_FILES = $(wildcard GUI/Glade/*.glade)
# the list of logics that need ShATermConvertible instances
### 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 $@
## 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)
else
# unset this variable from var.mk because the programatica sources
# are needed to created our sources!
# end of programatica stuff
# remove -fno-warn-orphans for older ghcs and add -ifgl
# uncomment HC_PROF for profiling (and comment out packages in var.mk)
# call resulting binary with a final +RTS -p to get a file <binary>.prof
# HC_PROF = -prof -auto-all -osuf p_o +RTS -K100m -RTS
# -ddump-minimal-imports
# uncomment the above line to generate .imports files for displayDependencyGraph
## deprecated non-sources to be excluded for haddock-0.8
## deprecated hets sources for haddock-0.8
# files generated by DriFT
# files to extract data types from to generate ShATermConvertible instances
# files generated by genRules as input for DriFT
# the rules to create ATC .der.hs file for DriFT
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -i ATC.Id -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL2) -o $@ $<
$(GENRULECALL2) -i ATC.LibName -o $@ $<
# ATC files for every logic
# ATC DrIFT-rule generation for logics
$(GENRULECALL) -o $@ $(Isabelle_files)
# all ATC .der.hs files for all logics
# a rule to create all .der.hs files
# the final ATC target files created by DriFT
# files to be processed by utils/InlineAxioms
# all sources that need to be created before ghc can be called
# sources that have {-# OPTIONS -cpp #-}
# further sources that should be excluded from haddock-0.8
nondoc_sources = $(wildcard utils/DrIFT-src/*.hs) \
$(wildcard utils/GenerateRules/*.hs) \
$(wildcard utils/InlineAxioms/*.hs) \
$(generated_rule_files) \
# this variable holds the modules that should be documented
####################################################################
### targets
echo "of aterm package found"; else \
cgi:
@echo 'File : Maintainer' > $@
@echo -n Generating $@ " "
sed -e 's/: *Maintainer *: */ : /' >> $@
@echo " done"
# count lines of code
# Documentation via haddock
-t 'Hets - the Heterogeneous Tool Set' \
else
# generate haddock documentation with links to sources
HINTERFACES=`echo $$HINTERFACES0 | \
-t 'Hets - the Heterogeneous Tool Set' \
$(DRIFT): $(DRIFT_deps)
(cd utils/GenerateRules; \
GenerateRules.hs -o ../genRules)
# "-package hssource" for ghc-5.04.2
$(INLINEAXIOMS): $(INLINEAXIOMS_deps)
-i../.. -o $(INLINEAXIOMS)
# release management
$(RM) -r programatica
if [ -d ../programatica ] ; then \
./clean.sh; \
# Common/LaTeX_maps.hs generation
@echo -n "Generating pretty/LaTeX_maps.hs ... "
@(cd pretty >/dev/null; ../utils/genItCorrections \
@echo "ready"
@echo "please copy the file manually to Common"
### 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)
### interactive
ghci: $(derived_sources)
### build only, don't link
### Kif 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
## suffix rules
.SUFFIXES:
## rule for GHC
## rule for HAPPY
%.hs: %.y
echo "{-# OPTIONS -w #-}" > $@
## rule for DrIFT
$(RM) $@
chmod 444 $@
## rule 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
## Rule to generate hs files from glade files. Needed for GTK
utils/appendHaskellPreludeString $< > $@
## 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 $@
# directory for installers
INSTALLER_DIR = ../installers
HETS_VERSION := `cat version_nr`
# or `date +%F`
# prepare installer creation
mkdir -p $(INSTALLER_DIR)
> $(INSTALLER_DIR)/Makefile
@echo Please do
@echo " -> make"
# check out java parts for OWL