Commit Graph

229 Commits

Author SHA1 Message Date
sborrill 14df52fe64 Add support for CDBUILDEXTRA which acts like CDEXTRA to add extra items
to the CD-ROM image.
Make CDEXTRA and CDBUILDEXTRA be able to contain lists of files and directories
which are added in turn.
Add support for CDEXTRA_SKIP which contains a list of fnmatch(3) items to
skip during the copy. This is _very_ useful for skipping CVS dirs for example.
CDBUILDEXTRA and CDEXTRA_SKIP are to be used in Makefiles creating the images,
CDEXTRA remains to be used from build.sh.
Update documentation and build.sh help text to show that -C can be used to
specify a list of files and directories rather than just a single dir.
2007-11-23 16:19:28 +00:00
uebayasi dfd4cf0aaf Indent. 2007-11-20 01:33:32 +00:00
uebayasi 146861b4fa Sort variable definitions. No functional change expected. 2007-11-20 01:30:07 +00:00
garbled a16fbf9738 remove pmppc as a target 2007-10-17 23:23:02 +00:00
agc f6d990e7e4 Fix a tyop and align properly 2007-09-18 12:57:37 +00:00
jnemeth 0e0996d809 Convert build.sh iso-dir=directory option to -C cddir as per jmmv@ on
source-changes.
2007-09-01 09:32:19 +00:00
jnemeth 3afb399fc8 Add an iso-dir=directory option. When combined with iso-image or
iso-image-source, it will cause directory to be added to the CD-ROM image.
2007-09-01 08:15:27 +00:00
jnemeth a186842ea2 Add an iso-image-source option which does the same thing as iso-image but
includes source sets as well.  The infrastructure for this was already
there, although it needed a bug fix.  Will look at adding arbitrary
directories next.
2007-08-30 05:30:02 +00:00
apb f2b53f1d21 Move several variable initialisations to the beginning of
initdefaults().  This should fix a bug reported by Valeriy E. Ushakov
in which we called setmakevar() before instead of after
initialising makeenv.
2007-06-26 12:59:38 +00:00
apb 97c727e8ec Fix some problems with the change from revision 1.167:
* Allow "" or "." as the last component of PATH, but do not
  allow arbitrary single-character components.
* Make a comment match the code.
2007-04-14 10:50:48 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
apb 4b4de5fa3f Try not to rebuild nbmake so often:
* Add a try_set_TOOLDIR function which tries to be clever about setting
  TOOLDIR if possible;
* Call try_set_TOOLDIR from rebuildmake;
* Add nobomb_getmakevar, which works like raw_getmakevar except
  never bombs;
* Reimplement raw_getmakevar in terms of nobomb_getmakevar;
* Add a second arg to find_in_PATH to control the result when the
  program cannot be found.
2007-04-07 14:49:40 +00:00
dsl af519d4729 Don't abort the build if teh last component of $PATH is . 2007-04-05 10:02:10 +00:00
apb 2347a3fcd8 The "${progname} started: ${build_start}" message will appear in the
"Summary of results", so don't print it again just before that.
2007-04-02 11:00:10 +00:00
apb daaa947e26 * Report the NetBSD version being built.
* Report the host platform.
* Print more of the initial messages in the same part of the code.
2007-04-02 10:57:36 +00:00
apb b6c6d298a0 s/PATH/PATH environment variable" in an error message. 2007-03-25 12:36:01 +00:00
apb cabe8d739b If the PATH contains any components that are not absolute
directory names, print a message and abort.  In expert mode,
downgrade this error to a warning.

Fixes PR 36048
2007-03-25 07:56:38 +00:00
briggs d66d113907 Don't treat -m evbarm like the other arm-based platforms. Set
MACHINE_ARCH only if it's not already set.  This prevents
	build.sh -m evbarm-eb
from ending up with MACHINE_ARCH=arm instead of =armeb (since MACHINE is
stripped of the -eb suffix just above).
2007-02-19 14:20:11 +00:00
apb f7004b0cbc Whenever we try to parse the output from make, run make with the -B
flag.  This ensures that -j<N> isn't accidentally inherited from the
environment, because the "--- foo ---" headers printed with -j<N> would
interfere with parsing the output.
2007-02-05 18:26:01 +00:00
matt 4e9d3760b0 Remove duplicate evbarm-e[bl] cases. Add evbppc64 and macppc64. 2007-01-29 00:08:13 +00:00
matt d9adacfe08 Add evbarm-e[bl] machine aliases for evbarm/armeb and evbarm/arm,
respectively.
2007-01-28 20:15:44 +00:00
apb 90b76996ba Add aliases evbarm-eb and evbarm-el, for consistency with several
existing *-e[bl] aliases.  build.sh -m MACHINE_ALIAS is (almost)
equivalent to build.sh -m MACHINE -a MACHINE_ARCH.
2007-01-27 11:27:33 +00:00
rillig ddda16fb21 Added a friendly error message in case the user forgot to "build.sh tools". 2007-01-17 03:43:18 +00:00
dsl 6875838454 Only cd "$(dirname $0)" when usr.bin/make doesn't exist. This caused grief
when I make my wrapper script source build.sh.  I can also think of other
times when it would be a PITA.
Abort the build if make fails in raw_getmakevar() - as tends to happen when
make itself is badly broken.
2007-01-14 17:02:56 +00:00
ober 02f3407a26 Updated to include the new Zaurus port for ARM.
OK'd by gimpy
2006-12-16 02:59:33 +00:00
dyoung f3fbc3bb0f Change the name of the host disklabel to nbdisklabel-${MAKEWRAPPERMACHINE},
where ${MAKEWRAPPERMACHINE} is the suffix XXX on the target's make
wrapper, nbmake-XXX.

Fixes toolchain/30673, "single arch host disklabel isn't enough".
2006-12-09 20:13:13 +00:00
apb 1889c0e175 Use ${HOST_SH} instead of the host system's /bin/sh wherever possible:
* Try to guess a suitable value for HOST_SH, if it was not set in
  the environment.  First try host-specific heuristics (Solaris has
  /usr/xpg4/bin/sh); then try to find the name of the shell that was used
  to run build.sh itself (by parsing the output from ps -p $$ -o comm);
  then fall back to "sh".

* Having found a value for HOST_SH, copy it to BSHELL and CONFIG_SHELL.

* Use ${HOST_SH} instead of /bin/sh when creating the make wrapper.

* Use ${HOST_SH} instead of unqualified sh when running shell scripts.
2006-09-29 19:53:54 +00:00
uwe 2e25d643b7 Recognize MACHINE=landisk (sh3el). 2006-09-01 21:52:55 +00:00
matt da01e9eb57 When going from -m {evb,sb}mips64-e[bl] to MACHINE,
make sure to remove 64-e[bl] so we wind up with just evbmips or sbmips.
2006-08-27 05:05:05 +00:00
matt 9e051a8002 Add enough configury glue so that src/tools can build a N64 mips toolchain. 2006-08-25 23:35:04 +00:00
jnemeth 252669904e PR/30842 -- compatibility issue with mksh from Thorsten Glaser 2006-08-09 22:13:12 +00:00
mrg d4ce694d06 preliminary support for powerpc64 toolchain:
- allow "-m macppc/evbppc" to also take "-a powerpc64" to build a
  powerpc64 toolchain.

XXX this may change, as an evbppc64 port may be required.
XXX deal with that when we have some code...
2006-06-22 20:00:18 +00:00
dogcow f76552d855 Huzzah. /bin/pwd -P, instead of silently failing, now returns an error code
on many linuces I've tried. If so, bail and invoke /bin/pwd sans argument.
2006-06-19 18:12:30 +00:00
apb fd0db8a416 Fix the iso-image action. These changes were accidentally omitted
from the previous commit.
2006-02-03 12:29:41 +00:00
apb 21078fc390 * Add an "iso-image" target in the top level Makefile,
which invokes make iso-image in the etc directory.
* Add an "iso-image" action in build.sh, which
  invokes make iso-image.
* Document the above in doc/BUILDING.mdoc.
* Re-generate BUILDING.

Approved by christos
2006-01-28 21:34:07 +00:00
dsl 93ab8a734f Use separate invocations of make for cleandir dependall and install of
tools so that a parallel make doesn't start running dependall before
cleandir has finished.
Unfortunately make doesn't support .WAIT on the command line :-(
2006-01-08 11:03:40 +00:00
dsl 20683c5a8c Use parallel makes more often. 2006-01-07 18:45:15 +00:00
apb 026a2bfc50 Add a new "syspkgs" target, which simply chains to the "syspkgs" target
in the top level Makefile.

Reviewed by agc
2006-01-04 15:31:40 +00:00
tsutsui 32af391479 Add ews4800mips to mipseb ports.
Build for ews4800mips might fail (yet),
but please don't complain for now.
2005-12-29 15:38:54 +00:00
jmc ad14f15c1d Nuke LESSCHARSET as well since it affects the output character set of groff 2005-12-12 04:51:55 +00:00
isaki 9265690c77 It needs the braceexpand option for PD KSH, regardless of
whether the host system is OpenBSD.
from Wim Lewis. reviewed by sjg@.
2005-09-25 05:34:21 +00:00
skrll 784c9344e8 Initial pass at an in-tree ia64 toolchain. From PR 29141 with some fixes
from me.
2005-08-17 07:13:32 +00:00
bouyer 44d1677f84 Remove support for build.sh -m xen, this has been merged in the i386
build. Pointed out by Chuck Silvers.
2005-05-29 10:54:40 +00:00
lukem 6ec400133b Unset INFODIR in the makewrapper.
Should fix a build problem observed when installing .info files
when the build user's environment has INFODIR set.
2005-05-19 01:37:30 +00:00
isaki 5067941219 Avoid the brace expansion on OpenBSD.
approved by sjg@.
2005-03-26 06:02:13 +00:00
gavan 0560d8b947 Initial import of iyonix port.
The Iyonix is a desktop machine from Castle Technology, based on a 600MHz
XScale[tm] 80321 processor.

* Uses the bootloader from NetBSD/acorn32, which is now 32-bit compatible.
* Currently boots multiuser with a serial console.
* Device support is not yet complete.

With help from abs.
2004-10-13 23:28:34 +00:00
martin 17cfe6c93e Backout previous on request from mrg - it breaks cross compilation for
sparc64. Matt will recommit a fixed version later.
2004-10-11 06:18:38 +00:00
mrg 57d6df6697 add new ${uname_p} (as `uname -p`).
set ${arches} to "sparc64 sparc" for MACHINE=sparc64.
for 32 bit sparc64 host, default to building 32 bit world (same as native).
2004-10-09 20:38:01 +00:00
junyoung 0220a8417b Remove trailing / in pathname.
From Alan Barrett. See tech-toolchain@ for related discussion.
2004-08-17 14:00:30 +00:00
jmc bd789f7eba Add a change requested in PR#15548 and append the args passed to build.sh
into the comments in the make wrapper.
2004-07-02 04:25:24 +00:00
wiz 40726f5f0d Document -h. From Karsten Kruse in PR 25974. 2004-06-25 15:03:39 +00:00
cl 885c0b6fc9 ``build.sh -m xen-i386 release'' now builds a release for NetBSD/xen
for i386.  The resulting release consists of:
- NetBSD/xen for i386 kernel, loader and docuemntation
- NetBSD/i386 userland sets
2004-05-12 16:56:41 +00:00
lukem d0ca5ded84 Add
-x		set MKX11=yes
	-X x11src	set X11SRCDIR to x11src
2004-02-06 23:19:30 +00:00
lukem c77dab9416 highlight that the noisyless level is the MAKEVERBOSE level 2004-02-04 11:23:40 +00:00
lukem 1710dac7b6 tweak usage message.
when performing "sets", highlight that DESTDIR should be
pre-populated.  suggested by glen mccready.
2003-11-14 12:38:12 +00:00
lukem b60bb5a7dd Now that MKUPDATE and MKUNPRIVED are "normalized" with getmakevar(),
test with  "${MKxxx}" = "no"  instead of  -z "${MKxxx}"

Ignore errors when running pwd -P.  (GNU coreutils incorrectly complains)


Both problems pointed out in private email from Christian Limpach.
2003-11-12 15:51:45 +00:00
lukem f87ba55ff9 Always use `/bin/pwd -P` to get the "TOP" of the source tree, so that
MAKEOBJDIR (and other parameters) work correctly with symlinks, amd(8), etc.
Should fix PR [bin/23313], and possibly others.
2003-10-31 01:46:39 +00:00
lukem 301dd07e78 Explain why make is being rebuilt.
Patch from Hubert Feyrer in [toolchain/23156].
2003-10-26 03:12:21 +00:00
lukem 5daa33014e Improve how build.sh -N and MAKEVERBOSE interoperate;
rather than adding '-s' to make's command line in the makewrapper,
use the .SILENT target based on MAKEVERBOSE's value.

This means that you can do:
	./build.sh -N 1 makewrapper

	$TOOLDIR/bin/nbmake-$MACHINE
	#  runs at MAKEVERBOSE==1, with command lines suppressed

	$TOOLDIR/bin/nbmake-$MACHINE MAKEVERBOSE=2
	#  runs at MAKEVERBOSE==2 for this invocation, with command lines shown
2003-10-26 02:17:46 +00:00
lukem 371e58334b "Normalise" MKOBJDIRS MKUPDATE MKUNPRIVED with getmakevar() before
trying to use them internally to build.sh.
Fixes issue where build.sh would run "make cleandir" if MKUPDATE=yes was
set in mk.conf and -u wasn't given to build.sh.
2003-10-26 02:00:37 +00:00
lukem 070871b5fc Implement build -N noisy, which sets MAKEVERBOSE to noisy and adds
`-s' to MAKEFLAGS for noisy < 2.
2003-10-25 03:46:09 +00:00
matt daa035e3e8 Teach build.sh about the ibmnws port. 2003-10-19 03:37:36 +00:00
lukem e72c726f88 Revert part of previous commit and do NOT explicitly set BSDSRCDIR in the
makewrapper, as doing so can break various builds.

(Setting NETBSDSRCDIR isn't strictly necessary either, but AFAICT, it
shouldn't hurt)
2003-09-24 00:24:53 +00:00
jmmv 0de57ce6ff Set BSDSRCDIR and NETBSDSRCDIR in the make wrapper, so we always get the
right source directories (in case they are defined in mk.conf using '?=').
2003-09-20 10:14:41 +00:00
jmmv 2e336929ff Pass '-de' to make(1) to get the expected behavior ("failed target" and
"failed command" messages).
2003-09-10 18:05:52 +00:00
lukem 58cb3cd0a2 in getkernelconf(), remove check for non-empty $makeobjdir, as it's not
performed elsewhere in similar code, and causes problems if you run "kernel="
without an operation that performs "make obj" in sys/ beforehand.
2003-08-16 11:46:44 +00:00
jmc d9556f9ecc Fix 2 remaining places items are depending on execute permissions coming out
from a cvs checkout on scripts.
2003-08-11 19:26:04 +00:00
sommerfeld 22a1b1038e Improve usage for -U so others won't make the mistake I just made. 2003-08-10 16:20:37 +00:00
lukem 13b0ffec63 Add build.sh -Z var, to unset a variable and ensure it's unset in makewrapper.
For -M MAKEOBJDIRPREFIX, unset MAKEOBJDIR.
For -O MAKEOBJDIR, unset MAKEOBJDIRPREFIX.
2003-07-29 10:07:15 +00:00
lukem 1b9a8aed24 Add missing "cd ${TOP}" to buildtools(). Problem identified by John Nemeth
in private mail.

Remove some debugging messages that crept in a little while ago.
2003-07-28 12:33:42 +00:00
lukem 833a10cf56 * set & export LC_ALL=C, so that end-user use of non `C' LC_COLLATE locales
won't cause expressions such as `echo [0-9a-z]*` to match "CVS"
* add getmakeenv(var, value), and use appropriatly.
2003-07-20 09:26:49 +00:00
lukem 1553f8efd9 Replace UNPRIVED=yes with MKUNPRIVED=yes.
Replace UPDATE=yes with MKUPDATE=yes.
2003-07-18 08:30:07 +00:00
lukem f17ac45381 add "params" operation 2003-07-16 13:21:47 +00:00
lukem ccfdea7ffb Broaden the scope of when "make obj NOSUBDIR=" will be run in tools/
to be at any time that build.sh is run without -o, because we need
the objdir of the top-level to exist if build.sh is going to provide
a default DESTDIR/RELEASEDIR, and with the previous code, if
MAKEOBJDIRPREFIX was used and the objdir of the source tree didn't
exist, build.sh would incorrectly determine the DESTDIR.
(mmm, obscure bugs).
2003-05-26 06:35:17 +00:00
lukem 4e33a0f5d5 all:
*	add "releasekernel=conf", to install a gzipped copy of the kernels
	built by "kernel=conf" to RELEASEDIR/MACHINE/binary/kernel

build.sh:
    *	be more consistent in various status messages
    *	move the {release,}kernel=conf conf parsing code into getkernelconf()
	and use in both buildkernel() and releasekernel()
    *	only warn once when building multiple kernels without updating the tools
2003-05-25 12:34:27 +00:00
lukem 6019a973a8 * Display the start time again just before the end time, to make it
easier to work out how long things took.  Suggested by Alistair Crooks.
* Explicitly display the makewrapper path
2003-05-18 10:57:11 +00:00
lukem e128ff2fcf Change evbsh3 to be like evbmips, in that a default MACHINE_ARCH
won't be provided for a MACHINE of "evbsh3"; the user has to explicitly
use "evbsh3-eb" or "evbsh3-el"
2003-05-17 07:52:52 +00:00
lukem e3fa32ff73 * Display default DESTDIR & RELEASEDIR. (Well, they're actually in
the .OBJDIR of the top of the source tree, but expressing that in 1
  line or less starts to get complicated).   Requested by Hubert.
* When using a -el or -eb MACHINE "shortcut", use that original value
  as the MACHINE for the default makewrapper filename.  Requested by Simon.
2003-05-12 03:01:16 +00:00
lukem 8bced05906 * Add support for MACHINEs: evbmips-eb evbmips-el sbmips-eb sbmips-el
which sets the appropriate MACHINE_ARCH and rewrites MACHINE to lose
  the -e[bl] suffix.
* Don't default to a MACHINE_ARCH for evbmips or sbmips.

Per discussion wth Simon Burge.
2003-05-12 02:33:17 +00:00
lukem b7d3d22051 Add "sourcesets" argument/target, which builds source sets into
RELEASEDIR/source/sets
2003-05-10 07:12:37 +00:00
lukem 9ca2699e2b When providing a default DESTDIR & RELEASEDIR in non-expert mode, add
these to makeenv so that the generated makewrapper contains these settings...
2003-05-09 09:10:06 +00:00
lukem ad89cbfee9 New features:
*	If not expert mode, provide defaults for:
		DESTDIR		/top/of/obj/destdir.${MACHINE}
		RELEASEDIR	/top/of/obj/releasedir
    *	Collate the various status messages output during the run
	and display them at the end in a "summary report".
    *	Cross-check the validity of MACHINE against MACHINE_ARCH.
	Fixes PR [toolchain/20193] from David Maxwell.
    *	Highlight that the tools will be rebuilt if UPDATE isn't set.
    *	Add stronger language recommending against -E unless you
    *	Improve whitespace use in usage()

Code stuff:
    *	Be consistent about using "${var}"
    *	Be more consistent how [ tests ] are run
    *	Improve some comments
    *	Rename getmakevar() to raw_getmakevar()
    *	Rename safe_getmakevar() to getmakevar()
    *	cd back to ${TOP} after a kernel build.
    *	Always keep the tmpdir around for the build (it's where the
	status messages are collated, for one).
2003-05-08 14:19:39 +00:00
christos 985fd8014b CYGWIN needs -X too (John Gordon) 2003-05-08 12:49:45 +00:00
fvdl 796c8a1016 Adapt for x86_64 -> amd64 rename. 2003-04-26 18:42:34 +00:00
thorpej d2809fcf8a Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX. 2003-03-14 05:22:50 +00:00
lukem ea64374119 remove unnecessary message 2003-03-07 01:22:16 +00:00
lukem cfcaeea176 don't print the command & start time until after the options are parsed... 2003-03-04 02:20:28 +00:00
lukem bfc98ff079 Display the build.sh command line and the start & end times.
Based on suggestion from Andrew Brown <atatat@netbsd.org>.
2003-02-18 23:59:06 +00:00
lukem 9fd6e49e07 Enhance "kernel=" to print pathnames of newly built kernels for cut & paste.
(Previously we just printed the build directory.)
2003-02-16 04:35:03 +00:00
enami 561033c00e Consistently, don't expand ${MACHINE} in help message. 2003-02-06 22:19:06 +00:00
lukem e6d083f5b9 another DESTDIR clarification 2003-01-31 01:38:35 +00:00
lukem 1f9a9dde05 add missing usage for "sets" 2003-01-26 13:12:05 +00:00
lukem 4e91f80fa2 - Add "sets" top-level Makefile target and build.sh operation.
[Latter suggested by Julio Merino in private email]
- Add "help" build.sh operation.
2003-01-26 06:19:12 +00:00
lukem 46d44d89e9 Change build.sh so that at least one operation is required.
Add "makewrapper" operation to build.sh.
	[The above changes were suggested by Alan Barrett on current-users@]

Fail if building as non-root unless: UNPRIVED is set, -U is given, or -E
(expert mode) is given.
	[Suggested by James Wetterau in private email]

Improve the examples in BUILDING.
2003-01-26 05:34:32 +00:00
lukem f643db1c84 Can't check if cross building with "install=" until after $MACHINE has
been validated.  Noted by Anthony Mallet on current-users@
2003-01-24 01:17:52 +00:00
lukem 31b7057f61 Rework how build.sh functions, so that command line options set various
parameters, and a list of "operations" defines what to do.
The full usage is show below.  Notes:
	`-b' has been deprecated (it always occurs now)
	`-d' is replaced by "distribution"
	`-R rel' onlys sets RELEASEDIR; use "release" to build a release
	`-k kern' has been replaced by "kernel=kern"
	`-i idir' has been replaced by "install=idir"
	-r now occurs before nbmake is rebuilt

Add a copyright (long due!).  Rework the code to (a KNF inspired) ShellNF.
Use functions appropriately.  Allow `nb' prefix to be easily changed to
something else.  Solve world peace (just kidding)

This is part of the (never achievable) goal of attempting to make
NetBSD easier to build...


  --8<--  new usage follows  --8<--

Usage: build.sh [-EnorUu] [-a arch] [-B buildid] [-D dest] [-j njob] [-M obj]
		[-m mach] [-O obj] [-R release] [-T tools] [-V var=[value]]
		[-w wrapper]   [operation [...] ]

 System build operations (all imply "obj" and "tools"):
    build		Run "make build"
    distribution	Run "make distribution" (includes etc/ files)
    release		Run "make release" (includes kernels & distrib media)

 Other operations:
    obj			Run "make obj" (default unless -o)
    tools 		Build and install tools
    kernel=conf		Build kernel with config file `conf'
    install=idir	Run "make installworld" to `idir'
			(useful after 'distribution' or 'release')

 Options:
    -a arch	Set MACHINE_ARCH to arch (otherwise deduced from MACHINE)
    -B buildId	Set BUILDID to buildId
    -D dest	Set DESTDIR to dest
    -E		Set "expert" mode; disables some DESTDIR checks
    -j njob	Run up to njob jobs in parallel; see make(1)
    -M obj	Set obj root directory to obj (sets MAKEOBJDIRPREFIX)
    -m mach	Set MACHINE to mach (not required if NetBSD native)
    -n		Show commands that would be executed, but do not execute them
    -O obj	Set obj root directory to obj (sets a MAKEOBJDIR pattern)
    -o		Set MKOBJDIRS=no (do not create objdirs at start of build)
    -R release	Set RELEASEDIR to release
    -r		Remove contents of TOOLDIR and DESTDIR before building
    -T tools	Set TOOLDIR to tools.  If unset, and TOOLDIR is not set in
		the environment, nbmake will be (re)built unconditionally.
    -U		Set UNPRIVED
    -u		Set UPDATE
    -V v=[val]	Set variable `v' to `val'
    -w wrapper	Create nbmake script as wrapper
		(default: ${TOOLDIR}/bin/nbmake-${MACHINE})
2003-01-23 16:24:08 +00:00
lukem 6bbdc41e7b reorder usage so that "mutually exclusive build" operations are listed
separately from "set variable" operations, in an attempt to make
build.sh easier to use
2003-01-22 11:26:11 +00:00
lukem 001300d84b 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.
2003-01-15 01:49:03 +00:00
lukem cc3d03cf30 improve usage 2003-01-04 14:55:44 +00:00
lukem a04634dbdf Add "-V var=[value]", for setting arbitrary variables which will also
be added to the nbmake-${MACHINE} wrapper.
Useful for setting RELEASEDIR, without -R's habit of building a release.
2003-01-04 12:55:32 +00:00