1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
|
# makefile for Gambit-C system.
# Copyright (c) 1994-2008 by Marc Feeley, All Rights Reserved.
PACKAGE_SHORTNAME = @PACKAGE_SHORTNAME@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_SUBDIR = @PACKAGE_SUBDIR@
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
srcdirpfx = @srcdirpfx@
C_COMPILER = @C_COMPILER@
C_PREPROC = @C_PREPROC@
FLAGS_OBJ = @FLAGS_OBJ@
FLAGS_DYN = @FLAGS_DYN@
FLAGS_LIB = @FLAGS_LIB@
FLAGS_EXE = @FLAGS_EXE@
DEFS = @DEFS@
LIBS = @LIBS@
GAMBCLIB = @GAMBCLIB@
GAMBCCOMPLIB = @GAMBCCOMPLIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIB = @INSTALL_LIB@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LN_S = @LN_S@
RANLIB = @RANLIB@
HG = @HG@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = $(prefix)$(PACKAGE_SUBDIR)/include
libdir = $(prefix)$(PACKAGE_SUBDIR)/lib
bindir = $(prefix)$(PACKAGE_SUBDIR)/bin
docdir = $(prefix)$(PACKAGE_SUBDIR)/doc
infodir = $(prefix)$(PACKAGE_SUBDIR)/info
emacsdir = $(prefix)$(PACKAGE_SUBDIR)/share/emacs/site-lisp
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this makefile.
# To change the values of `make' variables: instead of editing makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
MDEFINES = prefix=$(prefix) exec_prefix=$(exec_prefix) \
includedir=$(includedir) libdir=$(libdir) \
bindir=$(bindir) docdir=$(docdir) \
infodir=$(infodir) emacsdir=$(emacsdir)
SUBDIRS = include lib gsi gsc bin misc doc tests examples prebuilt
RCFILES = README INSTALL.txt LICENSE-2.0.txt LGPL.txt \
makefile.in configure configure.ac config.guess config.sub install-sh mkidirs \
.hgignore .hgtags
GENDISTFILES =
DISTFILES = $(RCFILES) $(GENDISTFILES)
.SUFFIXES:
all: all-pre all-recursive all-post
all-pre:
all-post:
fake_target:
doc info pdf html txt: fake_target
cd doc && $(MAKE) $(MDEFINES) $@
bootstrap: fake_target all
cp gsc/gsc gsc-comp
check: fake_target all
cd tests && $(MAKE) $(MDEFINES) $@
examples: fake_target all
cd examples && $(MAKE) $(MDEFINES) $@
prebuilt: fake_target dist
cd prebuilt && $(MAKE) $(MDEFINES) $@
stamp: fake_target
cd include && $(MAKE) $(MDEFINES) $@
commit: fake_target stamp
$(HG) commit
update-nopull: fake_target
next_version=`hg tags | sed -n -e '/$(PACKAGE_VERSION) /{g;1!p;};h' | sed -e 's/\([^ ]*\)-bootstrap.*/\1/'`; \
next_version=`hg tags | sed -n -e '/$(PACKAGE_VERSION) /{g;1!p;};h' | grep -e 'v.*-bootstrap' | sed -e 's/\([^ ]*\)-bootstrap.*/\1/'`; \
if test "$$next_version" = ""; then \
$(HG) update; \
else \
$(HG) update -r $$next_version-bootstrap; \
$(MAKE) bootstrap; \
$(HG) update -r $$next_version; \
$(MAKE) clean bootstrap update; \
fi
update: fake_target
$(HG) pull
$(MAKE) update-nopull
$(MAKE)
new-major: fake_target
major=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\1&"`; \
next_major=`eval expr 1 + $$major`; \
next_version=v$$next_major.0.0; \
$(MAKE) $(MDEFINES) NEW_VERSION=$$next_version change-version
new-minor: fake_target
minor=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\2&"`; \
next_minor=`eval expr 1 + $$minor`; \
next_version=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&v\1.$$next_minor.0&"`; \
$(MAKE) $(MDEFINES) NEW_VERSION=$$next_version change-version
new-revision: fake_target
revision=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\3&"`; \
next_revision=`eval expr 1 + $$revision`; \
next_version=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&v\1.\2.$$next_revision&"`; \
$(MAKE) $(MDEFINES) NEW_VERSION=$$next_version change-version
change-version: fake_target
major=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\1&"`; \
minor=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\2&"`; \
revision=`echo $(PACKAGE_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\3&"`; \
next_major=`echo $(NEW_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\1&"`; \
next_minor=`echo $(NEW_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\2&"`; \
next_revision=`echo $(NEW_VERSION) | sed -e"s&v\([^.]*\)\.\([^.]*\)\.\([^.]*\).*&\3&"`; \
version_num=`eval expr "\( 100000 \\* $$major \) + \( 1000 \\* $$minor \) + $$revision"`; \
new_version_num=`eval expr "\( 100000 \\* $$next_major \) + \( 1000 \\* $$next_minor \) + $$next_revision"`; \
sed -e "/(define (compiler-version) $$version_num)/s/$$version_num/$$new_version_num/" gsc/_parms.scm > gsc/_parms.scm-new; \
if ! diff gsc/_parms.scm gsc/_parms.scm-new > /dev/null; then \
mv gsc/_parms.scm-new gsc/_parms.scm; \
$(HG) commit -m "[COMPILER CHANGES NEEDED FOR $(NEW_VERSION)] Changed version in compiler"; \
$(HG) tag $(NEW_VERSION)-bootstrap; \
if $(MAKE) $(MDEFINES) bootstrap; then \
misc/changev $$version_num $$new_version_num; \
cd tests; ../gsc/gsc -:=.. -f -c mix.scm; mv mix.c test5.ok; cd ..; \
if $(MAKE) $(MDEFINES) clean && $(MAKE) $(MDEFINES) -j 2 && $(MAKE) $(MDEFINES) check && $(MAKE) $(MDEFINES) doc; then \
$(HG) commit -m "[RUNTIME CHANGES NEEDED FOR $(NEW_VERSION)] Changed version of runtime using misc/changev"; \
$(HG) tag $(NEW_VERSION); \
fi; \
fi; \
else \
echo Compiler version in gsc/_parms.scm is inconsistent with PACKAGE_VERSION; \
fi
release: fake_target
$(MAKE) $(MDEFINES) bootstrap
$(MAKE) $(MDEFINES) mostlyclean
$(MAKE) $(MDEFINES) all
$(MAKE) $(MDEFINES) check
$(MAKE) $(MDEFINES) doc
# $(HG) tag $(PACKAGE_VERSION)
rm -f $(PACKAGE_TARNAME).tgz $(PACKAGE_TARNAME)-*.*
$(MAKE) $(MDEFINES) prebuilt
publish-release: fake_target
misc/publish-release $(PACKAGE_VERSION) $(PACKAGE_TARNAME).tgz $(PACKAGE_TARNAME)-*.*
install-pre:
install-post: all
rm -f $(prefix)/current $(prefix)/current.lnk
if test "@bat@" = ""; then \
(cd $(prefix) && $(LN_S) .$(PACKAGE_SUBDIR) current); \
fi
uninstall-pre:
uninstall-post:
rm -f $(prefix)/current $(prefix)/current.lnk
mostlyclean-pre:
mostlyclean-post:
clean-pre: mostlyclean-pre
clean-post: mostlyclean-post
distclean-pre: clean-pre
distclean-post: clean-post
rm -f makefile config.cache config.h config.log config.status
realclean-pre: distclean-pre
realclean-post: distclean-post
hg-setup-pre:
$(HG) init
$(HG) add $(RCFILES)
rm -f .hg/hgrc
echo "[paths]" > .hg/hgrc
echo "default-push = ssh://gambit@trex.iro.umontreal.ca/HTML/repo/gambit" >> .hg/hgrc
echo "default = http://www.iro.umontreal.ca/~gambit/repo/gambit/" >> .hg/hgrc
hg-setup-post:
$(HG) commit --message "Initial commit of $(PACKAGE_STRING)"
all-recursive install-recursive uninstall-recursive mostlyclean-recursive clean-recursive distclean-recursive realclean-recursive hg-setup-recursive:
@for subdir in $(SUBDIRS); do \
target=`echo $@ | sed 's/-recursive//'`; \
echo making $$target in $$subdir; \
(cd $$subdir && $(MAKE) $$target) || exit 1; \
done
install: install-pre install-recursive install-post
uninstall: uninstall-pre uninstall-recursive uninstall-post
mostlyclean: mostlyclean-pre mostlyclean-recursive mostlyclean-post
clean: clean-pre clean-recursive clean-post
distclean: distclean-pre distclean-recursive distclean-post
realclean: realclean-pre realclean-recursive realclean-post
hg-setup: hg-setup-pre hg-setup-recursive hg-setup-post
dist: fake_target
rm -rf $(PACKAGE_TARNAME)
mkdir $(PACKAGE_TARNAME)
chmod 777 $(PACKAGE_TARNAME)
@for subdir in $(SUBDIRS); do \
echo making $@ in $$subdir; \
mkdir $(PACKAGE_TARNAME)/$$subdir; \
chmod 777 $(PACKAGE_TARNAME)/$$subdir; \
(cd $$subdir && $(MAKE) $(MDEFINES) $@) || exit 1; \
done
@echo "Copying distribution files"
@for file in $(DISTFILES); do \
ln $(srcdirpfx)$$file $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p $(srcdirpfx)$$file $(PACKAGE_TARNAME); \
done
ln $(srcdirpfx).hg $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p -R $(srcdirpfx).hg $(PACKAGE_TARNAME); \
chmod -R a+r $(PACKAGE_TARNAME)
tar chof $(PACKAGE_TARNAME).tar $(PACKAGE_TARNAME)
gzip -9 $(PACKAGE_TARNAME).tar
mv $(PACKAGE_TARNAME).tar.gz $(PACKAGE_TARNAME).tgz
rm -rf $(PACKAGE_TARNAME)
# For an explanation of the following makefile rules, see node
# `Automatic Remaking' in GNU Autoconf documentation.
makefile: makefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
config.status: configure
./config.status --recheck
configure: configure.ac
cd $(srcdir) && autoconf configure.ac > configure && chmod 755 configure
# 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:
|