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.7 retrieving revision 1.11 diff -u -p -r1.7 -r1.11 --- src/BUILDING 2002/03/04 02:10:02 1.7 +++ src/BUILDING 2002/05/03 08:59:13 1.11 @@ -88,11 +88,37 @@ FILES described in release(7). CONFIGURATION + Environment variables + Several environment variables control the behaviour of NetBSD builds. + + MACHINE Machine type. + + MACHINE_ARCH Machine architecture. + + MAKE Path name to invoke make(1) as. + + MAKEFLAGS Flags to invoke make(1) with. + + MAKEOBJDIR Directory to use as the .OBJDIR for the current direc- + tory. Used only if MAKEOBJDIRPREFIX is not defined. + MAKEOBJDIR can only be provided in the environment. + + MAKEOBJDIRPREFIX Top level directory of the object directory tree. If + this is defined, ${MAKEOBJDIRPREFIX}/${.CURDIR} is used + as the .OBJDIR for the current directory. The current + directory may be read only. MAKEOBJDIRPREFIX can only + be provided in the environment. + "make" variables Several variables control the behavior of NetBSD builds. Unless other- wise specified, these variables may be set in either the process environ- ment or the make(1) configuration file specified by MAKECONF. + BUILDID Identifier for the build. The identifier will be appended to + object directory names, and can be consulted in the make(1) + configuration file in order to set additional build parame- + ters, such as compiler flags. + DESTDIR Directory to contain the built NetBSD system. If set, spe- cial options are passed to the compilation tools to prevent their default use of the host system's /usr/include, @@ -214,10 +240,9 @@ CONFIGURATION UNPRIVED If set, then an unprivileged install will occur. The user, group, permissions, and file flags, will not be set on the installed item; instead the information will be appended to a - file called METALOG in the .OBJDIR of src. The contents of - METALOG is used during the generation of the distribution tar - files to ensure that the appropriate file ownership is - stored. + file called METALOG in DESTDIR. The contents of METALOG is + used during the generation of the distribution tar files to + ensure that the appropriate file ownership is stored. Default: Unset. @@ -262,12 +287,8 @@ CONFIGURATION Default: ``yes'' - NBUILDJOBS If set, specifies the number of parallel make(1) processes - that should be run simultaneously. This can speed up - builds on SMP machines, or machines with much more CPU - power than I/O availability. This should be used instead - of the make(1) option -j, in order to ensure proper order- - ing of build components. + NBUILDJOBS Now obsolete. Use the make(1) option -j, instead (see be- + low) Default: Unset. @@ -309,6 +330,12 @@ BUILDING This is only a summary of options available to make(1); only the options used most frequently with NetBSD builds are listed here. + -j njob Run up to njob make(1) subjobs in parallel. Makefiles should + use .WAIT or have explicit dependancies as necessary to en- + force build ordering. If you see build failures with -j, + please save complete build logs so the failures can be ana- + lyzed. + -m dir Specify the default directory for searching for system Make- file segments, mainly the files. When building any full NetBSD source tree, this should be set to the @@ -348,8 +375,8 @@ BUILDING dependency changes. dependall Does a ``make depend'' immediately followed by a ``make all''. - This combined target recurses as an atomic unit, so that the - ``make depend'' phase can participate in make -j parallelism. + This improves cache locality of the build since both passes + read the source files in their entirety. includes Build and install system header files. Typically needed be- fore any system libraries or programs can be built. @@ -404,6 +431,12 @@ BUILDING -a arch Set the value of MACHINE_ARCH to arch. + -B buildid + Set the value of BUILDID to buildid. This will also append the + build idenfitier to the name of the ``make'' wrapper script so + that the resulting name is of the form ``nbmake-MACHINE- + BUILDID''. + -b Bootstrap ``make'' and create a nbmake-MACHINE script (see be- low). @@ -412,9 +445,10 @@ BUILDING build a ``release''; no release sets are placed in ${RE- LEASEDIR}. - -j njob Set the value of NBUILDJOBS to njob. This provides similar - functionality to the familiar ``make -j'', but preserves the - ordering of the top level ``make build''. + -j njob Passed through to make(1). Makefiles should use .WAIT or have + explicit dependancies as necessary to enforce build ordering. + If you see build failures with -j, please save complete build + logs so the failures can be analyzed. -m mach Set the value of MACHINE to mach. This will also override any value of MACHINE_ARCH in the process environment with a value @@ -471,6 +505,9 @@ BUILDING This script can be symlinked into a directory listed in PATH, or called with an absolute path. +OBSOLETE VARIABLES + NBUILDJOBS Now obsolete. Use the make(1) option -j, instead. + SEE ALSO make(1), hier(7), release(7) @@ -479,6 +516,6 @@ HISTORY current'' development sources between NetBSD 1.5 and NetBSD 1.6. BUGS - Many platforms are not yet using the USE_NEW_TOOLCHAIN system. + A few platforms are not yet using the USE_NEW_TOOLCHAIN system. -NetBSD March 4, 2002 8 +NetBSD May 3, 2002 8