forked from mighty-gerbils/gerbil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ./configure, doc/configure-and-make.org
* ./configure && make && make install
- Loading branch information
Showing
5 changed files
with
3,624 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Makefile Template for Gerbil | ||
# Tangled using Org Mode (C-c C-v t) from doc/configure.org | ||
# $ tangle() { | ||
# emacs --batch -l org --eval "(org-babel-tangle-file \"$1\")" | ||
# } | ||
# $ tangle doc/configure.org | ||
|
||
# Copyright (c) 2019 by drewc <[email protected]>, All Rights Reserved. | ||
|
||
# The Makefile is generated by running ./configure | ||
|
||
PACKAGE_SHORTNAME = @PACKAGE_SHORTNAME@ | ||
PACKAGE_NAME = @PACKAGE_NAME@ | ||
PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
PACKAGE_STRING = @PACKAGE_STRING@ | ||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
|
||
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@ | ||
|
||
LIBS = @LIBS@ | ||
|
||
gerbil_home = "${DESTDIR}/${prefix}/lib/${PACKAGE_SHORTNAME}" | ||
gerbil_bin = "${gerbil_home}/bin" | ||
gerbil_lib = "${gerbil_home}/lib" | ||
gerbil_bin_linkdir = "${DESTDIR}/${prefix}/bin" | ||
|
||
|
||
gerbil: ensure-gx-version | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh | ||
|
||
ensure-gx-version: | ||
echo "(define (gerbil-version-string) \"$(PACKAGE_STRING)\")" \ | ||
> ./src/gerbil/runtime/gx-version.scm ; | ||
|
||
stdlib: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh stdlib | ||
|
||
lang: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh lang | ||
|
||
|
||
r7rs-large: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh r7rs-large | ||
|
||
tools: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh tools | ||
|
||
stage0: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh stage0 | ||
|
||
stage1: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh stage1 | ||
|
||
layout: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh layout | ||
|
||
tags: | ||
cd src && LDFLAGS="$(LIBS)" ./build.sh tags | ||
|
||
install: | ||
# Symlinks | ||
mkdir -p ${gerbil_bin} ; | ||
mkdir -p ${gerbil_lib} ; | ||
cp -a bin/* ${gerbil_bin} ; | ||
cp -a lib/* ${gerbil_lib} ; | ||
@for i in `find ${gerbil_bin} -type f` ; do \ | ||
_name=`basename $$i`;\ | ||
_link="${gerbil_bin_linkdir}/$$_name" ; \ | ||
mkdir -p "${gerbil_bin_linkdir}"; \ | ||
if test -f $$_link ; then rm "$$_link" ; fi ;\ | ||
echo "Linking $$_link to $$i"; \ | ||
ln -sr $$i "$$_link" ; \ | ||
done ; | ||
|
||
|
||
uninstall: | ||
# Symlinks | ||
@for i in `find ${gerbil_bin} -type f` ; do \ | ||
_name=`basename $$i`;\ | ||
_link="${gerbil_bin_linkdir}/$$_name" ; \ | ||
if test -L $$_link && test $$(dirname `readlink $$_link`) = ${gerbil_bin}; then \ | ||
echo removing "$$_link" ; rm "$$_link" ; elif test -f "$$_link" ; then echo $$_link is not a link to $$i. Not removing. ; fi ; \ | ||
done ; | ||
|
||
rm -rf ${gerbil_home}; | ||
|
||
test: | ||
echo $(LIBS) ; |
Oops, something went wrong.