Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/BUILDING,v rcsdiff: /ftp/cvs/cvsroot/src/BUILDING,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.24 retrieving revision 1.32 diff -u -p -r1.24 -r1.32 --- src/BUILDING 2003/01/26 06:19:13 1.24 +++ src/BUILDING 2003/05/10 07:15:53 1.32 @@ -67,8 +67,8 @@ FILES distrib/, etc/ Sources for items used when making a full release snap- - shot, such as files installed in /etc on the destination - system, boot media, and release notes. + shot, such as files installed in DESTDIR/etc on the desti- + nation system, boot media, and release notes. regress/ Regression test harness. Can be cross-compiled, but only run natively. @@ -132,6 +132,9 @@ CONFIGURATION Default: Empty string if USETOOLS is ``yes''; unset other- wise. + Note: build.sh will provide a default of destdir.MACHINE (in + the top-level .OBJDIR) unless run in `expert' mode + MAKECONF The name of the make(1) configuration file. Only settable in the process environment. @@ -151,8 +154,8 @@ CONFIGURATION Default: ``yes'' MKDOC Can be set to ``yes'' or ``no''. Indicates whether system - documentation destined for /usr/share/doc will be installed - during a build. + documentation destined for DESTDIR/usr/share/doc will be in- + stalled during a build. Default: ``yes'' @@ -176,7 +179,7 @@ CONFIGURATION MKLINT Can be set to ``yes'' or ``no''. Indicates whether lint(1) will be run against portions of the NetBSD source code during the build, and whether lint libraries will be installed into - /usr/libdata/lint. + DESTDIR/usr/libdata/lint. Default: ``yes'' @@ -222,10 +225,10 @@ CONFIGURATION code. MKSHARE Can be set to ``yes'' or ``no''. Indicates whether files - destined to reside in /usr/share will be built and installed - during a build. If set to ``no'', then all of MKCATPAGES, - MKDOC, MKINFO, MKMAN, and MKNLS will be set to ``no'' uncon- - ditionally. + destined to reside in DESTDIR/usr/share will be built and in- + stalled during a build. If set to ``no'', then all of + MKCATPAGES, MKDOC, MKINFO, MKMAN, and MKNLS will be set to + ``no'' unconditionally. Default: ``yes'' @@ -328,8 +331,12 @@ CONFIGURATION Default: Unset. + Note: build.sh will provide a default of releasedir (in + the top-level .OBJDIR) unless run in `expert' mode + UPDATE If set, then in addition to the effects described for - UPDATE above, this implies the effects of NOCLEANDIR. + UPDATE above, this implies the effects of NOCLEANDIR + (i.e., ``make cleandir'' is avoided). BUILDING "make" command line options @@ -388,9 +395,9 @@ BUILDING fore any system libraries or programs can be built. install Install programs, libraries, and documentation into DESTDIR. - Few files will be installed to /dev, /etc, /root or /var in - order to prevent user supplied configuration data from being - overwritten. + Few files will be installed to DESTDIR/dev, DESTDIR/etc, + DESTDIR/root or DESTDIR/var in order to prevent user supplied + configuration data from being overwritten. lint Run lint(1) against the C source code, where appropriate, and generate system-installed lint libraries. @@ -410,8 +417,8 @@ BUILDING the proper order. distribution Do a ``make build'', and then install a full distribution - into DESTDIR, including files in /dev, /etc, /root and - /var. + into DESTDIR, including files in DESTDIR/dev, DESTDIR/etc, + DESTDIR/root and DESTDIR/var. buildworld As per ``make distribution'', except that it ensures that DESTDIR is not the root directory. @@ -424,21 +431,25 @@ BUILDING Note: It is highly recommended that you upgrade your kernel and reboot before performing this operation. + sets Create distribution sets from DESTDIR into + RELEASEDIR/MACHINE/binary/sets. Should be run after ``make + distribution'' (as ``make build'' does not install all of + the required files). + + sourcesets Create source sets of the source tree into + RELEASEDIR/source/sets. + release Do a ``make distribution'', build kernels, distribution me- - dia, and install sets, and then package the system into a - standard release layout as described by release(7). This - requires that RELEASEDIR be set (see above). + dia, and install sets (this as per ``make sets''), and then + package the system into a standard release layout as de- + scribed by release(7). This requires that RELEASEDIR be + set (see above). regression-tests Can only be run after building the regression tests in the directory ``regress''. Runs the compiled regression tests on the local host. - sets Create distribution sets from DESTDIR into - RELEASEDIR/MACHINE/binary/sets. Should be run after ``make - distribution'' (as ``make build'' does not install all of - the required files). - The "build.sh" script This script file is a Bourne shell script designed to build the entire NetBSD system on any host with a Bourne shell in /bin/sh, including many @@ -490,6 +501,8 @@ BUILDING sets Perform ``make sets''. + sourcesets Perform ``make sourcesets''. + The following command line options alter the behaviour of the above oper- ations: The following command line options alter the behaviour of the build.sh operations described above: @@ -571,25 +584,30 @@ BUILDING with an absolute path. EXAMPLES - ./build.sh tools kernel=GENERIC - Build a new toolchain, and use the new toolchain to configure - and build a new GENERIC kernel. This is a simpler way to - achieve what the first three examples do. - - ./build.sh -U -D /some/DESTDIR distribution - Using unprivileged mode, build a complete distribution in - /some/DESTDIR. - - # ./build.sh -U -D /some/DESTDIR installworld=/ - As root, install the distribution that was built with unprivi- - leged mode from /some/DESTDIR to /. (Even though this is run - as root, -U is required so that the permissions stored in - /some/DESTDIR/METALOG are correctly applied to the files as - they're copied to /). - - ./build.sh -U -D /some/dir/DESTDIR -R /some/dir/RELEASE release - Using unprivileged mode, build a complete release in - /some/dir/RELEASE. + 1. ./build.sh tools kernel=GENERIC + + Build a new toolchain, and use the new toolchain to configure and + build a new GENERIC kernel. + + 2. ./build.sh -U distribution + + Using unprivileged mode, build a complete distribution to a DESTDIR + directory that build.sh selects (and will display). + + 3. # ./build.sh -U install=/ + + As root, install to / the distribution that was built by example 2. + Even though this is run as root, -U is required so that the permis- + sions stored in DESTDIR/METALOG are correctly applied to the files + as they're copied to /. + + 4. ./build.sh -U -u release + + Using unprivileged mode, build a complete release to DESTDIR and + RELEASEDIR directories that build.sh selects (and will display). + UPDATE (-u) is set to prevent the ``make cleandir'', so that if this + is run after example 2, it doesn't need to redo that portion of the + release build. OBSOLETE VARIABLES NBUILDJOBS Use the make(1) option -j, instead. @@ -608,4 +626,4 @@ HISTORY BUGS A few platforms are not yet using this build system. -NetBSD January 26, 2003 10 +NetBSD May 10, 2003 10