Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src BUILDING: update from canonical mk.conf(5)
details: https://anonhg.NetBSD.org/src/rev/6d957a279a88
branches: trunk
changeset: 376211:6d957a279a88
user: lukem <lukem%NetBSD.org@localhost>
date: Sun Jun 04 20:08:21 2023 +0000
description:
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
diffstat:
BUILDING | 862 ++++++++++++++++++++++++++++++++---------------------
doc/BUILDING.mdoc | 555 +++++++++++++++++++++++++---------
2 files changed, 925 insertions(+), 492 deletions(-)
diffs (truncated from 2105 to 300 lines):
diff -r c39b4406438a -r 6d957a279a88 BUILDING
--- a/BUILDING Sun Jun 04 20:04:52 2023 +0000
+++ b/BUILDING Sun Jun 04 20:08:21 2023 +0000
@@ -18,14 +18,8 @@ REQUIREMENTS
FILES
Source tree layout
- doc/BUILDING.mdoc
- This document (in -mdoc troff format; the original copy).
-
- BUILDING This document (in plaintext).
-
- tools/compat/README
- Special notes for cross-hosting a NetBSD build on non-
- NetBSD platforms.
+ BUILDING This document (in plaintext). Generated from
+ doc/BUILDING.mdoc.
Makefile The main Makefile for NetBSD; should only be run for
native builds with an appropriately up-to-date version of
@@ -51,18 +45,26 @@ FILES
Makefile semantics when building these programs for a
native host.
+ distrib/, etc/
+ Sources for items used when making a full release
+ snapshot, such as files installed in DESTDIR/etc on the
+ destination system, boot media, and release notes.
+
+ doc/BUILDING.mdoc
+ This document, in -mdoc troff format; the original copy.
+ Used to generate BUILDING.
+
external, sys/external
Sources and build infrastructure for components imported
(mostly) unchanged from upstream maintainers, sorted by
applicable license. This is (slowly) replacing the
crypto/dist, dist, and gnu/dist directories.
- distrib/, etc/
- Sources for items used when making a full release
- snapshot, such as files installed in DESTDIR/etc on the
- destination system, boot media, and release notes.
+ external/mit/xorg/
+ "Reachover" build structure for modular Xorg; the source
+ is in X11SRCDIR.
- tests/, regress/
+ regress/, tests/
Regression test harness. Can be cross-compiled, but only
run natively. tests/ uses the atf(7) test framework;
regress/ contains older tests that have not yet been
@@ -74,15 +76,15 @@ FILES
This has a special method of determining out-of-date
status.
- bin/ ... usr.sbin/
+ tools/compat/README
+ Special notes for cross-hosting a NetBSD build on non-
+ NetBSD platforms.
+
+ Other directories including bin/ ... usr.sbin/
Sources to the NetBSD userland (non-kernel) programs. If
any of these directories are missing, they will be skipped
during the build.
- external/mit/xorg/
- "Reachover" build structure for modular Xorg; the source
- is in X11SRCDIR.
-
Build tree layout
The NetBSD build tree is described in hier(7), and the release layout is
described in release(7).
@@ -91,393 +93,555 @@ CONFIGURATION
Environment variables
Several environment variables control the behaviour of NetBSD builds.
- HOST_SH Path name to a shell available on the host system and
- suitable for use during the build. The NetBSD build
- system requires a modern Bourne-like shell with POSIX-
- compliant features, and also requires support for the
- "local" keyword to declare local variables in shell
- functions (which is a widely-implemented but non-
- standardised feature).
+ HOST_CC Path name to C compiler used to create the toolchain.
+
+ HOST_CFLAGS Flags passed to the host C compiler.
- Depending on the host system, a suitable shell may be
- /bin/sh, /usr/xpg4/bin/sh, /bin/ksh (provided it is a
- variant of ksh that supports the "local" keyword, such
- as ksh88, but not ksh93), or /usr/local/bin/bash.
+ HOST_CXX Path name to C++ compiler used to create the toolchain.
+
+ HOST_CXXFLAGS Flags passed to the host C++ compiler.
- Most parts of the build require HOST_SH to be an
- absolute path; however, build.sh allows it to be a
- simple command name, which will be converted to an
- absolute path by searching the PATH.
+ HOST_SH Path name to a shell available on the host system and
+ suitable for use during the build. The NetBSD build
+ system requires a modern Bourne-like shell with POSIX-
+ compliant features, and also requires support for the
+ "local" keyword to declare local variables in shell
+ functions (which is a widely-implemented but non-
+ standardised feature).
- HOST_CC Path name to C compiler used to create the toolchain.
-
- HOST_CFLAGS Flags passed to the host C compiler.
+ Depending on the host system, a suitable shell may be
+ /bin/sh, /usr/xpg4/bin/sh, /bin/ksh (provided it is a
+ variant of ksh that supports the "local" keyword, such
+ as ksh88, but not ksh93), or /usr/local/bin/bash.
- HOST_CXX Path name to C++ compiler used to create the toolchain.
-
- HOST_CXXFLAGS Flags passed to the host C++ compiler.
+ Most parts of the build require HOST_SH to be an
+ absolute path; however, build.sh allows it to be a
+ simple command name, which will be converted to an
+ absolute path by searching the PATH.
INSTALLBOOT_UBOOT_PATHS
- A colon-separated list of search paths used by
- installboot(8) to find U-Boot packages.
+ A colon-separated list of search paths used by
+ installboot(8) to find U-Boot packages.
- MACHINE Machine type, e.g., "macppc".
+ MACHINE Machine type, e.g., "macppc".
- MACHINE_ARCH Machine architecture, e.g., "powerpc".
+ MACHINE_ARCH Machine architecture, e.g., "powerpc".
- MAKE Path name to invoke make(1) as.
+ MAKE Path name to invoke make(1) as.
- MAKECONF The name of the make(1) configuration file. See "make"
- variables and mk.conf(5).
+ MAKECONF The name of the make(1) configuration file. See "make"
+ variables and mk.conf(5).
- Note: Only settable in the process environment.
+ Note: Only settable in the process environment.
- Default: "/etc/mk.conf"
+ Default: "/etc/mk.conf"
+
+ MAKEFLAGS Flags to invoke make(1) with.
- MAKEFLAGS Flags to invoke make(1) with. Note that build.sh
- ignores the value of MAKEFLAGS passed in the
- environment, but allows MAKEFLAGS to be set via the -V
- option.
+ Note: build.sh ignores the value of MAKEFLAGS passed in
+ the environment, but allows MAKEFLAGS to be set via the
+ -V option.
- MAKEOBJDIR Directory to use as the .OBJDIR for the current
- directory. The value is subjected to variable
- expansion by 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 Directory to use as the .OBJDIR for the current
+ directory. The value is subjected to variable expansion
+ by 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.
- Note: MAKEOBJDIR can be provided only in the
- environment or via the -O flag of build.sh; it cannot
- usefully be set inside a Makefile, including in
- mk.conf(5) or MAKECONF.
+ Note: MAKEOBJDIR can be provided only in the environment
+ or via the -O flag of build.sh; it cannot usefully be
+ set inside a Makefile, including in mk.conf(5) or
+ MAKECONF.
- MAKEOBJDIRPREFIX Top level directory of the object directory tree. The
- value is subjected to variable expansion by make(1).
- build.sh will create the ${MAKEOBJDIRPREFIX} directory
- if necessary, but if make(1) is used without build.sh,
- then rules in <bsd.obj.mk> will abort the build if the
- ${MAKEOBJDIRPREFIX} directory does not exist. If the
- value is defined and valid, then
- ${MAKEOBJDIRPREFIX}/${.CURDIR} is used as the .OBJDIR
- for the current directory. The current directory may
- be read only.
+ MAKEOBJDIRPREFIX
+ Top level directory of the object directory tree. The
+ value is subjected to variable expansion by make(1).
+ build.sh will create the ${MAKEOBJDIRPREFIX} directory
+ if necessary, but if make(1) is used without build.sh,
+ then rules in <bsd.obj.mk> will abort the build if the
+ ${MAKEOBJDIRPREFIX} directory does not exist. If the
+ value is defined and valid, then
+ ${MAKEOBJDIRPREFIX}/${.CURDIR} is used as the .OBJDIR
+ for the current directory. The current directory may be
+ read only.
- Note: MAKEOBJDIRPREFIX can be provided only in the
- environment or via the -M flag of build.sh; it cannot
- usefully be set inside a Makefile, including in
- mk.conf(5) or MAKECONF.
+ Note: MAKEOBJDIRPREFIX can be provided only in the
+ environment or via the -M flag of build.sh; it cannot
+ usefully be set inside a Makefile, including in
+ mk.conf(5) or MAKECONF.
- TMPDIR Top-level directory to store temporary directories used
- by build.sh before paths to other directories such as
- .OBJDIR can be determined.
+ TMPDIR Top-level directory to store temporary directories used
+ by build.sh before paths to other directories such as
+ .OBJDIR can be determined.
- Note: Must support execution of binaries. I.e.,
- without mount(8)'s -o noexec option.
+ Note: Must support execution of binaries. I.e., without
+ mount(8)'s -o noexec option.
- Default: "/tmp".
+ Default: "/tmp".
"make" variables
Several variables control the behavior of NetBSD builds. Unless
otherwise specified, these variables may be set in either the process
environment or the make(1) configuration file mk.conf(5) specified by
- MAKECONF. This list is not comprehensive; all supported variables and
- their defaults are documented in mk.conf(5).
+ MAKECONF.
+
+ This list is not comprehensive; all supported variables and their
+ defaults are documented in mk.conf(5).
- BUILDID Identifier for the build. If set, this should be a short
- string that is suitable for use as part of a file or
- directory name. 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
- parameters, such as compiler flags. It will also be used as
- part of the kernel version string, which can be shown by
- "uname -v".
+ BSDOBJDIR The real path to the object directory tree for the
+ NetBSD source tree.
+
+ Default: "/usr/obj"
+
+ BSDSRCDIR The real path to the NetBSD source tree, if NETBSDSRCDIR
+ isn't defined.
+
+ Default: "/usr/src"
- Default: Unset.
+ BUILDID Identifier for the build. If set, this should be a
+ short string that is suitable for use as part of a file
+ or directory name. 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 parameters, such as compiler flags. It will also
+ be used as part of the kernel version string, which can
+ be shown by "uname -v".
+
+ Default: Unset.
- BUILDINFO This may be a multi-line string containing information about
- the build. This will appear in DESTDIR/etc/release, and it
- will be stored in the buildinfo variable in any kernels that
- are built. When such kernels are booted, the sysctl(7)
- kern.buildinfo variable will report this value. The string
- may contain backslash escape sequences, such as "\\"
- (representing a backslash character) and "\n" (representing a
- newline).
+ BUILDINFO Optional multi-line string containing information about
+ the build. This will appear in DESTDIR/etc/release, and
+ it will be stored in the buildinfo variable in any
+ kernels that are built. When such kernels are booted,
+ the sysctl(7) kern.buildinfo variable will report this
+ value. The string may contain backslash escape
+ sequences, such as "\\" (representing a backslash
+ character) and "\n" (representing a newline).
- Default: Unset.
+ Default: Unset.
- BUILDSEED GCC uses random numbers when compiling C++ code. This
- variable seeds the gcc random number generator using the
- -frandom-seed flag with this value. By default, it is set to
- NetBSD-(majorversion). Using a fixed value causes C++
- binaries to be the same when built from the same sources,
- resulting in identical (reproducible) builds. Additional
- information is available in the GCC documentation of
- -frandom-seed.
+ BUILDSEED g++(1) uses random numbers when compiling C++ code.
Home |
Main Index |
Thread Index |
Old Index