Exit from Bash build script if 'customizations.lisp' isn't present

Change extension of build script to denote usage of bash-isms.

More portabily use any `bash` found in PATH rather than relying on
absolute location (c.f. FreeBSD).
parent e11eab54
......@@ -121,11 +121,13 @@ debug process.
Building from Lisp
------------------
Building from a Lisp is the most venerable and untested way of
building ABCL. It produces a "non-standard" version of the
distribution that doesn't share build instructions with the previous
two methods, but it still may be of interest to those who absolutely
don't want to know anything about Java.
Building from another Common Lisp implementation is the most venerable
and least tested way of building ABCL. It produces a "non-standard"
version of the distribution that doesn't share build instructions with
the previous two methods, but it still may be of interest to those who
absolutely don't want to know anything about Java. The other Common
Lisp implementation does not actually perform any compliation, but is
merely used to orchestrate the invocation of tools in the JDK.
First, copy the file 'customizations.lisp.in' to 'customization.lisp',
in the directory containing this README file, editing to suit your
......@@ -135,16 +137,21 @@ Java Development Kit. Underneath the directory referenced by the
value of '*JDK*' there should be an executable Java compiler in
'bin/javac' ('bin/javac.exe' under Windows).
Then, one may either use the 'build-from-lisp.sh' shell script or load
Then, one may either use the 'build-from-lisp.bash' shell script or load
the necessary files into your Lisp image by hand.
** Using the 'build-from-lisp.sh' script
** Using the 'build-from-lisp.bash' script
Under UNIX-like systems, you may simply invoke the
'build-from-lisp.sh' script as './build-from-lisp.sh
<lisp-of-choice>', e.g.
Under UNIX-like systems, one may simply invoke the
'build-from-lisp.bash' script. As noted above, one must first copy the
'customizations.lisp.in' file to 'customizations.lisp', then edit it
to reflect the local configuration most importantly the path to the
Java Development Kit.
unix$ ./build-from-lisp.sh sbcl
After configuring 'customizations.lisp', the following would use SBCL
as the compilation driver to build ABCL:
unix$ ./build-from-lisp.bash sbcl
After a successful build, you may use 'abcl' ('abcl.bat' on Windows)
to start ABCL. Note that this wrappers contain absolute paths, so
......@@ -152,18 +159,18 @@ you'll need to edit them if you move things around after the build.
If you're developing on ABCL, you may want to use
unix$ ./build-from-lisp.sh <implementation> --clean=nil
unix$ ./build-from-lisp.bash <implementation> --clean=nil
to not do a full rebuild.
In case of failure in the javac stage, you might try this:
unix$ ./build-from-lisp.sh <implementation> --full=t --clean=t --batch=nil
unix$ ./build-from-lisp.bash <implementation> --full=t --clean=t --batch=nil
This invokes javac separately for each .java file, which avoids running
into limitations on command line length (but is a lot slower).
** Building from another Lisp by hand
** Building from another Lisp manually
There is also an ASDF definition in 'abcl.asd' for the BUILD-ABCL
which can be used to load the necessary Lisp definitions, after which
......
#!/bin/bash
#!/usr/bin/env bash
# $Id$
#
# Build ABCL from a supported Lisp
usage()
{
echo "$0 <implementation> [[ --clean=T | --full=T | --batch=NIL ]]"
echo "WARNING: This build method can produce slightly different results than"
echo " the canonical Ant build method."
echo
echo "USAGE:"
echo "$0 <implementation> [[ --clean=T | --full=T | --batch=NIL ]]"
}
if [ -z "$1" ]; then
......@@ -64,6 +68,18 @@ done
FORM="(build-abcl:build-abcl :clean $CLEAN :full $FULL :batch $BATCH)"
FILE="build-abcl.lisp"
if [[ ! -r customizations.lisp ]]; then
cat <<-EOF
Failed to find configuration in 'customizations.lisp'. Please copy
'customizations.lisp.in' to 'customizations.lisp', editing it to
reflect local configuration.
EOF
exit 1
fi
abcl()
{
......@@ -131,4 +147,4 @@ case "$IMPL" in
echo "Error: Unrecognized implementation: $IMPL"
exit 1
;;
esac
\ No newline at end of file
esac
......@@ -680,7 +680,7 @@ will compile (if necessary) and load JSS.
<include name="test/**"/>
<include name="build-from-lisp.sh"/>
<include name="build-from-lisp.bash"/>
<!-- The remainder of these files are used by the Lisp hosted
build in 'build-abcl.lisp' but not used by Ant, so include
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment