Subject: CVS commit: src
To: None <source-changes@netbsd.org>
From: Luke Mewburn <lukem@netbsd.org>
List: source-changes
Date: 01/15/2003 03:49:04
Module Name:	src
Committed By:	lukem
Date:		Wed Jan 15 01:49:03 UTC 2003

Modified Files:
	src: build.sh

Log Message:
Improvements from Alan Barrett (in private email), with minor tweaking:
(Thanks Alan!)

* Before attempting to use KERNOBJDIR, we now need to "make obj" in
  ${KERNSRCDIR}/${KERNARCHDIR}/compile, not in ${TOP}/etc as used to be
  the case.

* Fix one place where getmakevar was invoked unconditionally.  It needs
  to be conditional on $runcmd != "echo", so that we can rely on the
  existence of the new $make executable.

* Add a sanity check to getmakevar, to bomb if a similar error is
  introduced in the future.

* Changed the bomb function to print to stderr instead of to stdout, and
  to kill the top level shell process.  Without this, an attempted bomb
  from inside getmakevar did not work properly.

* Moved some duplicated code into a new safe_getmakevar function, which
  calls getmakevar if that is safe, or else emits a literal '$' followed
  by the variable name.

Improvements from me:

* Always 'trap "exit 1" 1 2 3 15', so the kill in bomb() doesn't cause ugly
  output.


To generate a diff of this commit:
cvs rdiff -r1.81 -r1.82 src/build.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.