Better solution to using "$platform" -- do that only in DO_BUILD.

This commit is contained in:
Eli Barzilay 2012-01-18 06:28:12 -05:00
parent 50dba41043
commit cfa5938092

View File

@ -74,7 +74,7 @@ defbuild() {
# entries, with misc fields set. Machines and platforms must be unique. The # entries, with misc fields set. Machines and platforms must be unique. The
# "D" first entry is for default field values (missing default makes the field # "D" first entry is for default field values (missing default makes the field
# required). Warning: an `eval "foo=\"bar\""' is used to assign values. # required). Warning: an `eval "foo=\"bar\""' is used to assign values.
msets "/machines/D" "platform=" "workdir=/var/tmp" "moveto=" "copytobak=" \ msets "/machines/D" "workdir=/var/tmp" "moveto=" "copytobak=" \
"configure_args=" "LDFLAGS=" "ext_lib_paths=" "renice=" \ "configure_args=" "LDFLAGS=" "ext_lib_paths=" "renice=" \
"more_setup_args=" "test_gui=" "more_setup_args=" "test_gui="
# defbuild "ccs-solaris" "sparc-solaris" "moveto=/proj/racket" \ # defbuild "ccs-solaris" "sparc-solaris" "moveto=/proj/racket" \
@ -1166,11 +1166,14 @@ DO_COPY_BUILD() { # inputs -- machine-name (for ssh)
## ============================================================================ ## ============================================================================
DO_BUILD() { # inputs -- releasing DO_BUILD() { # inputs -- releasing
## -------------------------------------------------------------------------- ## --------------------------------------------------------------------------
releasing="$1"; shift releasing="$1"; shift
machineget platform workdir moveto copytobak \ machineget platform workdir moveto copytobak \
configure_args ext_lib_paths renice more_setup_args test_gui configure_args ext_lib_paths renice more_setup_args test_gui
if [[ "${machine:-$workmachine}" != "$workmachine" ]]; then
if [[ "$platform" = "" ]]; then machine_suffix=" [$machine]"
else machine_suffix=" [$machine($platform)]"; fi
fi
header -s "Starting build" header -s "Starting build"
@ -2202,19 +2205,13 @@ if [[ "$1" = "--dispatch" ]]; then
shift shift
while [[ "$1" = *"="* ]]; do eval "export $1"; shift; done while [[ "$1" = *"="* ]]; do eval "export $1"; shift; done
machine="$1"; go="$2"; shift 2 machine="$1"; go="$2"; shift 2
init_repo_vars # set the repository variables according to the env vars init_repo_vars # set the repository variables according to the env vars
machineget platform # set the global platform for dependable script pieces show "Working on $machine, dispatching to $go($*)"
if [[ "${machine:-$workmachine}" != "$workmachine" ]]; then
if [[ "$platform" = "" ]]; then machine_suffix=" [$machine]"
else machine_suffix=" [$machine($platform)]"; fi
fi
if [[ "$platform" = "" ]]; then show "Working on $machine"
else show "Working on $machine($platform)"; fi
show "Dispatching to $go($*)"
"$go" "$@" "$go" "$@"
show "Done working on $machine($platform)" if [[ "x$platform" = "x"]]; then show "Done working on $machine"
else show "Done working on $machine($platform)"; fi
elif [[ "$scriptlog" = "yes" ]]; then elif [[ "$scriptlog" = "yes" ]]; then
show "Working on $machine($platform)" show "Working on $machine"
rm -f "$maindir/$scriptlogfile" rm -f "$maindir/$scriptlogfile"
{ echo "This is the build log, generated by $buildscript"; echo "" { echo "This is the build log, generated by $buildscript"; echo ""
echo "Search for \"BOOM\" for any errors."; echo "" echo "Search for \"BOOM\" for any errors."; echo ""
@ -2228,7 +2225,7 @@ elif [[ "$scriptlog" = "yes" ]]; then
MAIN "$@" 2>&1 | tee -a "$maindir/$scriptlogfile" MAIN "$@" 2>&1 | tee -a "$maindir/$scriptlogfile"
fi fi
else else
show "Working on $machine($platform)" show "Working on $machine"
MAIN "$@" MAIN "$@"
fi fi