Commit Graph

200 Commits

Author SHA1 Message Date
apb e746baefad "\t" does not represent a tab in sed regular expressions,
so use a ${tab} variable instead.  This bug was found by
Jeremy C. Reed.
2009-01-03 08:23:00 +00:00
apb c89f08d79b Add support for new MAKEVERBOSE levels 3 and 4. The complete list is now:
0   Minimal output ("quiet")
 1   Describe what is occurring
 2   Describe what is occurring and echo the actual command
 3   Ignore the effect of the "@" prefix in make commands
 4   Trace shell commands using the shell's -x flag

The default remains MAKEVERBOSE=2.
2008-11-13 20:40:11 +00:00
apb 9af4e3ff5b Try harder to guess the correct TOOLDIR.
Adapted from a proposal by Izumi Tsutsui in tech-toolchain.
2008-10-26 23:40:06 +00:00
lukem 36e7d1970c Remove support for printing "'-x' has been replaced by 'xxxxx'".
The old option hasn't worked since 2003/01/23 (before NetBSD 2.0.)
2008-08-22 23:41:24 +00:00
lukem 8ee8058e34 Fix "-n releasekernel=..."
Patch from Jukka Salmi in PR 33096.
2008-08-18 06:40:09 +00:00
lukem e8d2dcc221 Implement "cleandir". Inspired by PR 39362.
Consistently expand tabs in the usage.
2008-08-18 05:26:05 +00:00
lukem e33cf6cb97 Determine top-level objdir from the environment $MAKEOBJDIRPREFIX early on,
and store in the (non-exported) $TOP_objdir.
(We can't do the same for the environment $MAKEOBJDIR since it may contain
make(1) expressions that aren't easily parseable by sh(1))
Remember appropriate variations of '-M modp' and '-O mod' in $TOP_objdir
(replacing $makeobjdir misuse).
Use $TOP_objdir when trying to guess the TOOLDIR,
and when detecting if the top-level objdir needs to be created.
Fixes problems observed when testing fixes for PR 39360 and 39361.

Fix the TOOLDIR path used when guessing the TOOLDIR.
PR 39360 from Andrew Cagney <cagney@gnu.org>

Use stricter result checking from make(1) when guessing the TOOLDIR.
PR 39361 from Andrew Cagney <cagney@gnu.org>
2008-08-16 00:10:04 +00:00
lukem 095e5fa04c crank copyright 2008-08-15 22:22:15 +00:00
apb 553ee2109e Don't bomb if we can't detect the top level obj directory name.
Apparently there are things you can do in the environment or mk.conf
to set your object directory in a way that the previous code couldn't
detect.  (This is an interim measure until we can properly detect and
create the top level object directory in all cases.)
2008-08-08 07:30:42 +00:00
apb 1b101ece85 If neither -M nor -O was specified, but the source directory is
/usr/src, then try to figure out what object directory would be chosen
by bsd.obj.mk, and pre-create it.
2008-08-05 22:35:32 +00:00
perry b1d7b7c21a Builds now use "BUILDSEED" so that c++ binaries are reproduceable.
By default BUILDSEED is set to NetBSD-{majorversion} -- a -S flag may
be used to change it.

Discussed on tech-toolchain.
2008-08-05 19:43:33 +00:00
dyoung a475a8844f Make build.sh -C work as advertised. 2008-06-27 21:38:36 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
dholland fc5b5e6ac9 The phase of the build that -u prevents is "make cleandir", not merely
"make clean"; adjust build.sh's usage message to reflect this.
2008-03-28 04:24:18 +00:00
lukem bf66c8a26c Obtain RELEASEMACHINEDIR from the make environment.
Display the path to the binary set dir upon completion of "sets".
2008-03-16 07:52:59 +00:00
apb 56467d7fb7 * Installing as non-root is a bad idea. Print a warning in expert mode,
or bomb in non-expert mode.
* If a previous build.sh run with the -U (unprivileged) flag created a
  METALOG, then subsequent build.sh runs must also specify the -U flag.
  In expert mode, this is just a warning.
* While I was here, changed spaces to tabs in one existing line.
2008-02-25 11:14:31 +00:00
matt b1a0879c83 sh5 is dead. sh[35]e[bl] -> sh3e[bl] 2008-02-03 06:10:53 +00:00
jmmv 26f9a12859 Add ofppc64 as a machine target for the tools alongside evbppc64 and macppc64
that are already there (even if not useful for anything else, AFAIK).
2008-01-18 09:45:05 +00:00
simonb d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
garbled 8797c0442b Add rs6000 to this file so it can be easily cross-built. 2007-12-17 19:23:44 +00:00
jnemeth b38a821a97 Delete mention of 'iso-dir=cdextras'. This was a leftover from
the original implementation of cdextra as an operation instead of
a being paramater.
2007-11-23 19:38:43 +00:00
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