Makefile revision 23d36f448c5a8c02972d7f5de8713738bd9327fb
# 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)
# 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
echo "of programatica package found"; else \
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
GHCVERSION = $(shell ghc --numeric-version)
# 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
# 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) -x Common.Consistency.ConservativityChecker -o $@ $<
$(GENRULECALL) -i Common.ATerm.ConvInstances -o $@ $<
$(GENRULECALL) -o $@ $<
$(GENRULECALL2) -o $@ $<
# ATC files for every logic
# ATC DrIFT-rule generation for logics
$(GENRULECALL) -o $@ $(Isabelle_files)
$(GENRULECALL) -o $@ $(THF_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
####################################################################
### targets
cgi:
# Documentation via haddock
-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)
# release management
./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 to avoid 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