# makefile for Gambit include directory. # Copyright (c) 1994-2023 by Marc Feeley, All Rights Reserved. herefromroot = include rootfromhere = .. SUBDIRS = PACKAGE_SHORTNAME = @PACKAGE_SHORTNAME@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ @SET_MAKE@ srcdir = @srcdir@ VPATH = @srcdir@ srcdirpfx = @srcdirpfx@ C_COMPILER = @C_COMPILER_MF@ C_PREPROC = @C_PREPROC_MF@ FLAGS_OBJ = @FLAGS_OBJ_MF@ FLAGS_DYN = @FLAGS_DYN_MF@ FLAGS_LIB = @FLAGS_LIB_MF@ FLAGS_EXE = @FLAGS_EXE_MF@ FLAGS_OPT = @FLAGS_OPT_MF@ FLAGS_OPT_RTS = @FLAGS_OPT_RTS_MF@ DEFS = @DEFS@ LIBS = @LIBS@ GAMBITLIB_DEFS = @GAMBITLIB_DEFS_MF@ LIB_PREFIX = @LIB_PREFIX@ LIB_VERSION_SUFFIX = @LIB_VERSION_SUFFIX@ LIB_MAJOR_VERSION_SUFFIX = @LIB_MAJOR_VERSION_SUFFIX@ LIB_EXTENSION = @LIB_EXTENSION@ GAMBITLIB = @GAMBITLIB@ GAMBITGSCLIB = @GAMBITGSCLIB@ GAMBITGSILIB = @GAMBITGSILIB@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LIB = @INSTALL_LIB@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ LN_S = @LN_S@ RANLIB = @RANLIB@ AR = @AR@ RC = @RC@ GIT = @GIT@ HG = @HG@ prefix = @prefix@ exec_prefix = @exec_prefix@ includedir = @includedir@ libdir = @libdir@ bindir = @bindir@ docdir = @docdir@ infodir = @infodir@ emacsdir = @emacsdir@ libexecdir = @libexecdir@ datarootdir = @datarootdir@ datadir = @datadir@ htmldir = @htmldir@ dvidir = @dvidir@ pdfdir = @pdfdir@ psdir = @psdir@ localedir = @localedir@ mandir = @mandir@ .SUFFIXES: RCFILES = makefile.in gambit.h.in config.h.in stamp-release.h GENDISTFILES = DISTFILES = $(RCFILES) $(GENDISTFILES) all: core core: core-pre: @major=`echo $(PACKAGE_VERSION) | sed -e "s/v//g" -e "s/\.[^.]*\.[^.]*//g"`; \ minor=`echo $(PACKAGE_VERSION) | sed -e "s/v[^.]*\.//g" -e "s/\.[^.]*//g"`; \ revision=`echo $(PACKAGE_VERSION) | sed -e "s/v[^.]*\.[^.]*\.//g" -e "s///g"`; \ version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \ echo "#error \"The version indicated in ___VERSION is not supported by gambit.h\"" > gambit-not$$version_num.h; \ echo "#error \"You are probably compiling C code generated by a Gambit compiler earlier or later than $(PACKAGE_VERSION)\"" >> gambit-not$$version_num.h; \ echo "#error \"___VERSION will be set to $$version_num to reduce other errors\"" >> gambit-not$$version_num.h; \ echo "#undef ___VERSION" >> gambit-not$$version_num.h; \ echo "#define ___VERSION $$version_num" >> gambit-not$$version_num.h; \ echo "#include \"gambit.h\"" >> gambit-not$$version_num.h core-post: gambit.h phase1: core phase2: phase3: phase4: bootstrap-pre: bootstrap-post: install-pre: install-post: core c_includedir="$(DESTDIR)$(prefix)/include"; \ i_includedir="$(DESTDIR)$(includedir)"; \ t_includedir="$$i_includedir"; \ major=`echo $(PACKAGE_VERSION) | sed -e "s/v//g" -e "s/\.[^.]*\.[^.]*//g"`; \ minor=`echo $(PACKAGE_VERSION) | sed -e "s/v[^.]*\.//g" -e "s/\.[^.]*//g"`; \ revision=`echo $(PACKAGE_VERSION) | sed -e "s/v[^.]*\.[^.]*\.//g" -e "s///g"`; \ version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \ $(srcdirpfx)$(rootfromhere)/mkidirs "$$i_includedir"; \ if test "@ENABLE_SYMLINKS@" = "yes"; then \ $(srcdirpfx)$(rootfromhere)/mkidirs "$$c_includedir"; \ t_includedir="$$c_includedir"; \ fi; \ for file in gambit.h gambit-not$$version_num.h; do \ $(INSTALL_DATA) "$(srcdirpfx)$$file" "$$t_includedir/$$file"; \ done; \ if test "$$t_includedir" != "$$i_includedir"; then \ r_includedir=`$(rootfromhere)/relpath "$$t_includedir" "$$i_includedir" @ENABLE_MULTIPLE_VERSIONS@`; \ for file in gambit.h gambit-not$$version_num.h; do \ (cd "$$i_includedir" && $(LN_S) "$$r_includedir$$file" "$$file"); \ done; \ fi uninstall-pre: uninstall-post: c_includedir="$(DESTDIR)$(prefix)/include"; \ i_includedir="$(DESTDIR)$(includedir)"; \ t_includedir="$$i_includedir"; \ major=`echo $(PACKAGE_VERSION) | sed -e "s/v//g" -e "s/\.[^.]*\.[^.]*//g"`; \ minor=`echo $(PACKAGE_VERSION) | sed -e "s/v[^.]*\.//g" -e "s/\.[^.]*//g"`; \ revision=`echo $(PACKAGE_VERSION) | sed -e "s/v[^.]*\.[^.]*\.//g" -e "s///g"`; \ version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \ if test "@ENABLE_SYMLINKS@" = "yes"; then \ t_includedir="$$c_includedir"; \ fi; \ for file in gambit.h gambit-not$$version_num.h; do \ rm -f "$$t_includedir/$$file"; \ done; \ if test "$$t_includedir" != "$$i_includedir"; then \ for file in gambit.h gambit-not$$version_num.h; do \ rm -f "$$i_includedir/$$file"; \ done; \ fi; \ rmdir "$$t_includedir" 2> /dev/null; \ if test "$$t_includedir" != "$$i_includedir"; then \ rmdir "$$i_includedir" 2> /dev/null; \ fi select-gen-for-commit-pre: select-gen-for-commit-post select-gen-for-commit-post-nonrec: if [ -e $(rootfromhere)/.git ]; then $(RC) update-index --no-skip-worktree stamp-release.h; fi deselect-gen-for-commit-pre: deselect-gen-for-commit-post deselect-gen-for-commit-post-nonrec: if [ -e $(rootfromhere)/.git ]; then $(RC) update-index --skip-worktree stamp-release.h; fi mostlyclean-pre: mostlyclean-post mostlyclean-post-nonrec: clean-pre: mostlyclean-pre clean-post clean-post-nonrec: mostlyclean-post-nonrec distclean-pre: clean-pre distclean-post distclean-post-nonrec: clean-post-nonrec bootclean-pre: distclean-pre bootclean-post bootclean-post-nonrec: distclean-post-nonrec realclean-pre: bootclean-pre realclean-post realclean-post-nonrec: bootclean-post-nonrec rm -f gambit.h gambit-not*.h config.h makefile rc-setup-pre: $(RC) add $(RCFILES) rc-setup-post: dist-pre dist-devel-pre: mkdir $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) chmod 777 $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) @echo " Copying distribution files:" @for file in $(DISTFILES); do \ echo " $(herefromroot)/$$file"; \ ln $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot) 2> /dev/null \ || cp -p $(srcdirpfx)$$file $(rootfromhere)/$(PACKAGE_TARNAME)/$(herefromroot); \ done dist-post dist-devel-post: core-recursive bootstrap-recursive install-recursive uninstall-recursive select-gen-for-commit-recursive deselect-gen-for-commit-recursive mostlyclean-recursive clean-recursive distclean-recursive bootclean-recursive realclean-recursive rc-setup-recursive dist-recursive dist-devel-recursive: @if test -n "$(SUBDIRS)"; then \ for subdir in ""$(SUBDIRS); do \ target=`echo $@ | sed 's/-recursive//'`; \ echo making $$target in $$subdir; \ (cd $$subdir && $(MAKE) $$target) || exit 1; \ done \ fi core: core-post core-post: core-recursive core-recursive: core-pre bootstrap: bootstrap-post bootstrap-post: bootstrap-recursive bootstrap-recursive: bootstrap-pre install: install-post install-post: install-recursive install-recursive: install-pre uninstall: uninstall-post uninstall-post: uninstall-recursive uninstall-recursive: uninstall-pre select-gen-for-commit: select-gen-for-commit-post select-gen-for-commit-post: select-gen-for-commit-recursive select-gen-for-commit-post-nonrec select-gen-for-commit-recursive: select-gen-for-commit-pre deselect-gen-for-commit: deselect-gen-for-commit-post deselect-gen-for-commit-post: deselect-gen-for-commit-recursive deselect-gen-for-commit-post-nonrec deselect-gen-for-commit-recursive: deselect-gen-for-commit-pre mostlyclean: mostlyclean-post mostlyclean-post: mostlyclean-recursive mostlyclean-post-nonrec mostlyclean-recursive: mostlyclean-pre clean: clean-post clean-post: clean-recursive clean-post-nonrec clean-recursive: clean-pre distclean: distclean-post distclean-post: distclean-recursive distclean-post-nonrec distclean-recursive: distclean-pre bootclean: bootclean-post bootclean-post: bootclean-recursive bootclean-post-nonrec bootclean-recursive: bootclean-pre realclean: realclean-post realclean-post: realclean-recursive realclean-post-nonrec realclean-recursive: realclean-pre rc-setup: rc-setup-post rc-setup-post: rc-setup-recursive rc-setup-recursive: rc-setup-pre dist: dist-post dist-post: dist-recursive dist-recursive: dist-pre dist-devel: dist-devel-post dist-devel-post: dist-devel-recursive dist-devel-recursive: dist-devel-pre stamp: @if [ -e "$(rootfromhere)/.git" ]; then \ version="$$($(GIT) describe --tag --always | sed 's/-bootstrap$$//')" && \ if grep -F "#define ___STAMP_VERSION \"$$version\"" < stamp.h 2> /dev/null; then \ echo "___STAMP_VERSION unchanged from previous build"; \ else \ echo "___STAMP_VERSION changed to $$version"; \ ymd="$$(expr 0 + "$$(TZ=UTC git show --quiet --date='format-local:%Y%m%d' --format=%cd)")" && \ hms="$$(expr 0 + "$$(TZ=UTC git show --quiet --date='format-local:%H%M%S' --format=%cd)")" && \ { \ echo "/* Automatically generated */" && \ echo "" && \ echo "#ifndef ___STAMP_VERSION" && \ echo "#define ___STAMP_VERSION \"$$version\"" && \ echo "#endif" && \ echo "" && \ echo "#ifndef ___STAMP_YMD" && \ echo "#define ___STAMP_YMD $$ymd" && \ echo "#endif" && \ echo "" && \ echo "#ifndef ___STAMP_HMS" && \ echo "#define ___STAMP_HMS $$hms" && \ echo "#endif"; \ } > stamp.h.new && \ mv -f stamp.h.new stamp.h; \ fi; \ else \ echo "Gambit is not being built from a Git clone. Creating empty stamp.h." && \ echo > stamp.h; \ fi stamp-release: @version="$(RELEASE_VERSION)"; \ if [ -n "$$version" ]; then \ echo "___STAMP_RELEASE_VERSION changed to $$version"; \ eval `date -u '+ymd=%Y%m%d hms=%H%M%S'`; \ ymd="$$(expr 0 + $$ymd)"; \ hms="$$(expr 0 + $$hms)"; \ { \ echo "/*" && \ echo " * Time stamp of latest release or \"make dist\". The stamps can be" && \ echo " * overridden by defining the symbols on the C compiler command line," && \ echo " * which is useful when the information reported by the Gambit runtime" && \ echo " * system needs to be a specific time rather than the build time or" && \ echo " * the release time." && \ echo " */" && \ echo "" && \ echo "#ifndef ___STAMP_RELEASE_VERSION" && \ echo "#define ___STAMP_RELEASE_VERSION \"$$version\"" && \ echo "#endif" && \ echo "" && \ echo "#ifndef ___STAMP_RELEASE_YMD" && \ echo "#define ___STAMP_RELEASE_YMD $$ymd" && \ echo "#endif" && \ echo "" && \ echo "#ifndef ___STAMP_RELEASE_HMS" && \ echo "#define ___STAMP_RELEASE_HMS $$hms" && \ echo "#endif"; \ } > stamp-release.h.new && \ mv -f stamp-release.h.new stamp-release.h; \ else \ echo "RELEASE_VERSION environment variable must be set."; \ fi makefile: makefile.in $(rootfromhere)/config.status cd $(rootfromhere) && CONFIG_FILES=$(herefromroot)/$@ CONFIG_HEADERS= ./config.status gambit.h: gambit.h.in $(rootfromhere)/config.status cd $(rootfromhere) && CONFIG_FILES=$(herefromroot)/$@ CONFIG_HEADERS= ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: