2 # A simple shell-script to run the freshly build SBCL without
5 # This software is part of the SBCL system. See the README file for
8 # This software is derived from the CMU CL system, which was
9 # written at Carnegie Mellon University and released into the
10 # public domain. The software is in the public domain and is
11 # provided with absolutely no warranty. See the COPYING and CREDITS
12 # files for more information.
19 [ -x "$1"/src
/runtime
/sbcl
-a -f "$1"/output
/sbcl.core
];
22 # OSX 10.8 readlink doesn't have -f
23 while [ -h "$this" ]; do
24 # Stop resolving symlinks when $this lives in a build tree.
25 # (Build trees might consist of symlinks to something that doesn't
26 # follow our repo layout.)
27 if build_directory_p
`dirname "$this"`; then
30 # [ -h should guarantee that readlink output will be non-null
31 link
=`readlink -n "$this"`
33 if expr "$link" : '^/.*' > /dev
/null
; then
36 this
=`dirname "$this"`/"$link"
39 BASE
=`dirname "$this"`
40 # BASE can still be relative if $0 is a relative pathname naming a
41 # non-symlink, or if the last symlink visited in that loop has a
42 # relative target. We need BASE to be an absolute pathname in order to
43 # make MODULE-PROVIDE-CONTRIB work throughout the Lisp session, even
44 # after frobbing *DEFAULT-PATHNAME-DEFAULTS*.
45 if expr "$BASE" : '^/.*' > /dev
/null
; [ $?
!= 0 ]; then
46 BASE
=`cd "$BASE" && pwd`
57 echo "usage: run-sbcl.sh sbcl-options*"
59 echo "Runs SBCL from the build directory or binary tarball without need for"
60 echo "installation. Except for --help, accepts all the same command-line options"
68 if [ "$CORE_DEFINED" = "no" ]; then
69 CORE
="$BASE"/output
/sbcl.core
72 if [ -d "$BASE"/android-libs
]; then
73 export LD_LIBRARY_PATH
="$BASE"/android-libs
76 if build_directory_p
"$BASE"; then
78 if [ "$CORE_DEFINED" = "no" ]; then
79 SBCL_HOME
="$BASE"/obj
/sbcl-home
exec "$BASE"/src
/runtime
/sbcl
--core "$CORE" "$@"
81 SBCL_HOME
="$BASE"/obj
/sbcl-home
exec "$BASE"/src
/runtime
/sbcl
"$@"
84 echo "No built SBCL here ($BASE): run 'sh make.sh' first!"