# init.sh -- Initialization of global variables, processing of # the configuration file, selection of a Lisp binary to use, ... # # Part of clbuild by Luke Gorrie and contributors. system_dir="$BASE/systems" source_dir="$BASE/source" target_dir="$BASE/target" if [ "$CLNET_USER" == "" ]; then CLNET_USER=:pserver:anonymous:anonymous fi export CLNET_USER if test x`uname -o 2>/dev/null` = xCygwin; then windowsp=1 else windowsp="" fi source "$BASE/clbuild.conf.default" if test -f "$BASE/clbuild.conf"; then source "$BASE/clbuild.conf" fi # Fix up pathnames make_absolute_pn() { if [ -n "$1" ] ; then (cd "$BASE" echo "$(cd "$(dirname "$1")" ; pwd)/$(basename "$1")") fi } case $UPDATE_SCRIPT in update_project) # okay, new name ;; update.sh) # old name UPDATE_SCRIPT=update_project ;; *) # do will still want this? UPDATE_SCRIPT="$(make_absolute_pn "$UPDATE_SCRIPT")" ;; esac USER_INIT="$(make_absolute_pn "$USER_INIT")" if test -n "$windowsp" -a x$USER_INIT = x/dev/null; then USER_INIT=NUL fi # CLIM configuration case x$CLIM_BACKEND in xgraphic-forms|xgtkairo|xbeagle) EXTRA_CLIM_FEATURES="(pushnew :clim-$CLIM_BACKEND *features*)" maybe_load_clx="nil" ;; x|xclx) EXTRA_CLIM_FEATURES="nil" maybe_load_clx="(unless (find-package :xlib) (asdf:operate 'asdf:load-op :clx))" ;; *) echo "invalid $CLIM_BACKEND, see clbuild.conf.default for examples." 1>&2 exit 1 ;; esac if test -n "$windowsp"; then system_namestring="`cygpath -m $system_dir`/" source_namestring="`cygpath -m $source_dir`/" target_namestring="`cygpath -m $target_dir`/" self="c:/cygwin/bin/bash $self" else system_namestring="$system_dir/" source_namestring="$source_dir/" target_namestring="$target_dir/" fi set_central_registry="(setq asdf:*central-registry* '(#p\"${system_namestring}\"))" if [ ! -z $CCL ]; then # # OpenMCL # lisp=$CCL noinform="-Q" end_toplevel_options="" #fixme quit="(ccl:quit)" eval="--eval" require_asdf="(require :asdf)" core_option="-I" if test x"$USER_INIT" = x/dev/null; then # -l /dev/null does not work common_options="-n" elif test -n "$USER_INIT"; then common_options="-n -l $USER_INIT" else common_options="" fi # fixme: this doesn't quite match the SBCL version yet: build_options="$noinform --batch $common_options" run_options="--batch $common_options" elif [ ! -z $CLISP ]; then # # CLISP # echo '*** Using CLISP. Please note that CLISP support is not complete.' lisp="$CLISP -repl" noinform="" #fixme end_toplevel_options="" #fixme quit="(ext:quit)" eval="-x" require_asdf="(load \"$BASE/source/asdf-for-clisp/asdf.lisp\")" core_option="-M" if test -n "$USER_INIT"; then common_options="-norc -i $USER_INIT" else common_options="" fi build_options="-on-error exit $common_options" run_options="-on-error exit $common_options" if test -d "$BASE/source/asdf-for-clisp"; then echo "*** asdf checkout found" echo else echo "NEW checking out asdf for use with clisp" (cd "$BASE/source" && cvs -d ${SF_USER}@sbcl.cvs.sourceforge.net:/cvsroot/sbcl co -d asdf-for-clisp sbcl/contrib/asdf) fi else # # SBCL # if [ ! -z "$SBCL" ]; then lisp=$SBCL elif [ -x ${target_dir}/bin/sbcl ]; then export SBCL_HOME=${target_namestring}lib/sbcl/ lisp="${target_dir}/bin/sbcl" if ! test -f "$BASE"/monster.core; then lisp="$lisp --core ${target_namestring}lib/sbcl/sbcl.core" fi else lisp=sbcl fi noinform="--noinform" end_toplevel_options="--end-toplevel-options" quit="(sb-ext:quit)" eval="--eval" require_asdf="(require :asdf)" core_option="--core" if test -n "$USER_INIT"; then common_options="--userinit $USER_INIT" else common_options="" fi build_options="$noinform --noprint --disable-debugger $common_options" run_options="--disable-debugger $common_options" fi