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.70 retrieving revision 1.81 diff -u -p -r1.70 -r1.81 --- src/BUILDING 2008/03/28 05:23:44 1.70 +++ src/BUILDING 2008/11/15 11:27:50 1.81 @@ -108,17 +108,21 @@ CONFIGURATION MAKEOBJDIR Directory to use as the .OBJDIR for the current direc- tory. The value is subjected to variable expansion by - make(1). Used only if MAKEOBJDIRPREFIX is not defined. - MAKEOBJDIR can only be provided in the environment or - via the -O flag of build.sh. + make(1). Typical usage is to set this variable to a + value involving the use of `${.CURDIR:S...}' or + `${.CURDIR:C...}', to derive the value of .OBJDIR from + the value of .CURDIR. Used only if MAKEOBJDIRPREFIX is + not defined. MAKEOBJDIR can be provided only in the + environment or via the -O flag of build.sh; it cannot + usefully be set inside a Makefile. MAKEOBJDIRPREFIX Top level directory of the object directory tree. If specified, must be an absolute path. If this is defined, ${MAKEOBJDIRPREFIX}/${.CURDIR} is used as the .OBJDIR for the current directory. The current direc- - tory may be read only. MAKEOBJDIRPREFIX can only be - provided in the environment or via the -M flag of - build.sh. + tory may be read only. MAKEOBJDIRPREFIX can be pro- + vided only in the environment or via the -M flag of + build.sh; it cannot usefully be set inside a Makefile. "make" variables Several variables control the behavior of NetBSD builds. Unless other- @@ -130,6 +134,14 @@ CONFIGURATION configuration file in order to set additional build parame- ters, such as compiler flags. + BUILDSEED GCC uses random numbers when compiling C++ code. This vari- + able seeds the gcc random number generator using the -fran- + dom-seed flag with this value. By default, it is set to + NetBSD-(majorversion). Using a fixed value causes C++ bina- + ries to be the same when built from the same sources. Addi- + tional information is available in the GCC documentation of + -frandom-seed. + 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, @@ -153,12 +165,24 @@ CONFIGURATION MAKEVERBOSE Level of verbosity of status messages. Supported values: - 0 No descriptive messages are shown. + 0 No descriptive messages or commands executed by make(1) + are shown. - 1 Descriptive messages are shown. + 1 Brief messages are shown describing what is being done, + but the actual commands executed by make(1) are not dis- + played. + + 2 Descriptive messages are shown as above (prefixed with a + `#'), and ordinary commands performed by make(1) are + displayed. + + 3 In addition to the above, all commands performed by + make(1) are displayed, even if they would ordinarily + have been hidden through use of the ``@'' prefix in the + relevant makefile. - 2 Descriptive messages (prefixed with a `#') and command - output is not suppressed. + 4 In addition to the above, commands executed by make(1) + are traced through use of the sh(1) ``-x'' flag. Default: 2 @@ -181,6 +205,11 @@ CONFIGURATION Default: ``yes'' + MKHTML Can be set to ``yes'' or ``no''. Indicates whether prefor- + matted HTML manual pages will be built and installed + + Default: ``yes'' + MKHOSTOBJ Can be set to ``yes'' or ``no''. If set to ``yes'', then for programs intended to be run on the compile host, the name, release, and architecture of the host operating system will @@ -257,6 +286,13 @@ CONFIGURATION Default: ``yes'' + MKSTRIPIDENT + Can be set to ``yes'' or ``no''. Indicates whether program + binaries and shared libraries should be built to include RCS + IDs for use with ident(1). + + Default: ``no'' + MKTTINTERP Can be set to ``yes'' or ``no''. For X builds, decides if the TrueType bytecode interpreter is turned on. See http://www.freetype.org/patents.html for details. @@ -281,7 +317,7 @@ CONFIGURATION Default: ``no'' - MKX11 Can be set to ``yes'' or ``no''. Indicates whether X11R6 is + MKX11 Can be set to ``yes'' or ``no''. Indicates whether X11 is built from X11SRCDIR. Default: ``no'' @@ -314,7 +350,10 @@ CONFIGURATION build or runtime problems when building the whole NetBSD source tree. - Default: ``yes'' + Default: ``yes'', unless TOOLCHAIN_MISSING is set to ``yes''. + + USETOOLS is also set to ``no'' when using outside + the NetBSD source tree. X11SRCDIR Directory containing the X11R6 source. If specified, must be an absolute path. The main X11R6 source is found in @@ -322,6 +361,12 @@ CONFIGURATION Default: ``/usr/xsrc'' + X11FLAVOUR The style of X11 cross-built, set to either ``Xorg'' or + ``XFree86''. + + Default: ``Xorg'' on amd64, i386, macppc, shark and sparc64 + platforms, ``XFree86'' on everything else. + "make" variables for full builds These variables only affect the top level ``Makefile'' and do not affect manually building subtrees of the NetBSD source code. @@ -398,9 +443,7 @@ BUILDING -j njob Run up to njob make(1) subjobs in parallel. Makefiles should use .WAIT or have explicit dependencies as necessary to - enforce build ordering. If you see build failures with -j, - please save complete build logs so the failures can be ana- - lyzed. + enforce build ordering. -m dir Specify the default directory for searching for system Make- file segments, mainly the files. When building any @@ -609,6 +652,8 @@ BUILDING makewrapper Create the nbmake-MACHINE wrapper. This operation is auto- matically performed for any of the other operations. + cleandir Perform ``make cleandir''. + obj Perform ``make obj''. tools Build and install the host tools from src/tools. This com- @@ -688,14 +733,21 @@ BUILDING -h Print a help message. -j njob Run up to njob make(1) subjobs in parallel; passed through to - make(1). Makefiles should use .WAIT or have explicit dependan- - cies as necessary to enforce build ordering. If you see build - failures with -j, please save complete build logs so the fail- - ures can be analyzed. - - -M obj Set MAKEOBJDIRPREFIX to obj. If a relative path is specified, - it will be converted to an absolute path before being used. - Unsets MAKEOBJDIR. + make(1). If you see failures for reasons other than running + out of memory while using build.sh with -j, please save com- + plete build logs so the failures can be analyzed. + + To achieve the fastest builds, -j values between (1 + the num- + ber of CPUs) and (2 * the number of CPUs) are recommended. Use + lower values on machines with limited memory or I/O bandwidth. + + -M obj Set MAKEOBJDIRPREFIX to obj. For instance, if the source + directory is /usr/src, a setting of ``-M /usr/obj'' will place + build-time files under /usr/obj/usr/src/bin, + /usr/obj/usr/src/lib, /usr/obj/usr/src/usr.bin, and so forth. + If a relative path is specified, it will be converted to an + absolute path before being used. Unsets MAKEOBJDIR. See ``-O + -obj'' for more information. -m mach Set the value of MACHINE to mach, except in some special cases listed below. This will also override any value of @@ -731,11 +783,19 @@ BUILDING -n''. -O obj Create an appropriate transform macro for MAKEOBJDIR that will - place the built object files under obj. If a relative path is - specified, it will be converted to an absolute path before - being used. For instance, a setting of /usr/obj will place - build-time files under /usr/obj/bin, /usr/obj/lib, - /usr/obj/usr.bin, and so forth. Unsets MAKEOBJDIRPREFIX. + place the built object files under obj. For instance, a set- + ting of ``-O /usr/obj'' will place build-time files under + /usr/obj/bin, /usr/obj/lib, /usr/obj/usr.bin, and so forth. If + a relative path is specified, it will be converted to an abso- + lute path before being used. Unsets MAKEOBJDIRPREFIX. + + In normal use, exactly one of the -M or -O options should be + specified. If neither -M nor -O is specified, then a default + object directory will be chosen according to rules in + . Relying on this default is not recommended + because it is determined by complex rules that are influenced + by the values of several variables and by the location of the + source directory. -o Set the value of MKOBJDIRS to ``no''. Otherwise, it will be automatically set to ``yes''. This default is opposite to the @@ -749,6 +809,9 @@ BUILDING (provides a clean starting point). This will skip deleting DESTDIR if building on a native system to the root directory. + -S seed Change the value of BUILDSEED to seed. This should rarely be + necessary. + -T tools Set the value of TOOLDIR to tools. If a relative path is spec- ified, it will be converted to an absolute path before being used. If set, the bootstrap ``make'' will only be rebuilt if @@ -795,24 +858,24 @@ BUILDING with an absolute path. EXAMPLES - 1. % ./build.sh tools kernel=GENERIC + 1. % ./build.sh [options] 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 + 2. % ./build.sh [options] -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=/ + 3. # ./build.sh [options] -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 + 4. % ./build.sh [options] -U -u release Using unprivileged mode, build a complete release to DESTDIR and RELEASEDIR directories that build.sh selects (and will display). @@ -835,7 +898,4 @@ HISTORY The build.sh based build scheme was introduced for NetBSD 1.6 as USE_NEW_TOOLCHAIN, and re-worked to TOOLCHAIN_MISSING after that. -BUGS - A few platforms are not yet using this build system. - -NetBSD March 18, 2008 NetBSD +NetBSD September 10, 2008 NetBSD