Skip to content

Commit

Permalink
0.8alpha.0.32:
Browse files Browse the repository at this point in the history
	Improvements in build technology:
	... detect and choose GNUMAKE earlier, once and only once.
	... provide recompile and use-anyway restarts for warm load.
  • Loading branch information
csrhodes committed May 16, 2003
1 parent 8e11355 commit df679ed
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 41 deletions.
3 changes: 1 addition & 2 deletions make-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ if [ "$sbcl_arch" = "x86" ] ; then
elif [ "$sbcl_arch" = "mips" ] ; then
# Use a little C program to try to guess the endianness. Ware
# cross-compilers!
gnumake=${GNUMAKE:-gmake}
$gnumake -C tools-for-build determine-endianness
$GNUMAKE -C tools-for-build determine-endianness
tools-for-build/determine-endianness >> $ltf
else
# Nothing need be done in this case, but sh syntax wants a placeholder.
Expand Down
27 changes: 4 additions & 23 deletions make-target-1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@

echo //entering make-target-1.sh

# the GNU dialect of "make" -- easier to find or port it than to
# try to figure out how to port to the local dialect...
if [ "$GNUMAKE" != "" ] ; then
# The user is evidently trying to tell us something.
gnumake="$GNUMAKE"
elif [ -x "`which gmake`" ] ; then
# "gmake" is the preferred name in *BSD.
gnumake=gmake
else
# All the world's a Linux, and all its users weary of cautious
# BSDish worries that "make" might not be GNU make; and at this
# point we've already spent quite a while in make-host-1.sh, so
# they're naturally unamused when we bail out complaining we don't
# know where GNU make is. So since it's not really any worse to guess
# wrong here than to fail by not trying, just guess that "make" is
# GNU make and hope for the best.
gnumake=make
fi

# Build the runtime system and symbol table (.nm) file.
#
# (This C build has to come after the first genesis in order to get
Expand All @@ -43,14 +24,14 @@ fi
# doesn't matter.)
echo //building runtime system and symbol table file
cd src/runtime
$gnumake clean || exit 1
$gnumake depend || exit 1
$gnumake all || exit 1
$GNUMAKE clean || exit 1
$GNUMAKE depend || exit 1
$GNUMAKE all || exit 1
cd ../..

# Use a little C program to grab stuff from the C header files and
# smash it into Lisp source code.
cd tools-for-build
$gnumake grovel_headers || exit 1
$GNUMAKE grovel_headers || exit 1
cd ..
tools-for-build/grovel_headers > output/stuff-groveled-from-headers.lisp
4 changes: 1 addition & 3 deletions make-target-contrib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit
SBCL_BUILDING_CONTRIB=1
export SBCL SBCL_BUILDING_CONTRIB

gnumake=${GNUMAKE:-gmake}

mkdir -p contrib/systems
rm -f contrib/systems/*

Expand All @@ -37,5 +35,5 @@ for i in contrib/*; do
test -d $i && test -f $i/Makefile || continue;
# export INSTALL_DIR=$SBCL_HOME/`basename $i `
test -f $i/test-passed && rm $i/test-passed
$gnumake -C $i test && touch $i/test-passed
$GNUMAKE -C $i test && touch $i/test-passed
done
28 changes: 27 additions & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
# when you have weird things in your .cmucl-init file
# "openmcl --batch"
# to use an OpenMCL binary as a cross-compilation host
# "clisp"
# to use a CLISP binary as a cross-compilation host
#
# FIXME: Make a more sophisticated command line parser, probably
# accepting "sh make.sh --xc-host foolisp" instead of the
Expand All @@ -60,6 +62,29 @@ SBCL_XC_HOST="${1:-sbcl --noprogrammer}"
export SBCL_XC_HOST
echo //SBCL_XC_HOST=\"$SBCL_XC_HOST\"

# the GNU dialect of "make" -- easier to find or port it than to
# try to figure out how to port to the local dialect...
if [ "$GNUMAKE" != "" ] ; then
# The user is evidently trying to tell us something.
GNUMAKE="$GNUMAKE"
elif [ -x "`which gmake`" ] ; then
# "gmake" is the preferred name in *BSD.
GNUMAKE=gmake
else
# FIXME: Now that we do this early, maybe prompt the user rather
# than guessing? I'd still be annoyed, though... -- CSR,
# 2003-05-16.
#
# All the world's a Linux, and all its users weary of cautious
# BSDish worries that "make" might not be GNU make; so just guess
# that "make" is GNU make and hope for the best.
GNUMAKE=make
fi

export GNUMAKE
echo //GNUMAKE=\"$GNUMAKE\"


# If you're cross-compiling, you should probably just walk through the
# make-config.sh script by hand doing the right thing on both the host
# and target machines.
Expand All @@ -77,7 +102,8 @@ sh make-config.sh || exit 1
# identify the target architecture).
# On the host system:
# SBCL_XC_HOST=<whatever> sh make-host-1.sh
# Copy src/runtime/sbcl.h from the host system to the target system.
# Copy src/runtime/genesis/*.h from the host system to the target
# system.
# On the target system:
# sh make-target-1.sh
# Copy src/runtime/sbcl.nm and output/stuff-groveled-from-headers.lisp
Expand Down
43 changes: 32 additions & 11 deletions src/cold/warm.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,38 @@

(let ((fullname (concatenate 'string stem ".lisp")))
(sb-int:/show "about to compile" fullname)
(multiple-value-bind
(compiled-truename compilation-warnings-p compilation-failure-p)
(compile-file fullname)
(declare (ignore compilation-warnings-p))
(sb-int:/show "done compiling" fullname)
(cond (compilation-failure-p
(error "COMPILE-FILE of ~S failed." fullname))
(t
(unless (load compiled-truename)
(error "LOAD of ~S failed." compiled-truename))
(sb-int:/show "done loading" compiled-truename))))))
(flet ((report-recompile-restart (stream)
(format stream "Recompile file ~S" src))
(report-continue-restart (stream)
(format stream "Continue, using possibly bogus file ~S" obj)))
(tagbody
retry-compile-file
(multiple-value-bind (output-truename warnings-p failure-p)
(compile-file fullname)
(declare (ignore warnings-p))
(sb-int:/show "done compiling" fullname)
(cond ((not output-truename)
(error "COMPILE-FILE of ~S failed." src))
(failure-p
(unwind-protect
(restart-case
(error "FAILURE-P was set when creating ~S."
obj)
(recompile ()
:report report-recompile-restart
(go retry-compile-file))
(continue ()
:report report-continue-restart
(setf failure-p nil)))
;; Don't leave failed object files lying around.
(when (and failure-p (probe-file output-truename))
(delete-file output-truename)
(format t "~&deleted ~S~%" output-truename))))
;; Otherwise: success, just fall through.
(t nil))
(unless (load output-truename)
(error "LOAD of ~S failed." output-truename))
(sb-int:/show "done loading" compiled-truename))))))

;;;; setting package documentation

Expand Down
2 changes: 1 addition & 1 deletion version.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
"0.8alpha.0.31"
"0.8alpha.0.32"

0 comments on commit df679ed

Please sign in to comment.