From: Chris Hanson Date: Fri, 6 Nov 2009 22:01:45 +0000 (-0800) Subject: Adjust script so that MIT_SCHEME_EXE is just the executable name, not X-Git-Tag: 20100708-Gtk~258 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4128ff2ff3223bec50d3e0ce0ce70a9853c418c9;p=mit-scheme.git Adjust script so that MIT_SCHEME_EXE is just the executable name, not a partial shell command. Figure out stage library directory using wildcard, since it now has an arch-specific suffix. Allow override of default stage0 dirs. --- diff --git a/etc/run-three-stages b/etc/run-three-stages index 3f7659e73..6d8a03844 100755 --- a/etc/run-three-stages +++ b/etc/run-three-stages @@ -48,11 +48,11 @@ fi case $(uname -s) in Darwin) - DEFAULT_STAGE0=macosx + : {DEFAULT_STAGE0:=macosx} : ${COPY:="cp -pR"} ;; Linux) - DEFAULT_STAGE0=linux + : {DEFAULT_STAGE0:=linux} : ${COPY:="cp -a"} ;; *) @@ -67,10 +67,10 @@ run_stage () local STAGE=stage${N} echo "**************** ${STAGE} ****************" - export MIT_SCHEME_EXE=$(find_stage stage$((N-1))) - rm -rf "${STAGE}" - ${COPY} src "${STAGE}" - (set -e; cd "${STAGE}"; ./Setup.sh; ./configure; make) + find_stage stage$((N-1)) + rm -rf ${STAGE} + ${COPY} src ${STAGE} + (set -e; cd ${STAGE}; ./Setup.sh; ./configure; make) if ! [[ -f ${STAGE}/lib/all.com ]]; then echo "${STAGE} failed" exit 1 @@ -92,7 +92,8 @@ find_build_stage () { local STAGE=$(pwd)/${1} if [[ -x ${STAGE}/microcode/scheme && ${STAGE}/lib/all.com ]]; then - echo "${STAGE}/microcode/scheme --library ${STAGE}/lib" + export MIT_SCHEME_EXE=${STAGE}/microcode/scheme + export MITSCHEME_LIBRARY_PATH=${STAGE}/lib return 0 else return 1 @@ -102,8 +103,10 @@ find_build_stage () find_dist_stage () { local STAGE=$(pwd)/${1} - if [[ -x ${STAGE}/bin/scheme && -f ${STAGE}/lib/mit-scheme/all.com ]]; then - echo "${STAGE}/bin/scheme --library ${STAGE}/lib/mit-scheme" + local LIBDIR=${STAGE}/lib/mit-scheme* + if [[ -x ${STAGE}/bin/mit-scheme && -f ${LIBDIR}/all.com ]]; then + export MIT_SCHEME_EXE=${STAGE}/bin/mit-scheme + export MITSCHEME_LIBRARY_PATH=${LIBDIR} return 0 else return 1