Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src build.sh: MAKECONF and mk.conf(5) improvements
details: https://anonhg.NetBSD.org/src/rev/d3d642d71727
branches: trunk
changeset: 376141:d3d642d71727
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Jun 02 20:48:41 2023 +0000
description:
build.sh: MAKECONF and mk.conf(5) improvements
Move MAKECONF to the Environment variables section.
Add mk.conf(5) cross-references.
Make Notes more obvious.
Fix mandoc lint.
diffstat:
BUILDING | 42 +++++++++++++++++++++++---------------
doc/BUILDING.mdoc | 59 ++++++++++++++++++++++++++++++++++--------------------
2 files changed, 62 insertions(+), 39 deletions(-)
diffs (242 lines):
diff -r f9142a445b27 -r d3d642d71727 BUILDING
--- a/BUILDING Fri Jun 02 20:48:09 2023 +0000
+++ b/BUILDING Fri Jun 02 20:48:41 2023 +0000
@@ -1,7 +1,7 @@
BUILDING(8) System Manager's Manual BUILDING(8)
NAME
- BUILDING - Procedure for building NetBSD from source code.
+ BUILDING - Procedure for building NetBSD from source code
REQUIREMENTS
NetBSD is designed to be buildable on most POSIX-compliant host systems.
@@ -127,6 +127,13 @@ CONFIGURATION
MAKE Path name to invoke make(1) as.
+ MAKECONF The name of the make(1) configuration file. See "make"
+ variables and mk.conf(5).
+
+ Note: Only settable in the process environment.
+
+ Default: "/etc/mk.conf"
+
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
@@ -138,10 +145,12 @@ CONFIGURATION
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,
- including mk.conf or ${MAKECONF}.
+ 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.
MAKEOBJDIRPREFIX Top level directory of the object directory tree. The
value is subjected to variable expansion by make(1).
@@ -152,10 +161,12 @@ CONFIGURATION
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 can be provided only in
- the environment or via the -M flag of build.sh; it
- cannot usefully be set inside a Makefile, including
- mk.conf or ${MAKECONF}.
+ 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.
TMPDIR Top-level directory to store temporary directories used
by build.sh before paths to other directories such as
@@ -169,7 +180,9 @@ CONFIGURATION
"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 specified by MAKECONF.
+ 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).
BUILDID Identifier for the build. If set, this should be a short
string that is suitable for use as part of a file or
@@ -221,11 +234,6 @@ CONFIGURATION
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.
-
- Default: "/etc/mk.conf"
-
MAKEVERBOSE
Level of verbosity of status messages. Supported values:
@@ -1124,8 +1132,8 @@ OBSOLETE VARIABLES
TOOLCHAIN_MISSING=yes.
SEE ALSO
- make(1), hier(7), release(7), etcupdate(8), installboot(8), mount(8),
- postinstall(8), sysinst(8), pkgsrc/sysutils/cdrtools
+ make(1), mk.conf(5), hier(7), release(7), etcupdate(8), installboot(8),
+ mount(8), postinstall(8), sysinst(8), pkgsrc/sysutils/cdrtools
HISTORY
The build.sh based build scheme was introduced for NetBSD 1.6 as
diff -r f9142a445b27 -r d3d642d71727 doc/BUILDING.mdoc
--- a/doc/BUILDING.mdoc Fri Jun 02 20:48:09 2023 +0000
+++ b/doc/BUILDING.mdoc Fri Jun 02 20:48:41 2023 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: BUILDING.mdoc,v 1.138 2023/05/18 14:22:53 lukem Exp $
+.\" $NetBSD: BUILDING.mdoc,v 1.139 2023/06/02 20:48:41 lukem Exp $
.\"
.\" Copyright (c) 2001-2023 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -52,7 +52,7 @@
.Nm BUILDING
.Nd Procedure for building
.Nx
-from source code.
+from source code
.
.Sh REQUIREMENTS
.
@@ -99,8 +99,8 @@ should only be run for native builds wit
version of
.Nx
.Xr make 1 .
-Intended for expert use with knowledge of its shortcomings, it has been superseded
-by the
+Intended for expert use with knowledge of its shortcomings,
+it has been superseded by the
.Nm build.sh
shell script as the recommended means for building
.Nx .
@@ -276,6 +276,20 @@ Path name to invoke
.Xr make 1
as.
.
+.It Sy MAKECONF
+The name of the
+.Xr make 1
+configuration file.
+See
+.Sx \*qmake\*q variables
+and
+.Xr mk.conf 5 .
+.Pp
+.Em Note :
+Only settable in the process environment.
+.DFLT
+.Dq /etc/mk.conf
+.
.It Sy MAKEFLAGS
Flags to invoke
.Xr make 1
@@ -307,15 +321,17 @@ from the value of
Used only if
.Sy MAKEOBJDIRPREFIX
is not defined.
+.Pp
+.Em Note :
.Sy MAKEOBJDIR
can be provided only in the environment or via the
.Fl O
flag of
.Nm build.sh ;
-it cannot usefully be set inside a Makefile, including
-.Pa mk.conf
+it cannot usefully be set inside a Makefile, including in
+.Xr mk.conf 5
or
-.Sy ${MAKECONF} .
+.Sy MAKECONF .
.
.It Sy MAKEOBJDIRPREFIX
Top level directory of the object directory tree.
@@ -339,16 +355,17 @@ is used as the
.Sy .OBJDIR
for the current directory.
The current directory may be read only.
+.Pp
+.Em Note :
.Sy MAKEOBJDIRPREFIX
can be provided only in the environment or via the
.Fl M
flag of
.Nm build.sh ;
-it cannot usefully be set inside a Makefile, including
-.Pa mk.conf
+it cannot usefully be set inside a Makefile, including in
+.Xr mk.conf 5
or
-.Sy ${MAKECONF} .
-.
+.Sy MAKECONF .
.
.It Sy TMPDIR
Top-level directory to store temporary directories used by
@@ -377,8 +394,13 @@ builds.
Unless otherwise specified, these variables may be set in
either the process environment or the
.Xr make 1
-configuration file specified by
+configuration file
+.Xr mk.conf 5
+specified by
.Sy MAKECONF .
+This list is not comprehensive;
+all supported variables and their defaults are documented in
+.Xr mk.conf 5 .
.
.Bl -tag -width "MKCATPAGES"
.
@@ -459,21 +481,13 @@ unset otherwise.
.Em Note :
.Sy build.sh
will provide a default of
-.Pa destdir. Ns Sy MACHINE
+.Pa destdir . Ns Sy MACHINE
(in the top-level
.Sy .OBJDIR )
unless run in
.Sq expert
mode.
.
-.It Sy MAKECONF
-The name of the
-.Xr make 1
-configuration file.
-.Em Only settable in the process environment.
-.DFLT
-.Dq /etc/mk.conf
-.
.It Sy MAKEVERBOSE
Level of verbosity of status messages.
Supported values:
@@ -1964,7 +1978,7 @@ This default is opposite to the behaviou
.Sy build.sh .
.
.It Fl P
-Set the value of
+Set the value of
.Sy MKREPRO
and
.Sy MKREPRO_TIMESTAMP
@@ -2176,6 +2190,7 @@ To disable, use
.El
.Sh SEE ALSO
.Xr make 1 ,
+.Xr mk.conf 5 ,
.Xr hier 7 ,
.Xr release 7 ,
.Xr etcupdate 8 ,
Home |
Main Index |
Thread Index |
Old Index