Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 470 lines (370 sloc) 14.342 kb
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 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470
# makefile for Gambit-C system.

# Copyright (c) 1994-2012 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@

@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@
DEFS = @DEFS@
LIBS = @LIBS@

GAMBCLIB_DEFS = @GAMBCLIB_DEFS_MF@
LIB_PREFIX = @LIB_PREFIX@
LIB_EXTENSION = @LIB_EXTENSION@
GAMBCLIB = @GAMBCLIB@
GAMBCGSCLIB = @GAMBCGSCLIB@
GAMBCGSILIB = @GAMBCGSILIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIB = @INSTALL_LIB@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
LN_S = @LN_S@
RANLIB = @RANLIB@
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@

# 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 \
relpath

GITRCFILES = .gitignore .gitattributes
HGRCFILES = .hgignore .hgtags

GENDISTFILES =

DISTFILES = $(RCFILES) $(GENDISTFILES)

GITDISTFILES = $(GITRCFILES)
HGDISTFILES = $(HGRCFILES)

#BUILD_FARM = farm
BUILD_FARM = localhost
#BUILD_HOST = baro.iro.umontreal.ca
BUILD_HOST = localhost

.SUFFIXES:

all:

all-pre:

all-post:
test -f "gsc-comp@exe@" || cp gsc/gsc@exe@ gsc-comp@exe@

fake_target:

doc info pdf html txt: fake_target
cd doc && $(MAKE) $(MDEFINES) $@

bootstrap: fake_target all
cp gsc/gsc@exe@ gsc-comp@exe@

check: fake_target all
cd tests && $(MAKE) $(MDEFINES) $@

examples: fake_target all
cd examples && $(MAKE) $(MDEFINES) $@

prebuilt: dist dist-devel
PATH="gsi:$$PATH" prebuilt/remote-connect $(BUILD_FARM) "" "(define tmpdir \"gambtmp0\")(define gambc-dist \"$(PACKAGE_TARNAME)\")(define timeout 600)(ssh timeout (string-append \"rm -rf \" tmpdir \";mkdir \" tmpdir \";echo 'logged in on:';hostname\"))(scp-to timeout (string-append gambc-dist \".tgz\") (string-append tmpdir \"/.\"))(ssh timeout (string-append \"ssh $(BUILD_HOST) 'cd \" tmpdir \";tar zxf \" gambc-dist \".tgz;cd \" gambc-dist \";./configure;make -j 4;mv ../\" gambc-dist \".tgz .;cd prebuilt;make prebuilt'\"))(scp-from timeout (string-append tmpdir \"/\" gambc-dist \"/$(PACKAGE_TARNAME)-*\") \".\")"
@# cd prebuilt && $(MAKE) $(MDEFINES) $@

stamp: fake_target
cd include && $(MAKE) $(MDEFINES) $@

commit: fake_target stamp
@if test "$(RC)" = "$(GIT)"; then \
$(GIT) commit -a; \
else \
$(HG) commit; \
fi

diff: fake_target
@$(RC) diff | cat

log: fake_target
@$(RC) log | cat

status: fake_target
@$(RC) status || :

push: fake_target
@if test "$(RC)" = "$(GIT)"; then \
$(GIT) push git@github.com:feeley/gambit.git; \
else \
$(HG) push; \
fi

pull: fake_target
@if test "$(RC)" = "$(GIT)"; then \
$(GIT) pull; \
$(GIT) fetch --tags; \
else \
$(HG) pull; \
fi

update-nopull: fake_target
@if test "$(RC)" = "$(GIT)"; then \
next_version=`$(GIT) tag | fgrep -e '-bootstrap' | sed -e 's/v//g' -e 's/-bootstrap.*//g' | sort -r -s -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n | sed 's/^/v/g' | sed -n '/^$(PACKAGE_VERSION)/{n;p;}'`; \
else \
next_version=`$(HG) tags | fgrep -e '-bootstrap' | sed -e 's/v//g' -e 's/-bootstrap.*//g' | sort -r -s -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n | sed 's/^/v/g' | sed -n '/^$(PACKAGE_VERSION)/{n;p;}'`; \
fi; \
if test "$$next_version" = ""; then \
if test "$(RC)" = "$(GIT)"; then \
$(GIT) checkout master; \
else \
$(HG) checkout; \
fi; \
else \
$(RC) checkout $$next_version-bootstrap; \
$(MAKE) bootstrap; \
$(RC) checkout $$next_version; \
$(MAKE) bootclean bootstrap update; \
fi

update: pull update-nopull
$(MAKE)

new-major: fake_target
major=`echo $(PACKAGE_VERSION) | sed -e "s/v//g" -e "s/\.[^.]*\.[^.]*//g"`; \
next_major=`eval expr 1 + $$major`; \
next_version=v$$next_major.0.0; \
$(MAKE) NEW_VERSION=$$next_version change-version

new-minor: fake_target
major=`echo $(PACKAGE_VERSION) | sed -e "s/v//g" -e "s/\.[^.]*\.[^.]*//g"`; \
minor=`echo $(PACKAGE_VERSION) | sed -e "s/v[^.]*\.//g" -e "s/\.[^.]*//g"`; \
next_minor=`eval expr 1 + $$minor`; \
next_version=v$$major.$$next_minor.0; \
$(MAKE) NEW_VERSION=$$next_version change-version

new-revision: fake_target
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"`; \
next_revision=`eval expr 1 + $$revision`; \
next_version=v$$major.$$minor.$$next_revision; \
$(MAKE) NEW_VERSION=$$next_version change-version

change-version: fake_target
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"`; \
next_major=`echo $(NEW_VERSION) | sed -e "s/v//g" -e "s/\.[^.]*\.[^.]*//g"`; \
next_minor=`echo $(NEW_VERSION) | sed -e "s/v[^.]*\.//g" -e "s/\.[^.]*//g"`; \
next_revision=`echo $(NEW_VERSION) | sed -e "s/v[^.]*\.[^.]*\.//g" -e "s///g"`; \
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; \
if test "$(RC)" = "$(GIT)"; then \
$(GIT) commit -a -m "[COMPILER CHANGES NEEDED FOR $(NEW_VERSION)] Changed version in compiler"; \
else \
$(HG) commit -m "[COMPILER CHANGES NEEDED FOR $(NEW_VERSION)] Changed version in compiler"; \
fi; \
$(RC) tag $(NEW_VERSION)-bootstrap; \
if $(MAKE) bootstrap; then \
misc/changev $$version_num $$new_version_num; \
touch doc/gambit-c.txi; \
cd tests; @SETDLPATH@ ../gsc/gsc -:~~bin=../bin,~~lib=../lib,~~include=../include -f -c mix.scm; mv mix.c test5.ok; cd ..; \
if $(MAKE) bootclean && $(MAKE) -j 2 && $(MAKE) check && $(MAKE) doc; then \
if test "$(RC)" = "$(GIT)"; then \
$(GIT) commit -a -m "[RUNTIME CHANGES NEEDED FOR $(NEW_VERSION)] Changed version of runtime using misc/changev"; \
else \
$(HG) commit -m "[RUNTIME CHANGES NEEDED FOR $(NEW_VERSION)] Changed version of runtime using misc/changev"; \
fi; \
$(RC) tag $(NEW_VERSION); \
fi; \
fi; \
else \
echo Compiler version in gsc/_parms.scm is inconsistent with PACKAGE_VERSION; \
fi

release: fake_target
$(MAKE) bootstrap
$(MAKE) clean
$(MAKE) all
$(MAKE) check
$(MAKE) doc
rm -f $(PACKAGE_TARNAME).tgz $(PACKAGE_TARNAME)-*.*
$(MAKE) prebuilt

publish-release: fake_target
misc/publish-release $(PACKAGE_VERSION) $(PACKAGE_TARNAME).tgz $(PACKAGE_TARNAME)-*.*

install-pre:
@if test "@ENABLE_SHARED@" = "yes" -a "@ENABLE_ABSOLUTE_SHARED_LIBS@" = "yes" -a "$(DESTDIR)" != ""; then \
echo "*** The use of --enable-shared and --enable-absolute-shared-libs is"; \
echo "*** incompatible with the use of DESTDIR. You can either specify an"; \
echo "*** empty DESTDIR or reconfigure with --disable-absolute-shared-libs."; \
exit 1; \
fi

install-post: all
if test "@ENABLE_MULTIPLE_VERSIONS@" = "yes"; then \
if test "@bat@" = ""; then \
$(srcdirpfx)./mkidirs $(DESTDIR)$(prefix); \
rm -f $(DESTDIR)$(prefix)/../current \
$(DESTDIR)$(prefix)/../current.lnk; \
(cd $(DESTDIR)$(prefix)/.. && $(LN_S) $(PACKAGE_VERSION) current); \
fi; \
fi

uninstall-pre:

uninstall-post:
if test "@ENABLE_MULTIPLE_VERSIONS@" = "yes"; then \
if test "@bat@" = ""; then \
(cd $(DESTDIR)$(prefix)/.. && \
rm -f current && \
rmdir $(PACKAGE_VERSION)); \
fi; \
fi

mostlyclean-pre:

mostlyclean-post:

clean-pre: mostlyclean-pre

clean-post: mostlyclean-post

distclean-pre: clean-pre

distclean-post: clean-post

bootclean-pre: distclean-pre

bootclean-post: distclean-post

realclean-pre: bootclean-pre

realclean-post: bootclean-post
rm -f config.log config.status makefile

rc-setup-pre:
$(RC) init
@if test "$(RC)" = "$(GIT)"; then \
$(GIT) add $(RCFILES) $(GITRCFILES); \
rm -f .git/config; \
echo '[core]' >> .git/config; \
echo ' repositoryformatversion = 0' >> .git/config; \
echo ' fileMode = false' >> .git/config; \
echo ' bare = false' >> .git/config; \
echo ' logallrefupdates = true' >> .git/config; \
echo ' ignorecase = true' >> .git/config; \
echo ' autocrlf = false' >> .git/config; \
echo '[remote "origin"]' >> .git/config; \
echo ' url = git@github.com:feeley/gambit.git' >> .git/config; \
echo ' fetch = +refs/heads/*:refs/remotes/origin/*' >> .git/config; \
echo '[branch "master"]' >> .git/config; \
echo ' remote = origin' >> .git/config; \
echo ' merge = refs/heads/master' >> .git/config; \
else \
$(HG) add $(RCFILES) $(HGRCFILES); \
rm -f .hg/hgrc; \
echo "[paths]" > .hg/hgrc; \
echo "default-push = ssh://gambit@frontal07.iro.umontreal.ca/HTML/repo/gambit" >> .hg/hgrc; \
echo "default = http://www.iro.umontreal.ca/~gambit/repo/gambit/" >> .hg/hgrc; \
fi

rc-setup-post:
@if test "$(RC)" = "$(GIT)"; then \
$(GIT) commit -a -m "Initial commit of $(PACKAGE_STRING)"; \
else \
$(HG) commit -m "Initial commit of $(PACKAGE_STRING)"; \
fi

dist-pre:
rm -rf $(PACKAGE_TARNAME)
mkdir $(PACKAGE_TARNAME)
chmod 777 $(PACKAGE_TARNAME)
@echo " Copying distribution files:"
@for file in $(DISTFILES); do \
echo " $$file"; \
ln $(srcdirpfx)$$file $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p $(srcdirpfx)$$file $(PACKAGE_TARNAME); \
done

dist-post:
tar chof $(PACKAGE_TARNAME).tar $(PACKAGE_TARNAME)
gzip -9 $(PACKAGE_TARNAME).tar
mv $(PACKAGE_TARNAME).tar.gz $(PACKAGE_TARNAME).tgz
rm -rf $(PACKAGE_TARNAME)

dist-devel-pre:
rm -rf $(PACKAGE_TARNAME)
mkdir $(PACKAGE_TARNAME)
chmod 777 $(PACKAGE_TARNAME)
@echo " Copying distribution files:"
@for file in $(DISTFILES); do \
echo " $$file"; \
ln $(srcdirpfx)$$file $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p $(srcdirpfx)$$file $(PACKAGE_TARNAME); \
done
@if test "$(RC)" = "$(GIT)"; then \
for file in $(GITDISTFILES); do \
echo " $$file"; \
ln $(srcdirpfx)$$file $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p $(srcdirpfx)$$file $(PACKAGE_TARNAME); \
done; \
echo " .git"; \
ln $(srcdirpfx).git $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p -R $(srcdirpfx).git $(PACKAGE_TARNAME); \
else \
for file in $(HGDISTFILES); do \
echo " $$file"; \
ln $(srcdirpfx)$$file $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p $(srcdirpfx)$$file $(PACKAGE_TARNAME); \
done; \
echo " .hg"; \
ln $(srcdirpfx).hg $(PACKAGE_TARNAME) 2> /dev/null \
|| cp -p -R $(srcdirpfx).hg $(PACKAGE_TARNAME); \
fi

dist-devel-post:
rm -rf $(PACKAGE_TARNAME)-devel
mv $(PACKAGE_TARNAME) $(PACKAGE_TARNAME)-devel
tar chof $(PACKAGE_TARNAME)-devel.tar $(PACKAGE_TARNAME)-devel
gzip -9 $(PACKAGE_TARNAME)-devel.tar
mv $(PACKAGE_TARNAME)-devel.tar.gz $(PACKAGE_TARNAME)-devel.tgz
rm -rf $(PACKAGE_TARNAME)-devel

all-recursive install-recursive uninstall-recursive mostlyclean-recursive clean-recursive distclean-recursive bootclean-recursive realclean-recursive rc-setup-recursive dist-recursive dist-devel-recursive:
@for subdir in $(SUBDIRS); do \
target=`echo $@ | sed 's/-recursive//'`; \
echo making $$target in $$subdir; \
(cd $$subdir && $(MAKE) $$target) || exit 1; \
done

all: all-post

all-post: all-recursive

all-recursive: all-pre

install: install-post

install-post: install-recursive

install-recursive: install-pre

uninstall: uninstall-post

uninstall-post: uninstall-recursive

uninstall-recursive: uninstall-pre

mostlyclean: mostlyclean-post

mostlyclean-post: mostlyclean-recursive

mostlyclean-recursive: mostlyclean-pre

clean: clean-post

clean-post: clean-recursive

clean-recursive: clean-pre

distclean: distclean-post

distclean-post: distclean-recursive

distclean-recursive: distclean-pre

bootclean: bootclean-post

bootclean-post: bootclean-recursive

bootclean-recursive: bootclean-pre

realclean: realclean-post

realclean-post: realclean-recursive

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

# 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:
Something went wrong with that request. Please try again.