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.71 retrieving revision 1.78.2.3 diff -u -p -r1.71 -r1.78.2.3 --- src/BUILDING 2008/03/29 05:22:42 1.71 +++ src/BUILDING 2009/05/11 19:40:22 1.78.2.3 @@ -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, @@ -181,6 +193,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 +274,19 @@ 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'' + + MKSUBPIXEL Can be set to ``yes'' or ``no''. For X builds, decides if + subpixel rendering code in FreeType is turned on. Turned off + by default because of patent issues. + + 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 +311,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'' @@ -325,6 +355,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. @@ -401,9 +437,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 @@ -612,6 +646,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- @@ -691,14 +727,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 @@ -734,11 +777,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 @@ -752,6 +803,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 @@ -798,24 +852,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). @@ -838,7 +892,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 May 1, 2009 NetBSD