Makefile revision 24944b84c3b864860ea380a1264618813a0d5010
0N/A# Authors: (c) Klaus Luettich, Christian Maeder, Uni Bremen 2002-2009 2362N/A# Jens Elkner, Uni Magdeburg 2016 2362N/A# This GNU Makefile will compile the hets system and provides also 0N/A# targets for test programs during implementation phases. 0N/A# uncomment HC_PROF for profiling (and comment out packages in var.mk) 0N/A# call resulting binary with a final +RTS -p to get a file <binary>.prof 2362N/A#HC_PROF := -prof -auto-all -osuf p_o +RTS -K100m -RTS 0N/A# uncomment the above line to generate .imports files for displayDependencyGraph 0N/A# *.bin variants here to let them survive a 'make clean' 0N/A# generated it on demand by themselves and other users dont't need it). Other 0N/A# papers (doc/*.pdf) are already pre-generated. 1693N/A# Create the build environment 0N/A# indicate, whether working on an exported repo 0N/A# the 'replacing spaces' example was taken from the (GNU) Make info manual # the list of logics that need ShATermConvertible instances ### list of directories to run checks in ## rule for appendHaskellPreludeString #Ti_Haskell_files = TiTypes TiKinds TiDecorate TiInstanceDB ## rule for ATC generation # end of programatica stuff (PFE_FLAGS) # 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 # ATC files for every logic # ATC DrIFT-rule generation for logics # all ATC .der.hs files for all logics # a rule to create all .der.hs files # the final ATC target files created by DriFT # all sources that need to be created before ghc can be called #################################################################### #################################################################### # dummy target to force ghc invocation # some trickery to trigger a full clean if the main target (hets, hets_server) # changed since last call # the variant without GUI # replace '$Header$' in all *.hs with the filename of the containing file # call it from time to time ${
SED} -i -e
's|\$$Header\$$|@|g' @
# scanning the "whole" NFS server isn't so smart, so restrict to wellknown dirs -t
'Hets - the Heterogeneous Tool Set' \
### removes all *.o, *.hi and *.p_o files in all subdirectories except for .stack-work -o -
name '*.dyn_hi' -o -
name '*.dyn_o' \) \
# do not delete on exported archive, because latexmk might not be available debian/{root,files,hets-*,tmp} \ ### additionally removes generated files not in the repository tree ### build only, don't link. Target was formerly known as 'build'. ### Haskell to Isabelle-HOLCF translation ### HasCASL to Haskell translation ### test program to check the known provers ### run tests in other directories ## Preparing the version of Hets @
printf ' ++ "$(shell cat version_nr), $(shell cat rev.txt)"\n' >> $@
printf 'Unable to create rev.txt (no git repo infos available)\n' ; \
## two dependencies to avoid circular prerequisites ## compiling rules for object and interface files ## compiling rules for dependencies ## Rule to generate hs files from glade files. Needed for GTK # just build all required jar files printf 'Unable to get programatica (%s %s)\n' \
'neither PROGRAMATICA_SRC_FILE nor PROGRAMATICA_SRC_FILE' \
'environment variable is set/exist.' ; \
printf 'Extracting $(PROGRAMATICA_SRC_FILE) ...\n' ; \
printf 'Fetching $(PROGRAMATICA_SRC_URL) ...\n' ; \
printf 'Programatica support available.\nYou probably need to %s\n\n' \
'"make distclean" and make the desired target again.' ; \
printf 'Failed! No programatica support available!\n' ;
exit 4 ; \
printf '\nThis source tree is already exported.\n' &&
exit 1 ; \
printf "Exporting source to $${FNAME} ...\n" ; \
printf '\nWARNING: No $(USER_GUIDE) is unavailable\n!' ; \
############################################################################# ############################################################################# # We use $DEB_BUILD_ARCH to detect, whether this make got triggered via # all _relative_ wrt. $(PREFIX) and w/o trailing slashes @
printf 'Sources:\n\t%s\n\t%s\n\t%s\n' \
@
printf '\nNOTE:\n\t%s\n\t%s\n' \
'contains JNI libs for Linux and MacOSX only!' # If one would add haddocs as well, add # -m 0755 -d $(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DOC_DIR)/html/ # -m 0644 docs/* $(DESTDIR)$(SUBDIR_common)$(PREFIX)/$(DOC_DIR)/html/ BACK=
`printf '$(DIST_LATEX)/hets' | ${SED} -e 's/[^/]\{1,\}/../g'` ; \
# for now install-{common,hets,hets_server} are supported, only. [
"$(OSNAME)" =
'SunOS' ] || ${
SED} -i -e
'/@SSOLARIS@/,/@ESOLARIS@/ d' \
############################################################################ ############################################################################ # For PPA source packages we submit a platform specific changelog via # See Versioning in ./README # NOTE: The dash crap sucks again here! So we assume only the 2nd rev num # might be padded with a single '0' to avoid more clutter. if [ -z
"${FULL_DEBVERS}" ];
then \
printf "\nUsing '$${FULL_DEBVERS}' as new version.\n\n" ; \
[ -z
"$${GPG_NAME}" ] &&
GPG_NAME=
'Foo Bar' ; \
[ -z
"$${GPG_EMAIL}" ] &&
GPG_EMAIL=
'foo.bar@do.main' ; \
printf "%s (%s) %s; urgency=low\n\n %s\n\n -- %s <%s> %s\n" "$${SRCPKG}" \
"$${FULL_DEBVERS}" "$${REL_NAME}" \
"* Initial release, automatically generated." \
"$${GPG_NAME}" "$${GPG_EMAIL}" "`date -R`" \
# NOTE: dpkg-gencontrol is not POSIX conform wrt. arg processing! -@[
"$${USERNAME}" !=
'root' -o -z
"$${FAKEROOTKEY}" ] && \
printf '\nWARNING: The $< target should be called using fakeroot!\n\n' -@[
"$${USERNAME}" !=
'root' -o -z
"$${FAKEROOTKEY}" ] && \
printf '\nWARNING: The $< target should be called using fakeroot!\n\n' # Make sure debian/changelog exists, since dpkg-buildpackage runs finally a # "dpkg-genchanges -b -m'...' >../${fullPkgName}.changes" # vim: ts=4 sw=4 filetype=make