Wed Sep 19 23:06:22 2012 UTC ()
Fix inverted logic description for MKSTRIPIDENT.
Noted by Snader_LB on freenode IRC


(abs)
diff -r1.89 -r1.90 src/doc/BUILDING.mdoc
diff -r1.61 -r1.62 src/share/man/man5/mk.conf.5

cvs diff -r1.89 -r1.90 src/doc/BUILDING.mdoc (switch to unified diff)

--- src/doc/BUILDING.mdoc 2012/05/25 10:47:25 1.89
+++ src/doc/BUILDING.mdoc 2012/09/19 23:06:22 1.90
@@ -1,1584 +1,1584 @@ @@ -1,1584 +1,1584 @@
1.\" $NetBSD: BUILDING.mdoc,v 1.89 2012/05/25 10:47:25 wiz Exp $ 1.\" $NetBSD: BUILDING.mdoc,v 1.90 2012/09/19 23:06:22 abs Exp $
2.\" 2.\"
3.\" Copyright (c) 2001-2011 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Todd Vierling and Luke Mewburn. 7.\" by Todd Vierling and Luke Mewburn.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.\" NOTE: After changing this file, run "make regen" in the src/doc 30.\" NOTE: After changing this file, run "make regen" in the src/doc
31.\" directory, and check in both src/BUILDING and src/doc/BUILDING.mdoc. 31.\" directory, and check in both src/BUILDING and src/doc/BUILDING.mdoc.
32.\" 32.\"
33.\" Toolchain prefix for commands 33.\" Toolchain prefix for commands
34.ds toolprefix nb 34.ds toolprefix nb
35. 35.
36.Dd May 25, 2012 36.Dd September 19, 2012
37.Dt BUILDING 8 37.Dt BUILDING 8
38.Os NetBSD 38.Os NetBSD
39. 39.
40.Sh NAME 40.Sh NAME
41. 41.
42.Nm BUILDING 42.Nm BUILDING
43.Nd Procedure for building 43.Nd Procedure for building
44.Nx 44.Nx
45from source code. 45from source code.
46. 46.
47.Sh REQUIREMENTS 47.Sh REQUIREMENTS
48. 48.
49.Nx 49.Nx
50is designed to be buildable on most POSIX-compliant host systems. 50is designed to be buildable on most POSIX-compliant host systems.
51The basic build procedure is the same whether compiling 51The basic build procedure is the same whether compiling
52.Em natively 52.Em natively
53(on the same 53(on the same
54.Nx 54.Nx
55architecture) or 55architecture) or
56.Em cross compiling 56.Em cross compiling
57(on another architecture or OS). 57(on another architecture or OS).
58.Pp 58.Pp
59This source tree contains a special subtree, 59This source tree contains a special subtree,
60.Dq tools , 60.Dq tools ,
61which uses the host system to create a build toolchain for the target 61which uses the host system to create a build toolchain for the target
62architecture. 62architecture.
63The host system must have at least C and C++ 63The host system must have at least C and C++
64compilers in order to create the toolchain 64compilers in order to create the toolchain
65.Nm ( make 65.Nm ( make
66is not required); all other tools are created as part of the 66is not required); all other tools are created as part of the
67.Nx 67.Nx
68build process. 68build process.
69(See the environment variables section below if you need 69(See the environment variables section below if you need
70to override or manually select your compilers.) 70to override or manually select your compilers.)
71. 71.
72.Sh FILES 72.Sh FILES
73. 73.
74.Ss Source tree layout 74.Ss Source tree layout
75. 75.
76.Bl -tag -width "BUILDING.mdoc" 76.Bl -tag -width "BUILDING.mdoc"
77.It Sy doc/BUILDING.mdoc 77.It Sy doc/BUILDING.mdoc
78This document (in -mdoc troff format; the original copy). 78This document (in -mdoc troff format; the original copy).
79.It Sy BUILDING 79.It Sy BUILDING
80This document (in plaintext). 80This document (in plaintext).
81.It Sy tools/compat/README 81.It Sy tools/compat/README
82Special notes for cross-hosting a NetBSD build on non-NetBSD platforms. 82Special notes for cross-hosting a NetBSD build on non-NetBSD platforms.
83.It Sy Makefile 83.It Sy Makefile
84The main Makefile for 84The main Makefile for
85.Nx ; 85.Nx ;
86should only be run for native builds with an appropriately up-to-date 86should only be run for native builds with an appropriately up-to-date
87version of 87version of
88.Nx 88.Nx
89.Xr make 1 . 89.Xr make 1 .
90(For building from out-of-date systems or on a non-native host, see the 90(For building from out-of-date systems or on a non-native host, see the
91.Nm build.sh 91.Nm build.sh
92shell script.) 92shell script.)
93.It Sy UPDATING 93.It Sy UPDATING
94Special notes for updating from an earlier revision of 94Special notes for updating from an earlier revision of
95.Nx . 95.Nx .
96It is important to read this file before every build of an updated 96It is important to read this file before every build of an updated
97source tree. 97source tree.
98.It Sy build.sh 98.It Sy build.sh
99Bourne-compatible shell script used for building the host build tools 99Bourne-compatible shell script used for building the host build tools
100and the 100and the
101.Nx 101.Nx
102system from scratch. 102system from scratch.
103Can be used for both native and cross builds, and should be used instead of 103Can be used for both native and cross builds, and should be used instead of
104.Xr make 1 104.Xr make 1
105for any source tree that is updated and recompiled regularly. 105for any source tree that is updated and recompiled regularly.
106.It Sy crypto/dist/ , dist/ , gnu/dist/ 106.It Sy crypto/dist/ , dist/ , gnu/dist/
107Sources imported verbatim from third parties, without mangling the 107Sources imported verbatim from third parties, without mangling the
108existing build structure. 108existing build structure.
109Other source trees in 109Other source trees in
110.Sy bin 110.Sy bin
111through 111through
112.Sy usr.sbin 112.Sy usr.sbin
113use the 113use the
114.Nx 114.Nx
115.Xr make 1 115.Xr make 1
116.Dq reachover 116.Dq reachover
117Makefile semantics when building these programs for a native host. 117Makefile semantics when building these programs for a native host.
118.It Sy distrib/ , etc/ 118.It Sy distrib/ , etc/
119Sources for items used when making a full release snapshot, such as 119Sources for items used when making a full release snapshot, such as
120files installed in 120files installed in
121.Sy DESTDIR Ns Pa /etc 121.Sy DESTDIR Ns Pa /etc
122on the destination system, boot media, and release notes. 122on the destination system, boot media, and release notes.
123.It Sy tests/ , regress/ 123.It Sy tests/ , regress/
124Regression test harness. 124Regression test harness.
125Can be cross-compiled, but only run natively. 125Can be cross-compiled, but only run natively.
126.Pa tests/ 126.Pa tests/
127uses the 127uses the
128.Xr atf 7 128.Xr atf 7
129test framework; 129test framework;
130.Pa regress/ 130.Pa regress/
131contains older tests that have not yet been migrated to 131contains older tests that have not yet been migrated to
132.Xr atf 7 . 132.Xr atf 7 .
133.It Sy sys/ 133.It Sy sys/
134.Nx 134.Nx
135kernel sources. 135kernel sources.
136.It Sy tools/ 136.It Sy tools/
137.Dq Reachover 137.Dq Reachover
138build structure for the host build tools. 138build structure for the host build tools.
139This has a special method of determining out-of-date status. 139This has a special method of determining out-of-date status.
140.It Sy bin/ ... usr.sbin/ 140.It Sy bin/ ... usr.sbin/
141Sources to the 141Sources to the
142.Nx 142.Nx
143userland (non-kernel) programs. 143userland (non-kernel) programs.
144If any of these directories are missing, they will be skipped during the build. 144If any of these directories are missing, they will be skipped during the build.
145.It Sy x11/ 145.It Sy x11/
146.Dq Reachover 146.Dq Reachover
147build structure for X11R6; the source is in 147build structure for X11R6; the source is in
148.Sy X11SRCDIR . 148.Sy X11SRCDIR .
149.El 149.El
150. 150.
151.Ss Build tree layout 151.Ss Build tree layout
152. 152.
153The 153The
154.Nx 154.Nx
155build tree is described in 155build tree is described in
156.Xr hier 7 , 156.Xr hier 7 ,
157and the release layout is described in 157and the release layout is described in
158.Xr release 7 . 158.Xr release 7 .
159.Pp 159.Pp
160. 160.
161.Sh CONFIGURATION 161.Sh CONFIGURATION
162. 162.
163.Ss Environment variables 163.Ss Environment variables
164.. 164..
165Several environment variables control the behaviour of 165Several environment variables control the behaviour of
166.Nx 166.Nx
167builds. 167builds.
168. 168.
169.Bl -tag -width "MAKEOBJDIRPREFIX" 169.Bl -tag -width "MAKEOBJDIRPREFIX"
170. 170.
171. 171.
172.It Sy HOST_SH 172.It Sy HOST_SH
173Path name to a shell available on the host system 173Path name to a shell available on the host system
174and suitable for use during the build. 174and suitable for use during the build.
175The 175The
176.Nx 176.Nx
177build system requires a modern Bourne-like shell 177build system requires a modern Bourne-like shell
178with POSIX-compliant features, 178with POSIX-compliant features,
179and also requires support for the 179and also requires support for the
180.Dq local 180.Dq local
181keyword to declare local variables in shell functions 181keyword to declare local variables in shell functions
182(which is a widely-implemented but non-standardised feature). 182(which is a widely-implemented but non-standardised feature).
183.Pp 183.Pp
184Depending on the host system, a suitable shell may be 184Depending on the host system, a suitable shell may be
185.Pa /bin/sh , 185.Pa /bin/sh ,
186.Pa /usr/xpg4/bin/sh , 186.Pa /usr/xpg4/bin/sh ,
187.Pa /bin/ksh 187.Pa /bin/ksh
188(provided it is a variant of ksh that supports the 188(provided it is a variant of ksh that supports the
189.Dq local 189.Dq local
190keyword, 190keyword,
191such as ksh88, but not ksh93), 191such as ksh88, but not ksh93),
192or 192or
193.Pa /usr/local/bin/bash . 193.Pa /usr/local/bin/bash .
194.Pp 194.Pp
195Most parts of the build require 195Most parts of the build require
196.Sy HOST_SH 196.Sy HOST_SH
197to be an absolute path; however, 197to be an absolute path; however,
198.Nm build.sh 198.Nm build.sh
199allows it to be a simple command name, which will be converted 199allows it to be a simple command name, which will be converted
200to an absolute path by searching the 200to an absolute path by searching the
201.Sy PATH . 201.Sy PATH .
202. 202.
203.It Sy HOST_CC 203.It Sy HOST_CC
204Path name to C compiler used to create the toolchain. 204Path name to C compiler used to create the toolchain.
205. 205.
206.It Sy HOST_CXX 206.It Sy HOST_CXX
207Path name to C++ compiler used to create the toolchain. 207Path name to C++ compiler used to create the toolchain.
208. 208.
209.It Sy MACHINE 209.It Sy MACHINE
210Machine type, e.g., 210Machine type, e.g.,
211.Dq macppc . 211.Dq macppc .
212. 212.
213.It Sy MACHINE_ARCH 213.It Sy MACHINE_ARCH
214Machine architecture, e.g., 214Machine architecture, e.g.,
215.Dq powerpc . 215.Dq powerpc .
216. 216.
217.It Sy MAKE 217.It Sy MAKE
218Path name to invoke 218Path name to invoke
219.Xr make 1 219.Xr make 1
220as. 220as.
221. 221.
222.It Sy MAKEFLAGS 222.It Sy MAKEFLAGS
223Flags to invoke 223Flags to invoke
224.Xr make 1 224.Xr make 1
225with. 225with.
226Note that 226Note that
227.Sy build.sh 227.Sy build.sh
228ignores the value of 228ignores the value of
229.Sy MAKEFLAGS 229.Sy MAKEFLAGS
230passed in the environment, but allows 230passed in the environment, but allows
231.Sy MAKEFLAGS 231.Sy MAKEFLAGS
232to be set via the 232to be set via the
233.Fl V 233.Fl V
234option. 234option.
235. 235.
236.It Sy MAKEOBJDIR 236.It Sy MAKEOBJDIR
237Directory to use as the 237Directory to use as the
238.Sy .OBJDIR 238.Sy .OBJDIR
239for the current directory. 239for the current directory.
240The value is subjected to variable expansion by 240The value is subjected to variable expansion by
241.Xr make 1 . 241.Xr make 1 .
242Typical usage is to set this variable to a value involving the use of 242Typical usage is to set this variable to a value involving the use of
243.Sq ${.CURDIR:S...} 243.Sq ${.CURDIR:S...}
244or 244or
245.Sq ${.CURDIR:C...} , 245.Sq ${.CURDIR:C...} ,
246to derive the value of 246to derive the value of
247.Sy .OBJDIR 247.Sy .OBJDIR
248from the value of 248from the value of
249.Sy .CURDIR . 249.Sy .CURDIR .
250Used only if 250Used only if
251.Sy MAKEOBJDIRPREFIX 251.Sy MAKEOBJDIRPREFIX
252is not defined. 252is not defined.
253.Sy MAKEOBJDIR 253.Sy MAKEOBJDIR
254can be provided only in the environment or via the 254can be provided only in the environment or via the
255.Fl O 255.Fl O
256flag of 256flag of
257.Nm build.sh ; 257.Nm build.sh ;
258it cannot usefully be set inside a Makefile, including 258it cannot usefully be set inside a Makefile, including
259.Pa mk.conf 259.Pa mk.conf
260or 260or
261.Sy ${MAKECONF} . 261.Sy ${MAKECONF} .
262. 262.
263.It Sy MAKEOBJDIRPREFIX 263.It Sy MAKEOBJDIRPREFIX
264Top level directory of the object directory tree. 264Top level directory of the object directory tree.
265The value is subjected to variable expansion by 265The value is subjected to variable expansion by
266.Xr make 1 . 266.Xr make 1 .
267.Sy build.sh 267.Sy build.sh
268will create the 268will create the
269${MAKEOBJDIRPREFIX} 269${MAKEOBJDIRPREFIX}
270directory if necessary, but if 270directory if necessary, but if
271.Xr make 1 271.Xr make 1
272is used without 272is used without
273.Sy build.sh , 273.Sy build.sh ,
274then rules in 274then rules in
275.Aq bsd.obj.mk 275.Aq bsd.obj.mk
276will abort the build if the 276will abort the build if the
277${MAKEOBJDIRPREFIX} 277${MAKEOBJDIRPREFIX}
278directory does not exist. 278directory does not exist.
279If the value is defined and valid, then 279If the value is defined and valid, then
280${MAKEOBJDIRPREFIX}/${.CURDIR} 280${MAKEOBJDIRPREFIX}/${.CURDIR}
281is used as the 281is used as the
282.Sy .OBJDIR 282.Sy .OBJDIR
283for the current directory. 283for the current directory.
284The current directory may be read only. 284The current directory may be read only.
285.Sy MAKEOBJDIRPREFIX 285.Sy MAKEOBJDIRPREFIX
286can be provided only in the environment or via the 286can be provided only in the environment or via the
287.Fl M 287.Fl M
288flag of 288flag of
289.Nm build.sh ; 289.Nm build.sh ;
290it cannot usefully be set inside a Makefile, including  290it cannot usefully be set inside a Makefile, including
291.Pa mk.conf 291.Pa mk.conf
292or 292or
293.Sy ${MAKECONF} . 293.Sy ${MAKECONF} .
294. 294.
295.El 295.El
296. 296.
297.Ss \*qmake\*q variables 297.Ss \*qmake\*q variables
298. 298.
299.de YorN 299.de YorN
300Can be set to 300Can be set to
301.Dq yes 301.Dq yes
302or 302or
303.Dq no . 303.Dq no .
304.. 304..
305.de DFLT 305.de DFLT
306.Pp 306.Pp
307.Em Default : 307.Em Default :
308.. 308..
309.de DFLTu 309.de DFLTu
310.DFLT 310.DFLT
311Unset. 311Unset.
312.. 312..
313.de DFLTy 313.de DFLTy
314.DFLT 314.DFLT
315.Dq yes 315.Dq yes
316.. 316..
317.de DFLTn 317.de DFLTn
318.DFLT 318.DFLT
319.Dq no 319.Dq no
320.. 320..
321Several variables control the behavior of 321Several variables control the behavior of
322.Nx 322.Nx
323builds. 323builds.
324Unless otherwise specified, these variables may be set in 324Unless otherwise specified, these variables may be set in
325either the process environment or the 325either the process environment or the
326.Xr make 1 326.Xr make 1
327configuration file specified by 327configuration file specified by
328.Sy MAKECONF . 328.Sy MAKECONF .
329. 329.
330.Bl -tag -width "MKCATPAGES" 330.Bl -tag -width "MKCATPAGES"
331. 331.
332.It Sy BUILDID 332.It Sy BUILDID
333Identifier for the build. 333Identifier for the build.
334The identifier will be appended to 334The identifier will be appended to
335object directory names, and can be consulted in the 335object directory names, and can be consulted in the
336.Xr make 1 336.Xr make 1
337configuration file in order to set additional build parameters, 337configuration file in order to set additional build parameters,
338such as compiler flags. 338such as compiler flags.
339. 339.
340.It Sy BUILDSEED 340.It Sy BUILDSEED
341GCC uses random numbers when compiling C++ code. 341GCC uses random numbers when compiling C++ code.
342This variable seeds the gcc random number generator using 342This variable seeds the gcc random number generator using
343the -frandom-seed flag with this value. 343the -frandom-seed flag with this value.
344By default, it is set to NetBSD-(majorversion). 344By default, it is set to NetBSD-(majorversion).
345Using a fixed value causes C++ binaries to be the same when 345Using a fixed value causes C++ binaries to be the same when
346built from the same sources, resulting in identical (reproducible) builds. 346built from the same sources, resulting in identical (reproducible) builds.
347Additional information is available in the GCC 347Additional information is available in the GCC
348documentation of -frandom-seed. 348documentation of -frandom-seed.
349. 349.
350.It Sy DESTDIR 350.It Sy DESTDIR
351Directory to contain the built 351Directory to contain the built
352.Nx 352.Nx
353system. 353system.
354If set, special options are passed to the compilation tools to 354If set, special options are passed to the compilation tools to
355prevent their default use of the host system's 355prevent their default use of the host system's
356.Sy /usr/include , /usr/lib , 356.Sy /usr/include , /usr/lib ,
357and so forth. 357and so forth.
358This pathname must be an absolute path, and should 358This pathname must be an absolute path, and should
359.Em not 359.Em not
360end with a slash 360end with a slash
361.Pq / 361.Pq /
362character. 362character.
363(For installation into the system's root directory, set 363(For installation into the system's root directory, set
364.Sy DESTDIR 364.Sy DESTDIR
365to an empty string, not to 365to an empty string, not to
366.Dq / ) . 366.Dq / ) .
367The directory must reside on a file system which supports long file 367The directory must reside on a file system which supports long file
368names and hard links. 368names and hard links.
369.DFLT 369.DFLT
370Empty string if 370Empty string if
371.Sy USETOOLS 371.Sy USETOOLS
372is 372is
373.Dq yes ; 373.Dq yes ;
374unset otherwise. 374unset otherwise.
375.Pp 375.Pp
376.Em Note : 376.Em Note :
377.Sy build.sh 377.Sy build.sh
378will provide a default of 378will provide a default of
379.Pa destdir. Ns Sy MACHINE 379.Pa destdir. Ns Sy MACHINE
380(in the top-level 380(in the top-level
381.Sy .OBJDIR ) 381.Sy .OBJDIR )
382unless run in 382unless run in
383.Sq expert 383.Sq expert
384mode. 384mode.
385. 385.
386.It Sy MAKECONF 386.It Sy MAKECONF
387The name of the 387The name of the
388.Xr make 1 388.Xr make 1
389configuration file. 389configuration file.
390.Em Only settable in the process environment. 390.Em Only settable in the process environment.
391.DFLT 391.DFLT
392.Dq /etc/mk.conf 392.Dq /etc/mk.conf
393. 393.
394.It Sy MAKEVERBOSE 394.It Sy MAKEVERBOSE
395Level of verbosity of status messages. 395Level of verbosity of status messages.
396Supported values: 396Supported values:
397.Bl -tag -width xxx 397.Bl -tag -width xxx
398.It 0 398.It 0
399No descriptive messages or commands executed by 399No descriptive messages or commands executed by
400.Xr make 1 400.Xr make 1
401are shown. 401are shown.
402.It 1 402.It 1
403Brief messages are shown describing what is being done, 403Brief messages are shown describing what is being done,
404but the actual commands executed by 404but the actual commands executed by
405.Xr make 1 405.Xr make 1
406are not displayed. 406are not displayed.
407.It 2 407.It 2
408Descriptive messages are shown as above (prefixed with a 408Descriptive messages are shown as above (prefixed with a
409.Sq # ) , 409.Sq # ) ,
410and ordinary commands performed by 410and ordinary commands performed by
411.Xr make 1 411.Xr make 1
412are displayed. 412are displayed.
413.It 3 413.It 3
414In addition to the above, all commands performed by 414In addition to the above, all commands performed by
415.Xr make 1 415.Xr make 1
416are displayed, even if they would ordinarily have been hidden 416are displayed, even if they would ordinarily have been hidden
417through use of the 417through use of the
418.Dq \&@ 418.Dq \&@
419prefix in the relevant makefile. 419prefix in the relevant makefile.
420.It 4 420.It 4
421In addition to the above, commands executed by 421In addition to the above, commands executed by
422.Xr make 1 422.Xr make 1
423are traced through use of the 423are traced through use of the
424.Xr sh 1 424.Xr sh 1
425.Dq Fl x 425.Dq Fl x
426flag. 426flag.
427.El 427.El
428.DFLT 428.DFLT
4292 4292
430. 430.
431.It Sy MKCATPAGES 431.It Sy MKCATPAGES
432.YorN 432.YorN
433Indicates whether preformatted plaintext manual pages will be created 433Indicates whether preformatted plaintext manual pages will be created
434during a build. 434during a build.
435.DFLTy 435.DFLTy
436. 436.
437.It Sy MKCRYPTO 437.It Sy MKCRYPTO
438.YorN 438.YorN
439Indicates whether cryptographic code will be included in a build; 439Indicates whether cryptographic code will be included in a build;
440provided for the benefit of countries that do not allow strong 440provided for the benefit of countries that do not allow strong
441cryptography. 441cryptography.
442Will not affect use of the standard low-security password encryption system, 442Will not affect use of the standard low-security password encryption system,
443.Xr crypt 3 . 443.Xr crypt 3 .
444.DFLTy 444.DFLTy
445. 445.
446.It Sy MKDOC 446.It Sy MKDOC
447.YorN 447.YorN
448Indicates whether system documentation destined for 448Indicates whether system documentation destined for
449.Sy DESTDIR Ns Pa /usr/share/doc 449.Sy DESTDIR Ns Pa /usr/share/doc
450will be installed during a build. 450will be installed during a build.
451.DFLTy 451.DFLTy
452. 452.
453.It Sy MKHTML 453.It Sy MKHTML
454.YorN 454.YorN
455Indicates whether preformatted HTML manual pages will be built 455Indicates whether preformatted HTML manual pages will be built
456and installed 456and installed
457.DFLTy 457.DFLTy
458. 458.
459.It Sy MKHOSTOBJ 459.It Sy MKHOSTOBJ
460.YorN 460.YorN
461If set to 461If set to
462.Dq yes , 462.Dq yes ,
463then for programs intended to be run on the compile host, 463then for programs intended to be run on the compile host,
464the name, release, and architecture of the host operating system 464the name, release, and architecture of the host operating system
465will be suffixed to the name of the object directory created by 465will be suffixed to the name of the object directory created by
466.Dq make obj . 466.Dq make obj .
467(This allows multiple host systems to compile NetBSD for a single target.) 467(This allows multiple host systems to compile NetBSD for a single target.)
468If set to 468If set to
469.Dq no , 469.Dq no ,
470then programs built to be run on the compile host will use the same 470then programs built to be run on the compile host will use the same
471object directory names as programs built to be run on the target. 471object directory names as programs built to be run on the target.
472.DFLTn 472.DFLTn
473. 473.
474.It Sy MKINFO 474.It Sy MKINFO
475.YorN 475.YorN
476Indicates whether GNU Info files, used for the documentation for 476Indicates whether GNU Info files, used for the documentation for
477most of the compilation tools, will be created and installed during a 477most of the compilation tools, will be created and installed during a
478build. 478build.
479.DFLTy 479.DFLTy
480. 480.
481.It Sy MKKMOD 481.It Sy MKKMOD
482.YorN 482.YorN
483Indicates whether kernel modules are built and installed. 483Indicates whether kernel modules are built and installed.
484.DFLTy 484.DFLTy
485. 485.
486.It Sy MKLINT 486.It Sy MKLINT
487.YorN 487.YorN
488Indicates whether 488Indicates whether
489.Xr lint 1 489.Xr lint 1
490will be run against portions of the 490will be run against portions of the
491.Nx 491.Nx
492source code during the build, and whether lint libraries will be 492source code during the build, and whether lint libraries will be
493installed into 493installed into
494.Sy DESTDIR Ns Pa /usr/libdata/lint . 494.Sy DESTDIR Ns Pa /usr/libdata/lint .
495.DFLTy 495.DFLTy
496. 496.
497.It Sy MKMAN 497.It Sy MKMAN
498.YorN 498.YorN
499Indicates whether manual pages will be installed during a build. 499Indicates whether manual pages will be installed during a build.
500.DFLTy 500.DFLTy
501. 501.
502.It Sy MKNLS 502.It Sy MKNLS
503.YorN 503.YorN
504Indicates whether Native Language System locale zone files will be 504Indicates whether Native Language System locale zone files will be
505compiled and installed during a build. 505compiled and installed during a build.
506.DFLTy 506.DFLTy
507. 507.
508.It Sy MKOBJ 508.It Sy MKOBJ
509.YorN 509.YorN
510Indicates whether object directories will be created when running 510Indicates whether object directories will be created when running
511.Dq make obj . 511.Dq make obj .
512If set to 512If set to
513.Dq no , 513.Dq no ,
514then all built files will be located inside the regular source tree. 514then all built files will be located inside the regular source tree.
515.DFLTy 515.DFLTy
516.Pp 516.Pp
517Note that setting 517Note that setting
518.Sy MKOBJ 518.Sy MKOBJ
519to 519to
520.Dq no 520.Dq no
521is not recommended and may cause problems when updating the tree with 521is not recommended and may cause problems when updating the tree with
522.Xr cvs 1 . 522.Xr cvs 1 .
523. 523.
524.It Sy MKPIC 524.It Sy MKPIC
525.YorN 525.YorN
526Indicates whether shared objects and libraries will be created and 526Indicates whether shared objects and libraries will be created and
527installed during a build. 527installed during a build.
528If set to 528If set to
529.Dq no , 529.Dq no ,
530the entire built system will be statically linked. 530the entire built system will be statically linked.
531.DFLT 531.DFLT
532Platform dependent. 532Platform dependent.
533As of this writing, all platforms except 533As of this writing, all platforms except
534.Sy sh3 534.Sy sh3
535default to 535default to
536.Dq yes . 536.Dq yes .
537. 537.
538.It Sy MKPICINSTALL 538.It Sy MKPICINSTALL
539.YorN 539.YorN
540Indicates whether the 540Indicates whether the
541.Xr ar 1 541.Xr ar 1
542format libraries 542format libraries
543.Sy ( lib*_pic.a ) , 543.Sy ( lib*_pic.a ) ,
544used to generate shared libraries, are installed during a build. 544used to generate shared libraries, are installed during a build.
545.DFLTy 545.DFLTy
546. 546.
547.It Sy MKPROFILE 547.It Sy MKPROFILE
548.YorN 548.YorN
549Indicates whether profiled libraries 549Indicates whether profiled libraries
550.Sy ( lib*_p.a ) 550.Sy ( lib*_p.a )
551will be built and installed during a build. 551will be built and installed during a build.
552.DFLT 552.DFLT
553.Dq yes ; 553.Dq yes ;
554however, some platforms turn off 554however, some platforms turn off
555.Sy MKPROFILE 555.Sy MKPROFILE
556by default at times due to toolchain problems with profiled code. 556by default at times due to toolchain problems with profiled code.
557. 557.
558.It Sy MKREPRO 558.It Sy MKREPRO
559.YorN 559.YorN
560Create reproducable builds. 560Create reproducable builds.
561This enables different switches to make two builds from the same 561This enables different switches to make two builds from the same
562source tree result in the same build results. 562source tree result in the same build results.
563.DFLTn 563.DFLTn
564. 564.
565.It Sy MKSHARE 565.It Sy MKSHARE
566.YorN 566.YorN
567Indicates whether files destined to reside in 567Indicates whether files destined to reside in
568.Sy DESTDIR Ns Pa /usr/share 568.Sy DESTDIR Ns Pa /usr/share
569will be built and installed during a build. 569will be built and installed during a build.
570If set to 570If set to
571.Dq no , 571.Dq no ,
572then all of 572then all of
573.Sy MKCATPAGES , MKDOC , MKINFO , MKMAN , 573.Sy MKCATPAGES , MKDOC , MKINFO , MKMAN ,
574and 574and
575.Sy MKNLS 575.Sy MKNLS
576will be set to 576will be set to
577.Dq no 577.Dq no
578unconditionally. 578unconditionally.
579.DFLTy 579.DFLTy
580. 580.
581.It Sy MKSTRIPIDENT 581.It Sy MKSTRIPIDENT
582.YorN 582.YorN
583Indicates whether program binaries and shared libraries should be built 583Indicates whether RCS IDs, for use with
584to include RCS IDs for use with 584.Xr ident 1 ,
585.Xr ident 1 . 585should be stripped from program binaries and shared libraries.
586.DFLTn 586.DFLTn
587. 587.
588.It Sy MKUNPRIVED 588.It Sy MKUNPRIVED
589.YorN 589.YorN
590Indicates whether an unprivileged install will occur. 590Indicates whether an unprivileged install will occur.
591The user, group, permissions, and file flags, will not be set on 591The user, group, permissions, and file flags, will not be set on
592the installed items; instead the information will be appended to 592the installed items; instead the information will be appended to
593a file called 593a file called
594.Pa METALOG 594.Pa METALOG
595in 595in
596.Sy DESTDIR . 596.Sy DESTDIR .
597The contents of 597The contents of
598.Pa METALOG 598.Pa METALOG
599are used during the generation of the distribution tar files to ensure 599are used during the generation of the distribution tar files to ensure
600that the appropriate file ownership is stored. 600that the appropriate file ownership is stored.
601.DFLTn 601.DFLTn
602. 602.
603.It Sy MKUPDATE 603.It Sy MKUPDATE
604.YorN 604.YorN
605Indicates whether all install operations intended to write to 605Indicates whether all install operations intended to write to
606.Sy DESTDIR 606.Sy DESTDIR
607will compare file timestamps before installing, and skip the install 607will compare file timestamps before installing, and skip the install
608phase if the destination files are up-to-date. 608phase if the destination files are up-to-date.
609This also has implications on full builds (see next subsection). 609This also has implications on full builds (see next subsection).
610.DFLTn 610.DFLTn
611. 611.
612.It Sy MKX11 612.It Sy MKX11
613.YorN 613.YorN
614Indicates whether X11 is built from 614Indicates whether X11 is built from
615.Sy X11SRCDIR . 615.Sy X11SRCDIR .
616.DFLTn 616.DFLTn
617. 617.
618.It Sy TOOLDIR 618.It Sy TOOLDIR
619Directory to hold the host tools, once built. 619Directory to hold the host tools, once built.
620If specified, must be an absolute path. 620If specified, must be an absolute path.
621This directory should be unique to a given host system and 621This directory should be unique to a given host system and
622.Nx 622.Nx
623source tree. 623source tree.
624(However, multiple targets may share the same 624(However, multiple targets may share the same
625.Sy TOOLDIR ; 625.Sy TOOLDIR ;
626the target-dependent files have unique names.) If unset, a default based 626the target-dependent files have unique names.) If unset, a default based
627on the 627on the
628.Xr uname 1 628.Xr uname 1
629information of the host platform will be created in the 629information of the host platform will be created in the
630.Sy .OBJDIR 630.Sy .OBJDIR
631of 631of
632.Pa src . 632.Pa src .
633.DFLTu 633.DFLTu
634. 634.
635.It Sy USETOOLS 635.It Sy USETOOLS
636Indicates whether the tools specified by 636Indicates whether the tools specified by
637.Sy TOOLDIR 637.Sy TOOLDIR
638should be used as part of a build in progress. 638should be used as part of a build in progress.
639Must be set to 639Must be set to
640.Dq yes 640.Dq yes
641if cross-compiling. 641if cross-compiling.
642.Bl -tag -width "never" 642.Bl -tag -width "never"
643.It Sy yes 643.It Sy yes
644Use the tools from 644Use the tools from
645.Sy TOOLDIR . 645.Sy TOOLDIR .
646.It Sy no 646.It Sy no
647Do not use the tools from 647Do not use the tools from
648.Sy TOOLDIR , 648.Sy TOOLDIR ,
649but refuse to build native compilation tool components that are 649but refuse to build native compilation tool components that are
650version-specific for that tool. 650version-specific for that tool.
651.It Sy never 651.It Sy never
652Do not use the tools from 652Do not use the tools from
653.Sy TOOLDIR , 653.Sy TOOLDIR ,
654even when building native tool components. 654even when building native tool components.
655This is similar to the traditional 655This is similar to the traditional
656.Nx 656.Nx
657build method, but does 657build method, but does
658.Em not 658.Em not
659verify that the compilation tools in use are up-to-date enough in order 659verify that the compilation tools in use are up-to-date enough in order
660to build the tree successfully. 660to build the tree successfully.
661This may cause build or runtime problems when building the whole 661This may cause build or runtime problems when building the whole
662.Nx 662.Nx
663source tree. 663source tree.
664.El 664.El
665.DFLT 665.DFLT
666.Dq yes , 666.Dq yes ,
667unless 667unless
668.Sy TOOLCHAIN_MISSING 668.Sy TOOLCHAIN_MISSING
669is set to 669is set to
670.Dq yes . 670.Dq yes .
671.Pp 671.Pp
672.Sy USETOOLS 672.Sy USETOOLS
673is also set to 673is also set to
674.Dq no 674.Dq no
675when using 675when using
676.Aq bsd.*.mk 676.Aq bsd.*.mk
677outside the 677outside the
678.Nx 678.Nx
679source tree. 679source tree.
680. 680.
681.It Sy X11SRCDIR 681.It Sy X11SRCDIR
682Directory containing the X11R6 source. 682Directory containing the X11R6 source.
683If specified, must be an absolute path. 683If specified, must be an absolute path.
684The main X11R6 source is found in 684The main X11R6 source is found in
685.Sy X11SRCDIR Ns Pa /xfree/xc . 685.Sy X11SRCDIR Ns Pa /xfree/xc .
686.DFLT 686.DFLT
687.Sy NETBSDRCDIR Ns Pa /../xsrc , 687.Sy NETBSDRCDIR Ns Pa /../xsrc ,
688if that exists; otherwise 688if that exists; otherwise
689.Pa /usr/xsrc . 689.Pa /usr/xsrc .
690. 690.
691.It Sy X11FLAVOUR 691.It Sy X11FLAVOUR
692The style of X11 cross-built, set to either 692The style of X11 cross-built, set to either
693.Dq Xorg 693.Dq Xorg
694or 694or
695.Dq XFree86 . 695.Dq XFree86 .
696.DFLT 696.DFLT
697.Dq Xorg 697.Dq Xorg
698on amd64, i386, macppc, shark and sparc64 platforms, 698on amd64, i386, macppc, shark and sparc64 platforms,
699.Dq XFree86 699.Dq XFree86
700on everything else. 700on everything else.
701. 701.
702.El 702.El
703. 703.
704.Ss \*qmake\*q variables for full builds 704.Ss \*qmake\*q variables for full builds
705These variables only affect the top level 705These variables only affect the top level
706.Dq Makefile 706.Dq Makefile
707and do not affect manually building subtrees of the 707and do not affect manually building subtrees of the
708.Nx 708.Nx
709source code. 709source code.
710. 710.
711.Bl -tag -width "INSTALLWORLDDIR" 711.Bl -tag -width "INSTALLWORLDDIR"
712. 712.
713.It Sy INSTALLWORLDDIR 713.It Sy INSTALLWORLDDIR
714Location for the 714Location for the
715.Dq make installworld 715.Dq make installworld
716target to install to. 716target to install to.
717If specified, must be an absolute path. 717If specified, must be an absolute path.
718.DFLT 718.DFLT
719.Dq / 719.Dq /
720. 720.
721.It Sy MKOBJDIRS 721.It Sy MKOBJDIRS
722.YorN 722.YorN
723Indicates whether object directories will be created automatically 723Indicates whether object directories will be created automatically
724(via a 724(via a
725.Dq make obj 725.Dq make obj
726pass) at the start of a build. 726pass) at the start of a build.
727.DFLTn 727.DFLTn
728.Pp 728.Pp
729If using 729If using
730.Sy build.sh , 730.Sy build.sh ,
731the default is 731the default is
732.Dq yes . 732.Dq yes .
733This may be set back to 733This may be set back to
734.Dq no 734.Dq no
735by giving 735by giving
736.Sy build.sh 736.Sy build.sh
737the 737the
738.Fl o 738.Fl o
739option. 739option.
740. 740.
741.It Sy MKUPDATE 741.It Sy MKUPDATE
742.YorN 742.YorN
743If set, then in addition to the effects described for 743If set, then in addition to the effects described for
744.Sy MKUPDATE=yes 744.Sy MKUPDATE=yes
745above, this implies the effects of 745above, this implies the effects of
746.Sy NOCLEANDIR 746.Sy NOCLEANDIR
747(i.e.,  747(i.e.,
748.Dq make cleandir 748.Dq make cleandir
749is avoided). 749is avoided).
750.DFLTn 750.DFLTn
751.Pp 751.Pp
752If using 752If using
753.Sy build.sh , 753.Sy build.sh ,
754this may be set by giving the 754this may be set by giving the
755.Fl u 755.Fl u
756option. 756option.
757. 757.
758.It Sy NBUILDJOBS 758.It Sy NBUILDJOBS
759Now obsolete. 759Now obsolete.
760Use the  760Use the
761.Xr make 1 761.Xr make 1
762option 762option
763.Fl j , 763.Fl j ,
764instead. 764instead.
765See below. 765See below.
766.DFLTu 766.DFLTu
767. 767.
768.It Sy NOCLEANDIR 768.It Sy NOCLEANDIR
769If set, avoids the 769If set, avoids the
770.Dq make cleandir 770.Dq make cleandir
771phase of a full build. 771phase of a full build.
772This has the effect of allowing only changed 772This has the effect of allowing only changed
773files in a source tree to be recompiled. 773files in a source tree to be recompiled.
774This can speed up builds when updating only a few files in the tree. 774This can speed up builds when updating only a few files in the tree.
775.DFLTu 775.DFLTu
776.Pp 776.Pp
777See also 777See also
778.Sy MKUPDATE . 778.Sy MKUPDATE .
779. 779.
780.It Sy NODISTRIBDIRS 780.It Sy NODISTRIBDIRS
781If set, avoids the 781If set, avoids the
782.Dq make distrib-dirs 782.Dq make distrib-dirs
783phase of a full build. 783phase of a full build.
784This skips running 784This skips running
785.Xr mtree 8 785.Xr mtree 8
786on 786on
787.Sy DESTDIR , 787.Sy DESTDIR ,
788useful on systems where building as an unprivileged user, or where it is 788useful on systems where building as an unprivileged user, or where it is
789known that the system-wide mtree files have not changed. 789known that the system-wide mtree files have not changed.
790.DFLTu 790.DFLTu
791. 791.
792.It Sy NOINCLUDES 792.It Sy NOINCLUDES
793If set, avoids the 793If set, avoids the
794.Dq make includes 794.Dq make includes
795phase of a full build. 795phase of a full build.
796This has the effect of preventing 796This has the effect of preventing
797.Xr make 1 797.Xr make 1
798from thinking that some programs are out-of-date simply because the 798from thinking that some programs are out-of-date simply because the
799system include files have changed. 799system include files have changed.
800However, this option should not be used when updating the entire 800However, this option should not be used when updating the entire
801.Nx 801.Nx
802source tree arbitrarily; it is suggested to use 802source tree arbitrarily; it is suggested to use
803.Sy MKUPDATE=yes 803.Sy MKUPDATE=yes
804instead in that case. 804instead in that case.
805.DFLTu 805.DFLTu
806. 806.
807.It Sy RELEASEDIR 807.It Sy RELEASEDIR
808If set, specifies the directory to which a 808If set, specifies the directory to which a
809.Xr release 7 809.Xr release 7
810layout will be written at the end of a 810layout will be written at the end of a
811.Dq make release . 811.Dq make release .
812If specified, must be an absolute path. 812If specified, must be an absolute path.
813.DFLTu 813.DFLTu
814.Pp 814.Pp
815.Em Note : 815.Em Note :
816.Sy build.sh 816.Sy build.sh
817will provide a default of 817will provide a default of
818.Pa releasedir 818.Pa releasedir
819(in the top-level 819(in the top-level
820.Sy .OBJDIR ) 820.Sy .OBJDIR )
821unless run in 821unless run in
822.Sq expert 822.Sq expert
823mode. 823mode.
824. 824.
825.El 825.El
826. 826.
827.Sh BUILDING 827.Sh BUILDING
828. 828.
829.Ss \*qmake\*q command line options 829.Ss \*qmake\*q command line options
830This is not a summary of all the options available to 830This is not a summary of all the options available to
831.Xr make 1 ; 831.Xr make 1 ;
832only the options used most frequently with 832only the options used most frequently with
833.Nx 833.Nx
834builds are listed here. 834builds are listed here.
835. 835.
836.Bl -tag -width "var=value" 836.Bl -tag -width "var=value"
837. 837.
838.It Fl j Ar njob 838.It Fl j Ar njob
839Run up to 839Run up to
840.Ar njob 840.Ar njob
841.Xr make 1  841.Xr make 1
842subjobs in parallel. 842subjobs in parallel.
843Makefiles should use .WAIT or have explicit dependencies  843Makefiles should use .WAIT or have explicit dependencies
844as necessary to enforce build ordering. 844as necessary to enforce build ordering.
845. 845.
846.It Fl m Ar dir 846.It Fl m Ar dir
847Specify the default directory for searching for system Makefile 847Specify the default directory for searching for system Makefile
848segments, mainly the 848segments, mainly the
849.Aq bsd.*.mk 849.Aq bsd.*.mk
850files. 850files.
851When building any full 851When building any full
852.Nx 852.Nx
853source tree, this should be set to the 853source tree, this should be set to the
854.Dq share/mk 854.Dq share/mk
855directory in the source tree. 855directory in the source tree.
856This is set automatically when building from the top level, or when using 856This is set automatically when building from the top level, or when using
857.Sy build.sh . 857.Sy build.sh .
858. 858.
859.It Fl n 859.It Fl n
860Display the commands that would have been executed, but do not 860Display the commands that would have been executed, but do not
861actually execute them. 861actually execute them.
862This will still cause recursion to take place. 862This will still cause recursion to take place.
863. 863.
864.It Fl V Ar var 864.It Fl V Ar var
865Print 865Print
866.Xr make 1 Ns 's 866.Xr make 1 Ns 's
867idea of the value of 867idea of the value of
868.Ar var . 868.Ar var .
869Does not build any targets. 869Does not build any targets.
870. 870.
871.It Em var=value 871.It Em var=value
872Set the variable 872Set the variable
873.Em var 873.Em var
874to 874to
875.Em value , 875.Em value ,
876overriding any setting specified by the process environment, the 876overriding any setting specified by the process environment, the
877.Sy MAKECONF 877.Sy MAKECONF
878configuration file, or the system Makefile segments. 878configuration file, or the system Makefile segments.
879. 879.
880.El 880.El
881. 881.
882.Ss \*qmake\*q targets 882.Ss \*qmake\*q targets
883. 883.
884These default targets may be built by running 884These default targets may be built by running
885.Xr make 1 885.Xr make 1
886in any subtree of the 886in any subtree of the
887.Nx 887.Nx
888source code. 888source code.
889It is recommended that none of these be used from the top 889It is recommended that none of these be used from the top
890level Makefile; as a specific exception, 890level Makefile; as a specific exception,
891.Dq make obj 891.Dq make obj
892and 892and
893.Dq make cleandir 893.Dq make cleandir
894are useful in that context. 894are useful in that context.
895. 895.
896.Bl -tag -width "dependall" 896.Bl -tag -width "dependall"
897. 897.
898.It Sy all 898.It Sy all
899Build programs, libraries, and preformatted documentation. 899Build programs, libraries, and preformatted documentation.
900. 900.
901.It Sy clean 901.It Sy clean
902Remove program and library object code files. 902Remove program and library object code files.
903. 903.
904.It Sy cleandir 904.It Sy cleandir
905Same as 905Same as
906.Sy clean , 906.Sy clean ,
907but also remove preformatted documentation, dependency files generated 907but also remove preformatted documentation, dependency files generated
908by 908by
909.Dq make depend , 909.Dq make depend ,
910and any other files known to be created at build time. 910and any other files known to be created at build time.
911. 911.
912.It Sy depend 912.It Sy depend
913Create dependency files 913Create dependency files
914.Sy ( .depend ) 914.Sy ( .depend )
915containing more detailed information about the dependencies of source 915containing more detailed information about the dependencies of source
916code on header files. 916code on header files.
917Allows programs to be recompiled automatically when a dependency changes. 917Allows programs to be recompiled automatically when a dependency changes.
918. 918.
919.It Sy dependall 919.It Sy dependall
920Does a 920Does a
921.Dq make depend 921.Dq make depend
922immediately followed by a 922immediately followed by a
923.Dq make all . 923.Dq make all .
924This improves cache locality of the build since both passes read the source 924This improves cache locality of the build since both passes read the source
925files in their entirety. 925files in their entirety.
926. 926.
927.It Sy distclean 927.It Sy distclean
928Synonym for 928Synonym for
929.Sy cleandir . 929.Sy cleandir .
930. 930.
931.It Sy includes 931.It Sy includes
932Build and install system header files. 932Build and install system header files.
933Typically needed before any system libraries or programs can be built. 933Typically needed before any system libraries or programs can be built.
934. 934.
935.It Sy install 935.It Sy install
936Install programs, libraries, and documentation into 936Install programs, libraries, and documentation into
937.Sy DESTDIR . 937.Sy DESTDIR .
938Few files will be installed to 938Few files will be installed to
939.Sy DESTDIR Ns Pa /dev , 939.Sy DESTDIR Ns Pa /dev ,
940.Sy DESTDIR Ns Pa /etc , 940.Sy DESTDIR Ns Pa /etc ,
941.Sy DESTDIR Ns Pa /root 941.Sy DESTDIR Ns Pa /root
942or 942or
943.Sy DESTDIR Ns Pa /var 943.Sy DESTDIR Ns Pa /var
944in order to prevent user supplied configuration data from being overwritten. 944in order to prevent user supplied configuration data from being overwritten.
945.It Sy lint 945.It Sy lint
946Run 946Run
947.Xr lint 1 947.Xr lint 1
948against the C source code, where appropriate, and generate 948against the C source code, where appropriate, and generate
949system-installed lint libraries. 949system-installed lint libraries.
950. 950.
951.It Sy obj 951.It Sy obj
952Create object directories to be used for built files, instead of 952Create object directories to be used for built files, instead of
953building directly in the source tree. 953building directly in the source tree.
954. 954.
955.It Sy tags 955.It Sy tags
956Create 956Create
957.Xr ctags 1 957.Xr ctags 1
958searchable function lists usable by the 958searchable function lists usable by the
959.Xr ex 1 959.Xr ex 1
960and 960and
961.Xr vi 1 961.Xr vi 1
962text editors. 962text editors.
963. 963.
964.El 964.El
965. 965.
966.Ss \*qmake\*q targets for the top level 966.Ss \*qmake\*q targets for the top level
967. 967.
968Additional 968Additional
969.Xr make 1 969.Xr make 1
970targets are usable specifically from the top source level to facilitate 970targets are usable specifically from the top source level to facilitate
971building the entire 971building the entire
972.Nx 972.Nx
973source tree. 973source tree.
974. 974.
975.Bl -tag -width "distribution" 975.Bl -tag -width "distribution"
976. 976.
977.It Sy build 977.It Sy build
978Build the entire 978Build the entire
979.Nx 979.Nx
980system (except the kernel). 980system (except the kernel).
981This orders portions of the source tree such that prerequisites 981This orders portions of the source tree such that prerequisites
982will be built in the proper order. 982will be built in the proper order.
983. 983.
984.It Sy distribution 984.It Sy distribution
985Do a 985Do a
986.Dq make build , 986.Dq make build ,
987and then install a full distribution (which does not include a kernel) into 987and then install a full distribution (which does not include a kernel) into
988.Sy DESTDIR , 988.Sy DESTDIR ,
989including files in 989including files in
990.Sy DESTDIR Ns Pa /dev , 990.Sy DESTDIR Ns Pa /dev ,
991.Sy DESTDIR Ns Pa /etc , 991.Sy DESTDIR Ns Pa /etc ,
992.Sy DESTDIR Ns Pa /root 992.Sy DESTDIR Ns Pa /root
993and 993and
994.Sy DESTDIR Ns Pa /var . 994.Sy DESTDIR Ns Pa /var .
995. 995.
996.It Sy buildworld 996.It Sy buildworld
997As per 997As per
998.Dq make distribution , 998.Dq make distribution ,
999except that it ensures that 999except that it ensures that
1000.Sy DESTDIR 1000.Sy DESTDIR
1001is not the root directory. 1001is not the root directory.
1002. 1002.
1003.It Sy installworld 1003.It Sy installworld
1004Install the distribution from 1004Install the distribution from
1005.Sy DESTDIR 1005.Sy DESTDIR
1006to 1006to
1007.Sy INSTALLWORLDDIR , 1007.Sy INSTALLWORLDDIR ,
1008which defaults to the root directory. 1008which defaults to the root directory.
1009Ensures that 1009Ensures that
1010.Sy INSTALLWORLDDIR 1010.Sy INSTALLWORLDDIR
1011is not the root directory if cross compiling. 1011is not the root directory if cross compiling.
1012.Pp 1012.Pp
1013The 1013The
1014.Sy INSTALLSETS 1014.Sy INSTALLSETS
1015environment variable may be set to a space-separated list of 1015environment variable may be set to a space-separated list of
1016distribution sets to be installed. 1016distribution sets to be installed.
1017By default, all sets except 1017By default, all sets except
1018.Dq etc 1018.Dq etc
1019and 1019and
1020.Dq xetc 1020.Dq xetc
1021are installed, so most files in 1021are installed, so most files in
1022.Sy INSTALLWORLDDIR Ns Pa /etc 1022.Sy INSTALLWORLDDIR Ns Pa /etc
1023will not be installed or modified. 1023will not be installed or modified.
1024.Pp 1024.Pp
1025.Em Note : 1025.Em Note :
1026Before performing this operation with 1026Before performing this operation with
1027.Sy INSTALLWORLDDIR Ns = Ns Pa / , 1027.Sy INSTALLWORLDDIR Ns = Ns Pa / ,
1028it is highly recommended that you upgrade your kernel and reboot. 1028it is highly recommended that you upgrade your kernel and reboot.
1029After performing this operation, 1029After performing this operation,
1030it is recommended that you use 1030it is recommended that you use
1031.Xr etcupdate 8 1031.Xr etcupdate 8
1032to update files in 1032to update files in
1033.Sy INSTALLWORLDDIR Ns Pa /etc 1033.Sy INSTALLWORLDDIR Ns Pa /etc
1034and that you use 1034and that you use
1035.Xr postinstall 8 1035.Xr postinstall 8
1036to check for inconsistencies (and possibly to fix them). 1036to check for inconsistencies (and possibly to fix them).
1037.It Sy sets 1037.It Sy sets
1038Create distribution sets from 1038Create distribution sets from
1039.Sy DESTDIR 1039.Sy DESTDIR
1040into 1040into
1041.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/sets . 1041.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/sets .
1042Should be run after 1042Should be run after
1043.Dq make distribution , 1043.Dq make distribution ,
1044as 1044as
1045.Dq make build 1045.Dq make build
1046alone does not install all of the required files. 1046alone does not install all of the required files.
1047. 1047.
1048.It Sy sourcesets 1048.It Sy sourcesets
1049Create source sets of the source tree into 1049Create source sets of the source tree into
1050.Sy RELEASEDIR Ns Pa /source/sets . 1050.Sy RELEASEDIR Ns Pa /source/sets .
1051. 1051.
1052.It Sy syspkgs 1052.It Sy syspkgs
1053Create syspkgs from 1053Create syspkgs from
1054.Sy DESTDIR 1054.Sy DESTDIR
1055into 1055into
1056.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/syspkgs . 1056.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/syspkgs .
1057Should be run after 1057Should be run after
1058.Dq make distribution , 1058.Dq make distribution ,
1059as 1059as
1060.Dq make build 1060.Dq make build
1061alone does not install all of the required files. 1061alone does not install all of the required files.
1062. 1062.
1063.It Sy release 1063.It Sy release
1064Do a 1064Do a
1065.Dq make distribution , 1065.Dq make distribution ,
1066build kernels, distribution media, and install sets 1066build kernels, distribution media, and install sets
1067(this as per 1067(this as per
1068.Dq make sets ) , 1068.Dq make sets ) ,
1069and 1069and
1070then package the system into a standard release layout as described by 1070then package the system into a standard release layout as described by
1071.Xr release 7 . 1071.Xr release 7 .
1072This requires that 1072This requires that
1073.Sy RELEASEDIR 1073.Sy RELEASEDIR
1074be set (see above). 1074be set (see above).
1075. 1075.
1076.It Sy iso-image 1076.It Sy iso-image
1077Create a 1077Create a
1078.Nx 1078.Nx
1079installation CD-ROM image in the 1079installation CD-ROM image in the
1080.Sy RELEASEDIR Ns Pa /iso 1080.Sy RELEASEDIR Ns Pa /iso
1081directory. 1081directory.
1082The CD-ROM file system will have a layout as described in 1082The CD-ROM file system will have a layout as described in
1083.Xr release 7 . 1083.Xr release 7 .
1084.Pp 1084.Pp
1085For most machine types, the CD-ROM will be bootable, and will automatically 1085For most machine types, the CD-ROM will be bootable, and will automatically
1086run the 1086run the
1087.Xr sysinst 8 1087.Xr sysinst 8
1088menu-based installation program, which can be used to install or upgrade a 1088menu-based installation program, which can be used to install or upgrade a
1089.Nx 1089.Nx
1090system. 1090system.
1091Bootable CD-ROMs also contain tools that may be useful in 1091Bootable CD-ROMs also contain tools that may be useful in
1092repairing a damaged 1092repairing a damaged
1093.Nx 1093.Nx
1094installation. 1094installation.
1095.Pp 1095.Pp
1096Before 1096Before
1097.Dq make iso-image 1097.Dq make iso-image
1098is attempted, RELEASEDIR must be populated by 1098is attempted, RELEASEDIR must be populated by
1099.Dq make release 1099.Dq make release
1100or equivalent. 1100or equivalent.
1101.Pp 1101.Pp
1102Note that other, smaller, CD-ROM images may be created in the 1102Note that other, smaller, CD-ROM images may be created in the
1103.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/cdrom 1103.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/cdrom
1104directory by 1104directory by
1105.Dq "make release" . 1105.Dq "make release" .
1106These smaller images usually contain the same tools as the larger images in 1106These smaller images usually contain the same tools as the larger images in
1107.Sy RELEASEDIR Ns Pa /iso , 1107.Sy RELEASEDIR Ns Pa /iso ,
1108but do not contain additional content such as the distribution sets. 1108but do not contain additional content such as the distribution sets.
1109.Pp 1109.Pp
1110Note that the mac68k port still uses an older method of creating 1110Note that the mac68k port still uses an older method of creating
1111CD-ROM images. 1111CD-ROM images.
1112This requires the 1112This requires the
1113.Xr mkisofs 1 1113.Xr mkisofs 1
1114utility, which is not part of 1114utility, which is not part of
1115.Nx , 1115.Nx ,
1116but which can be installed from 1116but which can be installed from
1117.Pa pkgsrc/sysutils/cdrtools . 1117.Pa pkgsrc/sysutils/cdrtools .
1118. 1118.
1119.It Sy iso-image-source 1119.It Sy iso-image-source
1120Create a 1120Create a
1121.Nx 1121.Nx
1122installation CD-ROM image in the 1122installation CD-ROM image in the
1123.Sy RELEASEDIR Ns Pa /iso 1123.Sy RELEASEDIR Ns Pa /iso
1124directory. 1124directory.
1125The CD-ROM file system will have a layout as described in 1125The CD-ROM file system will have a layout as described in
1126.Xr release 7 . 1126.Xr release 7 .
1127It will have top level directories for the machine type and source. 1127It will have top level directories for the machine type and source.
1128.Pp 1128.Pp
1129For most machine types, the CD-ROM will be bootable, and will automatically 1129For most machine types, the CD-ROM will be bootable, and will automatically
1130run the 1130run the
1131.Xr sysinst 8 1131.Xr sysinst 8
1132menu-based installation program, which can be used to install or upgrade a 1132menu-based installation program, which can be used to install or upgrade a
1133.Nx 1133.Nx
1134system. 1134system.
1135Bootable CD-ROMs also contain tools that may be useful in 1135Bootable CD-ROMs also contain tools that may be useful in
1136repairing a damaged 1136repairing a damaged
1137.Nx 1137.Nx
1138installation. 1138installation.
1139.Pp 1139.Pp
1140Before 1140Before
1141.Dq make iso-image-source 1141.Dq make iso-image-source
1142is attempted, RELEASEDIR must be populated by 1142is attempted, RELEASEDIR must be populated by
1143.Dq make sourcesets release 1143.Dq make sourcesets release
1144or equivalent. 1144or equivalent.
1145.Pp 1145.Pp
1146Note that other, smaller, CD-ROM images may be created in the 1146Note that other, smaller, CD-ROM images may be created in the
1147.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/cdrom 1147.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/cdrom
1148directory by 1148directory by
1149.Dq make release . 1149.Dq make release .
1150These smaller images usually contain the same tools as the larger images in 1150These smaller images usually contain the same tools as the larger images in
1151.Sy RELEASEDIR Ns Pa /iso , 1151.Sy RELEASEDIR Ns Pa /iso ,
1152but do not contain additional content such as the distribution sets. 1152but do not contain additional content such as the distribution sets.
1153.Pp 1153.Pp
1154Note that the mac68k port still uses an older method of creating 1154Note that the mac68k port still uses an older method of creating
1155CD-ROM images. 1155CD-ROM images.
1156This requires the 1156This requires the
1157.Xr mkisofs 1 1157.Xr mkisofs 1
1158utility, which is not part of 1158utility, which is not part of
1159.Nx , 1159.Nx ,
1160but which can be installed from 1160but which can be installed from
1161.Pa pkgsrc/sysutils/cdrtools . 1161.Pa pkgsrc/sysutils/cdrtools .
1162. 1162.
1163.It Sy install-image 1163.It Sy install-image
1164Create a bootable 1164Create a bootable
1165.Nx 1165.Nx
1166installation disk image in the 1166installation disk image in the
1167.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/installimage 1167.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/installimage
1168directory. 1168directory.
1169The installation disk image is suitable for copying to 1169The installation disk image is suitable for copying to
1170bootable USB flash memory sticks, etc., for machines which 1170bootable USB flash memory sticks, etc., for machines which
1171are able to boot from such devices. 1171are able to boot from such devices.
1172The file system in the bootable disk image will have a layout 1172The file system in the bootable disk image will have a layout
1173as described in 1173as described in
1174.Xr release 7 . 1174.Xr release 7 .
1175.Pp 1175.Pp
1176The installation image is bootable, and will automatically 1176The installation image is bootable, and will automatically
1177run the 1177run the
1178.Xr sysinst 8 1178.Xr sysinst 8
1179menu-based installation program, which can be used to install or upgrade a 1179menu-based installation program, which can be used to install or upgrade a
1180.Nx 1180.Nx
1181system. 1181system.
1182The image also contains tools that may be 1182The image also contains tools that may be
1183useful in repairing a damaged 1183useful in repairing a damaged
1184.Nx 1184.Nx
1185installation. 1185installation.
1186.Pp 1186.Pp
1187Before 1187Before
1188.Dq make install-image 1188.Dq make install-image
1189is attempted, 1189is attempted,
1190.Sy RELEASEDIR 1190.Sy RELEASEDIR
1191must be populated by 1191must be populated by
1192.Dq make release 1192.Dq make release
1193or equivalent. 1193or equivalent.
1194The build must have been performed with 1194The build must have been performed with
1195.Sy MKUNPRIVED=yes  1195.Sy MKUNPRIVED=yes
1196because 1196because
1197.Dq make install-image 1197.Dq make install-image
1198relies on information in 1198relies on information in
1199.Sy DESTDIR Ns Pa /METALOG . 1199.Sy DESTDIR Ns Pa /METALOG .
1200. 1200.
1201.It live-image 1201.It live-image
1202Create 1202Create
1203.Nx 1203.Nx
1204live images in the 1204live images in the
1205.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/liveimage 1205.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/liveimage
1206directory. 1206directory.
1207The live image contains all necessary files 1207The live image contains all necessary files
1208to boot 1208to boot
1209.Nx 1209.Nx
1210up to multi-user mode, including all files 1210up to multi-user mode, including all files
1211which should be extracted during installation, 1211which should be extracted during installation,
1212.Nx 1212.Nx
1213disklabel, bootloaders, etc. 1213disklabel, bootloaders, etc.
1214.Pp 1214.Pp
1215The live image is suitable for use as a disk image in 1215The live image is suitable for use as a disk image in
1216virtual machine environments such as QEMU, 1216virtual machine environments such as QEMU,
1217and also useful to boot 1217and also useful to boot
1218.Nx 1218.Nx
1219from a USB flash memory stick 1219from a USB flash memory stick
1220on a real machine, without the need for installation. 1220on a real machine, without the need for installation.
1221.Pp 1221.Pp
1222Before 1222Before
1223.Dq make live-image 1223.Dq make live-image
1224is attempted, RELEASEDIR must be populated by 1224is attempted, RELEASEDIR must be populated by
1225.Dq make release 1225.Dq make release
1226or equivalent. 1226or equivalent.
1227The build must have been performed with 1227The build must have been performed with
1228.Sy MKUNPRIVED=yes  1228.Sy MKUNPRIVED=yes
1229because 1229because
1230.Dq make install-image 1230.Dq make install-image
1231relies on information in 1231relies on information in
1232.Sy DESTDIR Ns Pa /METALOG . 1232.Sy DESTDIR Ns Pa /METALOG .
1233. 1233.
1234.It Sy regression-tests 1234.It Sy regression-tests
1235Can only be run after building the regression tests in the directory 1235Can only be run after building the regression tests in the directory
1236.Dq regress . 1236.Dq regress .
1237Runs those compiled regression tests on the local host. 1237Runs those compiled regression tests on the local host.
1238Note that most tests are now managed instead using 1238Note that most tests are now managed instead using
1239.Xr atf 7 ; 1239.Xr atf 7 ;
1240this target should probably run those as well but currently does not. 1240this target should probably run those as well but currently does not.
1241. 1241.
1242.El 1242.El
1243. 1243.
1244.Ss The \*qbuild.sh\*q script 1244.Ss The \*qbuild.sh\*q script
1245. 1245.
1246This script file is a shell script designed to build the 1246This script file is a shell script designed to build the
1247entire 1247entire
1248.Nx 1248.Nx
1249system on any host with a suitable modern shell and some common 1249system on any host with a suitable modern shell and some common
1250utilities. 1250utilities.
1251The required shell features are described under the 1251The required shell features are described under the
1252.Sy HOST_SH 1252.Sy HOST_SH
1253variable. 1253variable.
1254.Pp 1254.Pp
1255If a host system's default shell does support the required 1255If a host system's default shell does support the required
1256features, then we suggest that you explicitly specify 1256features, then we suggest that you explicitly specify
1257a suitable shell using a command like 1257a suitable shell using a command like
1258.Bd -unfilled -offset indent 1258.Bd -unfilled -offset indent
1259.Li /path/to/suitable/shell build.sh Op Ar options 1259.Li /path/to/suitable/shell build.sh Op Ar options
1260.Ed 1260.Ed
1261.Pp 1261.Pp
1262The above command will usually enable 1262The above command will usually enable
1263.Nm build.sh 1263.Nm build.sh
1264to automatically set 1264to automatically set
1265.Sy HOST_SH Ns Cm = Ns Pa /path/to/suitable/shell , 1265.Sy HOST_SH Ns Cm = Ns Pa /path/to/suitable/shell ,
1266but if that fails, then the following set of commands may be used instead: 1266but if that fails, then the following set of commands may be used instead:
1267.Bd -unfilled -offset indent 1267.Bd -unfilled -offset indent
1268.Li HOST_SH= Ns Va /path/to/suitable/shell 1268.Li HOST_SH= Ns Va /path/to/suitable/shell
1269.Li export HOST_SH 1269.Li export HOST_SH
1270.Li ${HOST_SH} build.sh Op Ar options 1270.Li ${HOST_SH} build.sh Op Ar options
1271.Ed 1271.Ed
1272.Pp 1272.Pp
1273If 1273If
1274.Sy build.sh 1274.Sy build.sh
1275detects that it is being executed under an unsuitable shell, it attempts 1275detects that it is being executed under an unsuitable shell, it attempts
1276to exec a suitable shell instead, or prints an error message. 1276to exec a suitable shell instead, or prints an error message.
1277If 1277If
1278.Sy HOST_SH 1278.Sy HOST_SH
1279is not set explicitly, then 1279is not set explicitly, then
1280.Nm build.sh 1280.Nm build.sh
1281sets a default using heuristics dependent on the host platform, 1281sets a default using heuristics dependent on the host platform,
1282or from the shell under which 1282or from the shell under which
1283.Nm build.sh 1283.Nm build.sh
1284is executed (if that can be determined), 1284is executed (if that can be determined),
1285or using the first copy of 1285or using the first copy of
1286.Pa sh 1286.Pa sh
1287found in 1287found in
1288.Sy PATH . 1288.Sy PATH .
1289.Pp 1289.Pp
1290All cross-compile builds, and most native builds, of the entire system 1290All cross-compile builds, and most native builds, of the entire system
1291should make use of 1291should make use of
1292.Sy build.sh 1292.Sy build.sh
1293rather than just running 1293rather than just running
1294.Dq make . 1294.Dq make .
1295This way, the 1295This way, the
1296.Xr make 1 1296.Xr make 1
1297program will be bootstrapped properly, in case the host system has an 1297program will be bootstrapped properly, in case the host system has an
1298older or incompatible 1298older or incompatible
1299.Dq make 1299.Dq make
1300program. 1300program.
1301.Pp 1301.Pp
1302When compiling the entire system via 1302When compiling the entire system via
1303.Sy build.sh , 1303.Sy build.sh ,
1304many 1304many
1305.Xr make 1 1305.Xr make 1
1306variables are set for you in order to help encapsulate the build 1306variables are set for you in order to help encapsulate the build
1307process. 1307process.
1308In the list of options below, variables that are automatically set by 1308In the list of options below, variables that are automatically set by
1309.Sy build.sh 1309.Sy build.sh
1310are noted where applicable. 1310are noted where applicable.
1311. 1311.
1312.Pp 1312.Pp
1313The following operations are supported by 1313The following operations are supported by
1314.Sy build.sh : 1314.Sy build.sh :
1315. 1315.
1316.Bl -tag -width "distribution" 1316.Bl -tag -width "distribution"
1317. 1317.
1318.It Sy build 1318.It Sy build
1319Build the system as per 1319Build the system as per
1320.Dq make build . 1320.Dq make build .
1321Before the main part of the build commences, this command runs the 1321Before the main part of the build commences, this command runs the
1322.Sy obj 1322.Sy obj
1323operation (unless the 1323operation (unless the
1324.Fl o 1324.Fl o
1325option is given), 1325option is given),
1326.Dq make cleandir 1326.Dq make cleandir
1327(unless the 1327(unless the
1328.Fl u 1328.Fl u
1329option is given), 1329option is given),
1330and the 1330and the
1331.Sy tools 1331.Sy tools
1332operation. 1332operation.
1333. 1333.
1334.It Sy distribution 1334.It Sy distribution
1335Build a full distribution as per 1335Build a full distribution as per
1336.Dq make distribution . 1336.Dq make distribution .
1337This command first runs the 1337This command first runs the
1338.Sy build 1338.Sy build
1339operation. 1339operation.
1340. 1340.
1341.It Sy release 1341.It Sy release
1342Build a full release as per 1342Build a full release as per
1343.Dq make release . 1343.Dq make release .
1344This command first runs the 1344This command first runs the
1345.Sy distribution 1345.Sy distribution
1346operation. 1346operation.
1347. 1347.
1348.It Sy makewrapper 1348.It Sy makewrapper
1349Create the 1349Create the
1350.Sy \*[toolprefix]make-MACHINE 1350.Sy \*[toolprefix]make-MACHINE
1351wrapper. 1351wrapper.
1352This operation is automatically performed for any of the other 1352This operation is automatically performed for any of the other
1353operations. 1353operations.
1354. 1354.
1355.It Sy cleandir 1355.It Sy cleandir
1356Perform 1356Perform
1357.Dq make cleandir . 1357.Dq make cleandir .
1358. 1358.
1359.It Sy obj 1359.It Sy obj
1360Perform 1360Perform
1361.Dq make obj . 1361.Dq make obj .
1362. 1362.
1363.It Sy tools 1363.It Sy tools
1364Build and install the host tools from 1364Build and install the host tools from
1365.Pa src/tools . 1365.Pa src/tools .
1366This command will first run 1366This command will first run
1367.Dq make obj 1367.Dq make obj
1368and 1368and
1369.Dq make cleandir 1369.Dq make cleandir
1370in the  1370in the
1371.Pa tools 1371.Pa tools
1372subdirectory unless the 1372subdirectory unless the
1373.Fl o 1373.Fl o
1374or 1374or
1375.Fl u 1375.Fl u
1376options (respectively) are given. 1376options (respectively) are given.
1377. 1377.
1378.It Sy install Ns = Ns Ar idir 1378.It Sy install Ns = Ns Ar idir
1379Install the contents of 1379Install the contents of
1380.Sy DESTDIR 1380.Sy DESTDIR
1381to 1381to
1382.Ar idir , 1382.Ar idir ,
1383using 1383using
1384.Dq make installworld . 1384.Dq make installworld .
1385Note that files that are part of the 1385Note that files that are part of the
1386.Dq etc 1386.Dq etc
1387or 1387or
1388.Dq xetc 1388.Dq xetc
1389sets will not be installed, unless overridden by 1389sets will not be installed, unless overridden by
1390the INSTALLSETS environment variable. 1390the INSTALLSETS environment variable.
1391. 1391.
1392.It Sy kernel Ns = Ns Ar kconf 1392.It Sy kernel Ns = Ns Ar kconf
1393Build a new kernel. 1393Build a new kernel.
1394The 1394The
1395.Ar kconf 1395.Ar kconf
1396argument is the name of a configuration file suitable 1396argument is the name of a configuration file suitable
1397for use by 1397for use by
1398.Xr config 1 . 1398.Xr config 1 .
1399If 1399If
1400.Ar kconf 1400.Ar kconf
1401does not contain any 1401does not contain any
1402.Sq / 1402.Sq /
1403characters, the configuration file is expected to be found in the 1403characters, the configuration file is expected to be found in the
1404.Sy KERNCONFDIR 1404.Sy KERNCONFDIR
1405directory, which is typically 1405directory, which is typically
1406.Sy sys/arch/MACHINE/conf . 1406.Sy sys/arch/MACHINE/conf .
1407The new kernel will be built in a subdirectory of 1407The new kernel will be built in a subdirectory of
1408.Sy KERNOBJDIR , 1408.Sy KERNOBJDIR ,
1409which is typically 1409which is typically
1410.Sy sys/arch/MACHINE/compile 1410.Sy sys/arch/MACHINE/compile
1411or an associated object directory. 1411or an associated object directory.
1412.Pp 1412.Pp
1413This command does 1413This command does
1414.Em not 1414.Em not
1415imply the 1415imply the
1416.Sy tools 1416.Sy tools
1417command; run the 1417command; run the
1418.Sy tools 1418.Sy tools
1419command first unless it is 1419command first unless it is
1420.Em certain 1420.Em certain
1421that the tools already exist and are up to date. 1421that the tools already exist and are up to date.
1422.Pp 1422.Pp
1423This command will run 1423This command will run
1424.Dq make cleandir 1424.Dq make cleandir
1425on the kernel in question first unless the 1425on the kernel in question first unless the
1426.Fl u 1426.Fl u
1427option is given. 1427option is given.
1428. 1428.
1429.It Sy modules 1429.It Sy modules
1430This command will build kernel modules and install them into 1430This command will build kernel modules and install them into
1431.Sy DESTDIR . 1431.Sy DESTDIR .
1432. 1432.
1433.It Sy releasekernel Ns = Ns Ar kconf 1433.It Sy releasekernel Ns = Ns Ar kconf
1434Install a 1434Install a
1435.Xr gzip 1 Ns ed 1435.Xr gzip 1 Ns ed
1436copy of the kernel previously built by 1436copy of the kernel previously built by
1437.Sy kernel Ns = Ns Ar kconf 1437.Sy kernel Ns = Ns Ar kconf
1438into 1438into
1439.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/kernel , 1439.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/kernel ,
1440usually as 1440usually as
1441.Pa netbsd- Ns Ar kconf Ns Pa .gz , 1441.Pa netbsd- Ns Ar kconf Ns Pa .gz ,
1442although the 1442although the
1443.Dq Pa netbsd 1443.Dq Pa netbsd
1444prefix is determined from the 1444prefix is determined from the
1445.Dq Sy config 1445.Dq Sy config
1446directives in 1446directives in
1447.Ar kconf . 1447.Ar kconf .
1448. 1448.
1449.It Sy sets 1449.It Sy sets
1450Perform 1450Perform
1451.Dq make sets . 1451.Dq make sets .
1452. 1452.
1453.It Sy sourcesets 1453.It Sy sourcesets
1454Perform 1454Perform
1455.Dq make sourcesets . 1455.Dq make sourcesets .
1456. 1456.
1457.It Sy syspkgs 1457.It Sy syspkgs
1458Perform 1458Perform
1459.Dq make syspkgs . 1459.Dq make syspkgs .
1460. 1460.
1461.It Sy iso-image 1461.It Sy iso-image
1462Perform 1462Perform
1463.Dq make iso-image . 1463.Dq make iso-image .
1464. 1464.
1465.It Sy iso-image-source 1465.It Sy iso-image-source
1466Perform 1466Perform
1467.Dq make iso-image-source . 1467.Dq make iso-image-source .
1468. 1468.
1469.It Sy install-image 1469.It Sy install-image
1470Perform 1470Perform
1471.Dq make install-image . 1471.Dq make install-image .
1472. 1472.
1473.It Sy live-image 1473.It Sy live-image
1474Perform 1474Perform
1475.Dq make live-image . 1475.Dq make live-image .
1476. 1476.
1477.El 1477.El
1478. 1478.
1479.Pp 1479.Pp
1480The following command line options alter the behaviour of the 1480The following command line options alter the behaviour of the
1481.Sy build.sh 1481.Sy build.sh
1482operations described above: 1482operations described above:
1483. 1483.
1484.Bl -tag -width "-T tools" 1484.Bl -tag -width "-T tools"
1485. 1485.
1486.It Fl a Ar arch 1486.It Fl a Ar arch
1487Set the value of 1487Set the value of
1488.Sy MACHINE_ARCH 1488.Sy MACHINE_ARCH
1489to 1489to
1490.Ar arch . 1490.Ar arch .
1491. 1491.
1492.It Fl B Ar buildid 1492.It Fl B Ar buildid
1493Set the value of 1493Set the value of
1494.Sy BUILDID 1494.Sy BUILDID
1495to 1495to
1496.Ar buildid . 1496.Ar buildid .
1497This will also append the build identifier to the name of the 1497This will also append the build identifier to the name of the
1498.Dq make 1498.Dq make
1499wrapper script so that the resulting name is of the form 1499wrapper script so that the resulting name is of the form
1500.Dq Sy \*[toolprefix]make-MACHINE-BUILDID . 1500.Dq Sy \*[toolprefix]make-MACHINE-BUILDID .
1501. 1501.
1502.It Fl C Ar cdextras 1502.It Fl C Ar cdextras
1503Append 1503Append
1504.Ar cdextras  1504.Ar cdextras
1505to the 1505to the
1506.Sy CDEXTRA 1506.Sy CDEXTRA
1507variable, 1507variable,
1508which is a space-separated list of files or directories that will be 1508which is a space-separated list of files or directories that will be
1509added to the CD-ROM image that may be create by the 1509added to the CD-ROM image that may be create by the
1510.Dq iso-image 1510.Dq iso-image
1511or 1511or
1512.Dq iso-image-source 1512.Dq iso-image-source
1513operations. 1513operations.
1514Files will be added to the root of the CD-ROM image, whereas directories 1514Files will be added to the root of the CD-ROM image, whereas directories
1515will be copied recursively. 1515will be copied recursively.
1516If relative paths are specified, they will be converted to 1516If relative paths are specified, they will be converted to
1517absolute paths before being used. 1517absolute paths before being used.
1518Multiple paths may be specified via multiple 1518Multiple paths may be specified via multiple
1519.Fl C 1519.Fl C
1520options, or via a single option whose argument contains multiple 1520options, or via a single option whose argument contains multiple
1521space-separated paths. 1521space-separated paths.
1522. 1522.
1523.It Fl D Ar dest 1523.It Fl D Ar dest
1524Set the value of 1524Set the value of
1525.Sy DESTDIR 1525.Sy DESTDIR
1526to 1526to
1527.Ar dest . 1527.Ar dest .
1528If a relative path is specified, it will be converted to an 1528If a relative path is specified, it will be converted to an
1529absolute path before being used. 1529absolute path before being used.
1530. 1530.
1531.It Fl E 1531.It Fl E
1532Set 1532Set
1533.Sq expert 1533.Sq expert
1534mode. 1534mode.
1535This overrides various sanity checks, and allows: 1535This overrides various sanity checks, and allows:
1536.Sy DESTDIR 1536.Sy DESTDIR
1537does not have to be set to a non-root path for builds, 1537does not have to be set to a non-root path for builds,
1538and 1538and
1539.Sy MKUNPRIVED=yes 1539.Sy MKUNPRIVED=yes
1540does not have to be set when building as a non-root user. 1540does not have to be set when building as a non-root user.
1541.Pp 1541.Pp
1542.Em Note : 1542.Em Note :
1543It is highly recommended that you know what you are doing when 1543It is highly recommended that you know what you are doing when
1544you use this option. 1544you use this option.
1545. 1545.
1546.It Fl h 1546.It Fl h
1547Print a help message. 1547Print a help message.
1548. 1548.
1549.It Fl j Ar njob 1549.It Fl j Ar njob
1550Run up to 1550Run up to
1551.Ar njob 1551.Ar njob
1552.Xr make 1  1552.Xr make 1
1553subjobs in parallel; 1553subjobs in parallel;
1554passed through to  1554passed through to
1555.Xr make 1 . 1555.Xr make 1 .
1556If you see failures for reasons other than running out of memory 1556If you see failures for reasons other than running out of memory
1557while using 1557while using
1558.Sy build.sh 1558.Sy build.sh
1559with 1559with
1560.Fl j , 1560.Fl j ,
1561please save complete build logs  1561please save complete build logs
1562so the failures can be analyzed. 1562so the failures can be analyzed.
1563.Pp 1563.Pp
1564To achieve the fastest builds, 1564To achieve the fastest builds,
1565.Fl j 1565.Fl j
1566values between (1 + the number of CPUs) and (2 * the number of CPUs) 1566values between (1 + the number of CPUs) and (2 * the number of CPUs)
1567are recommended. 1567are recommended.
1568Use lower values on machines with limited memory or I/O bandwidth. 1568Use lower values on machines with limited memory or I/O bandwidth.
1569. 1569.
1570.It Fl M Ar obj 1570.It Fl M Ar obj
1571Set 1571Set
1572.Sy MAKEOBJDIRPREFIX 1572.Sy MAKEOBJDIRPREFIX
1573to 1573to
1574.Ar obj . 1574.Ar obj .
1575Unsets 1575Unsets
1576.Sy MAKEOBJDIR . 1576.Sy MAKEOBJDIR .
1577See 1577See
1578.Dq Fl O obj 1578.Dq Fl O obj
1579for more information. 1579for more information.
1580.Pp 1580.Pp
1581For instance, if the source directory is 1581For instance, if the source directory is
1582.Pa /usr/src , 1582.Pa /usr/src ,
1583a setting of 1583a setting of
1584.Dq Fl M Pa /usr/obj 1584.Dq Fl M Pa /usr/obj

cvs diff -r1.61 -r1.62 src/share/man/man5/mk.conf.5 (switch to unified diff)

--- src/share/man/man5/mk.conf.5 2012/07/14 17:12:27 1.61
+++ src/share/man/man5/mk.conf.5 2012/09/19 23:06:22 1.62
@@ -1,932 +1,932 @@ @@ -1,932 +1,932 @@
1.\" $NetBSD: mk.conf.5,v 1.61 2012/07/14 17:12:27 wiz Exp $ 1.\" $NetBSD: mk.conf.5,v 1.62 2012/09/19 23:06:22 abs Exp $
2.\" 2.\"
3.\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc. 3.\" Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Luke Mewburn. 7.\" by Luke Mewburn.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd July 14, 2012 30.Dd September 19, 2012
31.Dt MK.CONF 5 31.Dt MK.CONF 5
32.Os 32.Os
33.\" turn off hyphenation 33.\" turn off hyphenation
34.hym 999 34.hym 999
35. 35.
36.Sh NAME 36.Sh NAME
37.Nm mk.conf 37.Nm mk.conf
38.Nd make configuration file 38.Nd make configuration file
39. 39.
40.Sh DESCRIPTION 40.Sh DESCRIPTION
41The 41The
42.Nm 42.Nm
43file overrides various parameters used during the build of the system. 43file overrides various parameters used during the build of the system.
44.Pp 44.Pp
45Listed below are the 45Listed below are the
46.Nm 46.Nm
47variables that may be set, the values to which each may be set, 47variables that may be set, the values to which each may be set,
48a brief description of what each variable does, and a reference to 48a brief description of what each variable does, and a reference to
49relevant manual pages. 49relevant manual pages.
50. 50.
51.Ss NetBSD System variables 51.Ss NetBSD System variables
52. 52.
53.de YorN 53.de YorN
54Can be set to 54Can be set to
55.Dq yes 55.Dq yes
56or 56or
57.Dq no . 57.Dq no .
58.. 58..
59.de DFLT 59.de DFLT
60.Pp 60.Pp
61.Em Default : 61.Em Default :
62.. 62..
63.de DFLTu 63.de DFLTu
64.DFLT 64.DFLT
65Unset. 65Unset.
66.. 66..
67.de DFLTy 67.de DFLTy
68.DFLT 68.DFLT
69.Dq yes 69.Dq yes
70.. 70..
71.de DFLTn 71.de DFLTn
72.DFLT 72.DFLT
73.Dq no 73.Dq no
74.. 74..
75.Bl -tag -width MKDYNAMICROOT 75.Bl -tag -width MKDYNAMICROOT
76. 76.
77.It Sy NETBSDSRCDIR 77.It Sy NETBSDSRCDIR
78The path to the top level of the 78The path to the top level of the
79.Nx 79.Nx
80sources. 80sources.
81If 81If
82.Xr make 1 82.Xr make 1
83is run from within the 83is run from within the
84.Nx 84.Nx
85source tree, the default is the top 85source tree, the default is the top
86level of that tree (as determined by the presence of 86level of that tree (as determined by the presence of
87.Pa build.sh 87.Pa build.sh
88and 88and
89.Pa tools/ ) , 89.Pa tools/ ) ,
90otherwise 90otherwise
91.Sy BSDSRCDIR 91.Sy BSDSRCDIR
92will be used. 92will be used.
93. 93.
94.It Sy BSDOBJDIR 94.It Sy BSDOBJDIR
95The real path to the 95The real path to the
96.Sq obj 96.Sq obj
97tree for the 97tree for the
98.Nx 98.Nx
99source tree. 99source tree.
100.DFLT 100.DFLT
101.Pa /usr/obj 101.Pa /usr/obj
102. 102.
103.It Sy BSDSRCDIR 103.It Sy BSDSRCDIR
104The real path to the 104The real path to the
105.Nx 105.Nx
106source tree. 106source tree.
107.DFLT 107.DFLT
108.Pa /usr/src 108.Pa /usr/src
109. 109.
110.It Sy BUILD 110.It Sy BUILD
111If defined, 111If defined,
112.Sq "make install" 112.Sq "make install"
113checks that the targets in the source directories are up-to-date and 113checks that the targets in the source directories are up-to-date and
114re-makes them if they are out of date, instead of blindly trying to install 114re-makes them if they are out of date, instead of blindly trying to install
115out of date or non-existent targets. 115out of date or non-existent targets.
116.DFLTu 116.DFLTu
117. 117.
118.It Sy BUILDID 118.It Sy BUILDID
119Identifier for the build. 119Identifier for the build.
120The identifier will be appended to 120The identifier will be appended to
121object directory names, and can be consulted in the 121object directory names, and can be consulted in the
122.Xr make 1 122.Xr make 1
123configuration file in order to set additional build parameters, 123configuration file in order to set additional build parameters,
124such as compiler flags. 124such as compiler flags.
125.DFLTu 125.DFLTu
126. 126.
127.It Sy COPTS 127.It Sy COPTS
128Extra options for the C compiler. 128Extra options for the C compiler.
129Should be appended to (e.g., 129Should be appended to (e.g.,
130.Sy COPTS+=-g ) , 130.Sy COPTS+=-g ) ,
131rather than explicitly set. 131rather than explicitly set.
132Note that 132Note that
133.Sy CPUFLAGS , 133.Sy CPUFLAGS ,
134not 134not
135.Sy COPTS , 135.Sy COPTS ,
136should be used for 136should be used for
137compiler flags that select CPU-related options. 137compiler flags that select CPU-related options.
138Also note that 138Also note that
139.Sy CFLAGS 139.Sy CFLAGS
140should never be set in 140should never be set in
141.Nm . 141.Nm .
142. 142.
143.It Sy CPUFLAGS 143.It Sy CPUFLAGS
144Additional flags passed to the compiler/assembler to select 144Additional flags passed to the compiler/assembler to select
145CPU instruction set options, CPU tuning options, etc. 145CPU instruction set options, CPU tuning options, etc.
146Such options should not be specified in 146Such options should not be specified in
147.Sy COPTS , 147.Sy COPTS ,
148because some parts of the build process need to override 148because some parts of the build process need to override
149CPU-related compiler options. 149CPU-related compiler options.
150. 150.
151.It Sy DESTDIR 151.It Sy DESTDIR
152Directory to contain the built 152Directory to contain the built
153.Nx 153.Nx
154system. 154system.
155If set, special options are passed to the compilation tools to 155If set, special options are passed to the compilation tools to
156prevent their default use of the host system's 156prevent their default use of the host system's
157.Sy /usr/include , /usr/lib , 157.Sy /usr/include , /usr/lib ,
158and so forth. 158and so forth.
159This pathname should 159This pathname should
160.Em not 160.Em not
161end with a slash 161end with a slash
162.Pq / 162.Pq /
163character (for installation into the system's root directory, set 163character (for installation into the system's root directory, set
164.Sy DESTDIR 164.Sy DESTDIR
165to an empty string). 165to an empty string).
166The directory must reside on a file system which supports long file 166The directory must reside on a file system which supports long file
167names and hard links. 167names and hard links.
168.DFLT 168.DFLT
169Empty string if 169Empty string if
170.Sy USETOOLS 170.Sy USETOOLS
171is 171is
172.Dq yes ; 172.Dq yes ;
173unset otherwise. 173unset otherwise.
174.Pp 174.Pp
175.Em Note : 175.Em Note :
176.Sy build.sh 176.Sy build.sh
177will provide a default of 177will provide a default of
178.Pa destdir. Ns Sy MACHINE 178.Pa destdir. Ns Sy MACHINE
179(in the top-level 179(in the top-level
180.Sy .OBJDIR ) 180.Sy .OBJDIR )
181unless run in 181unless run in
182.Sq expert 182.Sq expert
183mode 183mode
184. 184.
185.It Sy MAKEVERBOSE 185.It Sy MAKEVERBOSE
186Level of verbosity of status messages. 186Level of verbosity of status messages.
187Supported values: 187Supported values:
188.Bl -tag -width xxx 188.Bl -tag -width xxx
189.It 0 189.It 0
190No descriptive messages or commands executed by 190No descriptive messages or commands executed by
191.Xr make 1 191.Xr make 1
192are shown. 192are shown.
193.It 1 193.It 1
194Brief messages are shown describing what is being done, 194Brief messages are shown describing what is being done,
195but the actual commands executed by 195but the actual commands executed by
196.Xr make 1 196.Xr make 1
197are not displayed. 197are not displayed.
198.It 2 198.It 2
199Descriptive messages are shown as above (prefixed with a 199Descriptive messages are shown as above (prefixed with a
200.Sq # ) , 200.Sq # ) ,
201and ordinary commands performed by 201and ordinary commands performed by
202.Xr make 1 202.Xr make 1
203are displayed. 203are displayed.
204.It 3 204.It 3
205In addition to the above, all commands performed by 205In addition to the above, all commands performed by
206.Xr make 1 206.Xr make 1
207are displayed, even if they would ordinarily have been hidden 207are displayed, even if they would ordinarily have been hidden
208through use of the 208through use of the
209.Dq \&@ 209.Dq \&@
210prefix in the relevant makefile. 210prefix in the relevant makefile.
211.It 4 211.It 4
212In addition to the above, commands executed by 212In addition to the above, commands executed by
213.Xr make 1 213.Xr make 1
214are traced through use of the 214are traced through use of the
215.Xr sh 1 215.Xr sh 1
216.Dq Fl x 216.Dq Fl x
217flag. 217flag.
218.El 218.El
219.DFLT 219.DFLT
2202 2202
221. 221.
222.It Sy MKATF 222.It Sy MKATF
223.YorN 223.YorN
224Indicates whether the Automated Testing Framework is built and installed. 224Indicates whether the Automated Testing Framework is built and installed.
225.DFLTy 225.DFLTy
226. 226.
227.It Sy MKBINUTILS 227.It Sy MKBINUTILS
228.YorN 228.YorN
229Indicates whether any of the binutils tools or libraries should be built. 229Indicates whether any of the binutils tools or libraries should be built.
230That is, the libraries 230That is, the libraries
231.Sy libbfd , 231.Sy libbfd ,
232.Sy libiberty , 232.Sy libiberty ,
233or any of the things that depend upon them, e.g. 233or any of the things that depend upon them, e.g.
234.Xr as 1 , 234.Xr as 1 ,
235.Xr ld 1 , 235.Xr ld 1 ,
236.Xr dbsym 8 , 236.Xr dbsym 8 ,
237or 237or
238.Xr mdsetimage 8 . 238.Xr mdsetimage 8 .
239.DFLTy 239.DFLTy
240. 240.
241.It Sy MKCATPAGES 241.It Sy MKCATPAGES
242.YorN 242.YorN
243Indicates whether preformatted plaintext manual pages will be created 243Indicates whether preformatted plaintext manual pages will be created
244and installed. 244and installed.
245.DFLTy 245.DFLTy
246. 246.
247.It Sy MKCOMPLEX 247.It Sy MKCOMPLEX
248.YorN 248.YorN
249Indicates whether the 249Indicates whether the
250.Lb libm 250.Lb libm
251is compiled with support for 251is compiled with support for
252.In complex.h . 252.In complex.h .
253.DFLTy 253.DFLTy
254. 254.
255.It Sy MKCRYPTO 255.It Sy MKCRYPTO
256.YorN 256.YorN
257Indicates whether cryptographic code will be included in a build; 257Indicates whether cryptographic code will be included in a build;
258provided for the benefit of countries that do not allow strong 258provided for the benefit of countries that do not allow strong
259cryptography. 259cryptography.
260Will not affect use of the standard low-security password encryption system, 260Will not affect use of the standard low-security password encryption system,
261.Xr crypt 3 . 261.Xr crypt 3 .
262.DFLTy 262.DFLTy
263.Pp 263.Pp
264If 264If
265.Dq no , 265.Dq no ,
266acts as 266acts as
267.Sy MKKERBEROS=no . 267.Sy MKKERBEROS=no .
268. 268.
269.It Sy MKCRYPTO_RC5 269.It Sy MKCRYPTO_RC5
270.YorN 270.YorN
271Indicates whether RC5 support will be built into 271Indicates whether RC5 support will be built into
272.Sy libcrypto_rc5.a . 272.Sy libcrypto_rc5.a .
273.DFLTn 273.DFLTn
274. 274.
275.It Sy MKCVS 275.It Sy MKCVS
276.YorN 276.YorN
277Indicates whether 277Indicates whether
278.Xr cvs 1 278.Xr cvs 1
279is built. 279is built.
280.DFLTy 280.DFLTy
281. 281.
282.It Sy MKDEBUG 282.It Sy MKDEBUG
283.YorN 283.YorN
284Indicates whether separate debugging symbols should be installed into 284Indicates whether separate debugging symbols should be installed into
285.Sy DESTDIR Ns Pa /usr/libdata/debug . 285.Sy DESTDIR Ns Pa /usr/libdata/debug .
286.DFLTn 286.DFLTn
287. 287.
288.It Sy MKDEBUGLIB 288.It Sy MKDEBUGLIB
289.YorN 289.YorN
290Indicates whether debug libraries 290Indicates whether debug libraries
291.Sy ( lib*_g.a ) 291.Sy ( lib*_g.a )
292will be built and installed. 292will be built and installed.
293Debug libraries are compiled with 293Debug libraries are compiled with
294.Dq Li -g -DDEBUG . 294.Dq Li -g -DDEBUG .
295.DFLTn 295.DFLTn
296. 296.
297.It Sy MKDOC 297.It Sy MKDOC
298.YorN 298.YorN
299Indicates whether system documentation destined for 299Indicates whether system documentation destined for
300.Sy DESTDIR Ns Pa /usr/share/doc 300.Sy DESTDIR Ns Pa /usr/share/doc
301will be installed. 301will be installed.
302.DFLTy 302.DFLTy
303. 303.
304.It Sy MKDYNAMICROOT 304.It Sy MKDYNAMICROOT
305.YorN 305.YorN
306Indicates whether all programs should be dynamically linked, 306Indicates whether all programs should be dynamically linked,
307and to install shared libraries required by 307and to install shared libraries required by
308.Pa /bin 308.Pa /bin
309and 309and
310.Pa /sbin 310.Pa /sbin
311and the shared linker 311and the shared linker
312.Xr ld.elf_so 1 312.Xr ld.elf_so 1
313into 313into
314.Pa /lib . 314.Pa /lib .
315If 315If
316.Sq no , 316.Sq no ,
317link programs in 317link programs in
318.Pa /bin 318.Pa /bin
319and 319and
320.Pa /sbin 320.Pa /sbin
321statically. 321statically.
322.DFLTy 322.DFLTy
323. 323.
324.It Sy MKGCC 324.It Sy MKGCC
325.YorN 325.YorN
326Indicates whether 326Indicates whether
327.Xr gcc 1 327.Xr gcc 1
328or any related libraries 328or any related libraries
329.Pq Sy libg2c , libgcc , libobjc , libstdc++ 329.Pq Sy libg2c , libgcc , libobjc , libstdc++
330are built. 330are built.
331.DFLTy 331.DFLTy
332. 332.
333.It Sy MKGCCCMDS 333.It Sy MKGCCCMDS
334.YorN 334.YorN
335Indicates whether 335Indicates whether
336.Xr gcc 1 336.Xr gcc 1
337is built. 337is built.
338If 338If
339.Dq no , 339.Dq no ,
340then 340then
341.Sy MKGCC 341.Sy MKGCC
342controls if the 342controls if the
343GCC libraries are built. 343GCC libraries are built.
344.DFLTy 344.DFLTy
345. 345.
346.It Sy MKGDB 346.It Sy MKGDB
347.YorN 347.YorN
348Indicates whether 348Indicates whether
349.Xr gdb 1 349.Xr gdb 1
350is built. 350is built.
351.DFLTy 351.DFLTy
352. 352.
353.It Sy MKHESIOD 353.It Sy MKHESIOD
354.YorN 354.YorN
355Indicates whether the Hesiod infrastructure 355Indicates whether the Hesiod infrastructure
356(libraries and support programs) is built and installed. 356(libraries and support programs) is built and installed.
357.DFLTy 357.DFLTy
358. 358.
359.It Sy MKHOSTOBJ 359.It Sy MKHOSTOBJ
360.YorN 360.YorN
361If set to 361If set to
362.Dq yes , 362.Dq yes ,
363then for programs intended to be run on the compile host, 363then for programs intended to be run on the compile host,
364the name, release, and architecture of the host operating system 364the name, release, and architecture of the host operating system
365will be suffixed to the name of the object directory created by 365will be suffixed to the name of the object directory created by
366.Dq make obj . 366.Dq make obj .
367(This allows multiple host systems to compile 367(This allows multiple host systems to compile
368.Nx 368.Nx
369for a single target.) 369for a single target.)
370If set to 370If set to
371.Dq no , 371.Dq no ,
372then programs built to be run on the compile host will use the same 372then programs built to be run on the compile host will use the same
373object directory names as programs built to be run on the target. 373object directory names as programs built to be run on the target.
374.DFLTn 374.DFLTn
375. 375.
376.It Sy MKHTML 376.It Sy MKHTML
377.YorN 377.YorN
378Indicates whether the HTML manual pages are created and installed. 378Indicates whether the HTML manual pages are created and installed.
379.DFLTy 379.DFLTy
380. 380.
381.It Sy MKIEEEFP 381.It Sy MKIEEEFP
382.YorN 382.YorN
383Indicates whether code for IEEE754/IEC60559 conformance is built. 383Indicates whether code for IEEE754/IEC60559 conformance is built.
384Has no effect on most platforms. 384Has no effect on most platforms.
385.DFLTy 385.DFLTy
386. 386.
387.It Sy MKINET6 387.It Sy MKINET6
388Indicates whether INET6 (IPv6) infrastructure 388Indicates whether INET6 (IPv6) infrastructure
389(libraries and support programs) is built and installed. 389(libraries and support programs) is built and installed.
390.DFLTy 390.DFLTy
391. 391.
392.It Sy MKINFO 392.It Sy MKINFO
393.YorN 393.YorN
394Indicates whether GNU Info files, used for the documentation for 394Indicates whether GNU Info files, used for the documentation for
395most of the compilation tools, will be built and installed. 395most of the compilation tools, will be built and installed.
396.DFLTy 396.DFLTy
397. 397.
398.It Sy MKIPFILTER 398.It Sy MKIPFILTER
399.YorN 399.YorN
400Indicates whether the 400Indicates whether the
401.Xr ipf 4 401.Xr ipf 4
402programs, headers and other components will be built and installed. 402programs, headers and other components will be built and installed.
403.DFLTy 403.DFLTy
404. 404.
405.It Sy MKISCSI 405.It Sy MKISCSI
406.YorN 406.YorN
407Indicates whether the iSCSI library and applications are 407Indicates whether the iSCSI library and applications are
408built and installed. 408built and installed.
409.DFLTy 409.DFLTy
410. 410.
411.It Sy MKKERBEROS 411.It Sy MKKERBEROS
412.YorN 412.YorN
413Indicates whether the Kerberos v5 infrastructure 413Indicates whether the Kerberos v5 infrastructure
414(libraries and support programs) is built and installed. 414(libraries and support programs) is built and installed.
415Caution: the default 415Caution: the default
416.Xr pam 8 416.Xr pam 8
417configuration requires that Kerberos be present even if not used. 417configuration requires that Kerberos be present even if not used.
418Do not install a userland without Kerberos without also either 418Do not install a userland without Kerberos without also either
419updating the 419updating the
420.Xr pam.conf 5 420.Xr pam.conf 5
421files or disabling PAM via 421files or disabling PAM via
422.Sy MKPAM . 422.Sy MKPAM .
423Otherwise all logins will fail. 423Otherwise all logins will fail.
424.DFLTy 424.DFLTy
425. 425.
426.It Sy MKKMOD 426.It Sy MKKMOD
427.YorN 427.YorN
428Indicates whether kernel modules are built and installed. 428Indicates whether kernel modules are built and installed.
429.DFLTy 429.DFLTy
430. 430.
431.It Sy MKLDAP 431.It Sy MKLDAP
432.YorN 432.YorN
433Indicates whether the Lightweight Directory Access Protocol (LDAP) 433Indicates whether the Lightweight Directory Access Protocol (LDAP)
434infrastructure 434infrastructure
435(libraries and support programs) is built and installed. 435(libraries and support programs) is built and installed.
436.DFLTy 436.DFLTy
437. 437.
438.It Sy MKLINKLIB 438.It Sy MKLINKLIB
439.YorN 439.YorN
440Indicates whether all of the shared library infrastructure is built. 440Indicates whether all of the shared library infrastructure is built.
441If 441If
442.Sq no , 442.Sq no ,
443prevents: 443prevents:
444installation of the 444installation of the
445.Sy *.a 445.Sy *.a
446libraries, 446libraries,
447installation of the 447installation of the
448.Sy *_pic.a 448.Sy *_pic.a
449libraries on PIC systems, 449libraries on PIC systems,
450building of 450building of
451.Sy *.a 451.Sy *.a
452libraries on PIC systems, 452libraries on PIC systems,
453or 453or
454installation of 454installation of
455.Sy .so 455.Sy .so
456symlinks on ELF systems. 456symlinks on ELF systems.
457.DFLTy 457.DFLTy
458.Pp 458.Pp
459If 459If
460.Dq no , 460.Dq no ,
461acts as 461acts as
462.Sy MKPICINSTALL=no MKPROFILE=no . 462.Sy MKPICINSTALL=no MKPROFILE=no .
463. 463.
464.It Sy MKLINT 464.It Sy MKLINT
465.YorN 465.YorN
466Indicates whether 466Indicates whether
467.Xr lint 1 467.Xr lint 1
468will be run against portions of the 468will be run against portions of the
469.Nx 469.Nx
470source code during the build, and whether lint libraries will be 470source code during the build, and whether lint libraries will be
471installed into 471installed into
472.Sy DESTDIR Ns Pa /usr/libdata/lint . 472.Sy DESTDIR Ns Pa /usr/libdata/lint .
473.DFLTy 473.DFLTy
474. 474.
475.It Sy MKMAN 475.It Sy MKMAN
476.YorN 476.YorN
477Indicates whether manual pages will be installed. 477Indicates whether manual pages will be installed.
478.DFLTy 478.DFLTy
479.Pp 479.Pp
480If 480If
481.Dq no , 481.Dq no ,
482acts as 482acts as
483.Sy MKCATPAGES=no MKHTML=no . 483.Sy MKCATPAGES=no MKHTML=no .
484. 484.
485.It Sy MKMANZ 485.It Sy MKMANZ
486.YorN 486.YorN
487Indicates whether manual pages should be compressed with 487Indicates whether manual pages should be compressed with
488.Xr gzip 1 488.Xr gzip 1
489at installation time. 489at installation time.
490.DFLTn 490.DFLTn
491. 491.
492.It Sy MKMDNS 492.It Sy MKMDNS
493.YorN 493.YorN
494Indicates whether the mDNS (Multicast DNS) infrastructure 494Indicates whether the mDNS (Multicast DNS) infrastructure
495(libraries and support programs) is built and installed. 495(libraries and support programs) is built and installed.
496.DFLTy 496.DFLTy
497. 497.
498.It Sy MKNLS 498.It Sy MKNLS
499.YorN 499.YorN
500Indicates whether Native Language System (NLS) locale zone files will be 500Indicates whether Native Language System (NLS) locale zone files will be
501built and installed. 501built and installed.
502.DFLTy 502.DFLTy
503. 503.
504.It Sy MKOBJ 504.It Sy MKOBJ
505.YorN 505.YorN
506Indicates whether object directories will be created when running 506Indicates whether object directories will be created when running
507.Dq make obj . 507.Dq make obj .
508If set to 508If set to
509.Dq no , 509.Dq no ,
510then all built files will be located inside the regular source tree. 510then all built files will be located inside the regular source tree.
511.DFLTy 511.DFLTy
512.Pp 512.Pp
513If 513If
514.Dq no , 514.Dq no ,
515acts as 515acts as
516.Sy MKOBJDIRS=no . 516.Sy MKOBJDIRS=no .
517. 517.
518.It Sy MKOBJDIRS 518.It Sy MKOBJDIRS
519.YorN 519.YorN
520Indicates whether object directories will be created automatically 520Indicates whether object directories will be created automatically
521(via a 521(via a
522.Dq make obj 522.Dq make obj
523pass) at the start of a build. 523pass) at the start of a build.
524.DFLTn 524.DFLTn
525. 525.
526.It Sy MKPAM 526.It Sy MKPAM
527.YorN 527.YorN
528Indicates whether the 528Indicates whether the
529.Xr pam 8 529.Xr pam 8
530framework (libraries and support files) is built. 530framework (libraries and support files) is built.
531The pre-PAM code is not supported and may be removed in the future. 531The pre-PAM code is not supported and may be removed in the future.
532.DFLTy 532.DFLTy
533. 533.
534.It Sy MKPCC 534.It Sy MKPCC
535.YorN 535.YorN
536Indicates whether 536Indicates whether
537.Xr pcc 1 537.Xr pcc 1
538or any related libraries 538or any related libraries
539.Pq Sy libpcc , libpccsoftfloat 539.Pq Sy libpcc , libpccsoftfloat
540are built. 540are built.
541.DFLTn 541.DFLTn
542. 542.
543.It Sy MKPF 543.It Sy MKPF
544.YorN 544.YorN
545Indicates whether the 545Indicates whether the
546.Xr pf 4 546.Xr pf 4
547programs, headers and LKM will be built and installed. 547programs, headers and LKM will be built and installed.
548.DFLTy 548.DFLTy
549. 549.
550.It Sy MKPIC 550.It Sy MKPIC
551.YorN 551.YorN
552Indicates whether shared objects and libraries will be created and 552Indicates whether shared objects and libraries will be created and
553installed. 553installed.
554If set to 554If set to
555.Dq no , 555.Dq no ,
556the entire built system will be statically linked. 556the entire built system will be statically linked.
557.DFLT 557.DFLT
558Platform dependent. 558Platform dependent.
559As of this writing, all platforms except 559As of this writing, all platforms except
560.Sy m68000 560.Sy m68000
561and 561and
562.Sy sh3 562.Sy sh3
563default to 563default to
564.Dq yes . 564.Dq yes .
565.Pp 565.Pp
566If 566If
567.Dq no , 567.Dq no ,
568acts as 568acts as
569.Sy MKPICLIB=no . 569.Sy MKPICLIB=no .
570. 570.
571.It Sy MKPICINSTALL 571.It Sy MKPICINSTALL
572.YorN 572.YorN
573Indicates whether the 573Indicates whether the
574.Xr ar 1 574.Xr ar 1
575format libraries 575format libraries
576.Sy ( lib*_pic.a ) , 576.Sy ( lib*_pic.a ) ,
577used to generate shared libraries, are installed. 577used to generate shared libraries, are installed.
578.DFLTy 578.DFLTy
579. 579.
580.It Sy MKPICLIB 580.It Sy MKPICLIB
581.YorN 581.YorN
582Indicates whether the 582Indicates whether the
583.Xr ar 1 583.Xr ar 1
584format libraries 584format libraries
585.Sy ( lib*_pic.a ) , 585.Sy ( lib*_pic.a ) ,
586used to generate shared libraries. 586used to generate shared libraries.
587.DFLTy 587.DFLTy
588. 588.
589.It Sy MKPIE 589.It Sy MKPIE
590Indicates whether Position Independent Executables (PIE) 590Indicates whether Position Independent Executables (PIE)
591are built and installed. 591are built and installed.
592.DFLTn 592.DFLTn
593. 593.
594.It Sy MKPOSTFIX 594.It Sy MKPOSTFIX
595.YorN 595.YorN
596Indicates whether Postfix is built. 596Indicates whether Postfix is built.
597.DFLTy 597.DFLTy
598. 598.
599.It Sy MKPROFILE 599.It Sy MKPROFILE
600.YorN 600.YorN
601Indicates whether profiled libraries 601Indicates whether profiled libraries
602.Sy ( lib*_p.a ) 602.Sy ( lib*_p.a )
603will be built and installed. 603will be built and installed.
604.DFLT 604.DFLT
605.Dq yes ; 605.Dq yes ;
606however, some platforms turn off 606however, some platforms turn off
607.Sy MKPROFILE 607.Sy MKPROFILE
608by default at times due to toolchain problems with profiled code. 608by default at times due to toolchain problems with profiled code.
609. 609.
610.It Sy MKSHARE 610.It Sy MKSHARE
611.YorN 611.YorN
612Indicates whether files destined to reside in 612Indicates whether files destined to reside in
613.Sy DESTDIR Ns Pa /usr/share 613.Sy DESTDIR Ns Pa /usr/share
614will be built and installed. 614will be built and installed.
615.DFLTy 615.DFLTy
616.Pp 616.Pp
617If 617If
618.Dq no , 618.Dq no ,
619acts as 619acts as
620.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no . 620.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no .
621. 621.
622.It Sy MKSKEY 622.It Sy MKSKEY
623.YorN 623.YorN
624Indicates whether the S/key infrastructure 624Indicates whether the S/key infrastructure
625(libraries and support programs) is built. 625(libraries and support programs) is built.
626.DFLTy 626.DFLTy
627. 627.
628.It Sy MKSOFTFLOAT 628.It Sy MKSOFTFLOAT
629.YorN 629.YorN
630Indicates whether the compiler generates output containing 630Indicates whether the compiler generates output containing
631library calls for floating point and possibly soft-float library 631library calls for floating point and possibly soft-float library
632support. 632support.
633.DFLTn 633.DFLTn
634. 634.
635.It Sy MKSTATICLIB 635.It Sy MKSTATICLIB
636.YorN 636.YorN
637Indicates whether the normal static libraries 637Indicates whether the normal static libraries
638.Sy ( lib*_g.a ) 638.Sy ( lib*_g.a )
639will be built and installed. 639will be built and installed.
640.DFLTy 640.DFLTy
641. 641.
642.It Sy MKSTRIPIDENT 642.It Sy MKSTRIPIDENT
643.YorN 643.YorN
644Indicates whether program binaries and shared libraries should be built 644Indicates whether RCS IDs, for use with
645to include RCS IDs for use with 645.Xr ident 1 ,
646.Xr ident 1 . 646should be stripped from program binaries and shared libraries.
647.DFLTn 647.DFLTn
648. 648.
649.It Sy MKUNPRIVED 649.It Sy MKUNPRIVED
650.YorN 650.YorN
651Indicates whether an unprivileged install will occur. 651Indicates whether an unprivileged install will occur.
652The user, group, permissions, and file flags, will not be set on 652The user, group, permissions, and file flags, will not be set on
653the installed item; instead the information will be appended to 653the installed item; instead the information will be appended to
654a file called 654a file called
655.Pa METALOG 655.Pa METALOG
656in 656in
657.Sy DESTDIR . 657.Sy DESTDIR .
658The contents of 658The contents of
659.Pa METALOG 659.Pa METALOG
660is used during the generation of the distribution tar files to ensure 660is used during the generation of the distribution tar files to ensure
661that the appropriate file ownership is stored. 661that the appropriate file ownership is stored.
662.DFLTn 662.DFLTn
663. 663.
664.It Sy MKUPDATE 664.It Sy MKUPDATE
665.YorN 665.YorN
666Indicates whether all install operations intended to write to 666Indicates whether all install operations intended to write to
667.Sy DESTDIR 667.Sy DESTDIR
668will compare file timestamps before installing, and skip the install 668will compare file timestamps before installing, and skip the install
669phase if the destination files are up-to-date. 669phase if the destination files are up-to-date.
670This also has implications on full builds (see next subsection). 670This also has implications on full builds (see next subsection).
671.DFLTn 671.DFLTn
672. 672.
673.It Sy MKX11 673.It Sy MKX11
674.YorN 674.YorN
675Indicates whether X11 is built and installed 675Indicates whether X11 is built and installed
676(by descending into 676(by descending into
677.Pa src/x11 677.Pa src/x11
678or 678or
679.Pa src/external/mit/xorg 679.Pa src/external/mit/xorg
680depending on the value of 680depending on the value of
681.Sy X11FLAVOUR ) . 681.Sy X11FLAVOUR ) .
682.DFLTn 682.DFLTn
683.Pp 683.Pp
684. 684.
685.It Sy MKYP 685.It Sy MKYP
686.YorN 686.YorN
687Indicates whether the YP (NIS) infrastructure 687Indicates whether the YP (NIS) infrastructure
688(libraries and support programs) is built. 688(libraries and support programs) is built.
689.DFLTy 689.DFLTy
690. 690.
691.It Sy OBJMACHINE 691.It Sy OBJMACHINE
692If defined, creates objdirs of the form 692If defined, creates objdirs of the form
693.Pa obj. Ns Sy MACHINE , 693.Pa obj. Ns Sy MACHINE ,
694where 694where
695.Sy MACHINE 695.Sy MACHINE
696is the current architecture (as per 696is the current architecture (as per
697.Sq "uname -m" ) . 697.Sq "uname -m" ) .
698. 698.
699.It Sy RELEASEDIR 699.It Sy RELEASEDIR
700If set, specifies the directory to which a 700If set, specifies the directory to which a
701.Xr release 7 701.Xr release 7
702layout will be written at the end of a 702layout will be written at the end of a
703.Dq make release . 703.Dq make release .
704.DFLTu 704.DFLTu
705.Pp 705.Pp
706.Em Note : 706.Em Note :
707.Sy build.sh 707.Sy build.sh
708will provide a default of 708will provide a default of
709.Pa releasedir 709.Pa releasedir
710(in the top-level 710(in the top-level
711.Sy .OBJDIR ) 711.Sy .OBJDIR )
712unless run in 712unless run in
713.Sq expert 713.Sq expert
714mode 714mode
715. 715.
716.It Sy TOOLDIR 716.It Sy TOOLDIR
717Directory to hold the host tools, once built. 717Directory to hold the host tools, once built.
718This directory should be unique to a given host system and 718This directory should be unique to a given host system and
719.Nx 719.Nx
720source tree. 720source tree.
721(However, multiple targets may share the same 721(However, multiple targets may share the same
722.Sy TOOLDIR ; 722.Sy TOOLDIR ;
723the target-dependent files have unique names.) 723the target-dependent files have unique names.)
724If unset, a default based 724If unset, a default based
725on the 725on the
726.Xr uname 1 726.Xr uname 1
727information of the host platform will be created in the 727information of the host platform will be created in the
728.Sy .OBJDIR 728.Sy .OBJDIR
729of 729of
730.Pa src . 730.Pa src .
731.DFLTu 731.DFLTu
732. 732.
733.It Sy USE_FORT 733.It Sy USE_FORT
734Indicates whether the so-called 734Indicates whether the so-called
735.Dq FORTIFY_SOURCE 735.Dq FORTIFY_SOURCE
736.Xr security 7 736.Xr security 7
737extensions are enabled; see 737extensions are enabled; see
738.Xr ssp 3 738.Xr ssp 3
739for details. 739for details.
740This imposes some performance penalty. 740This imposes some performance penalty.
741.DFLTn 741.DFLTn
742. 742.
743.It Sy USE_HESIOD 743.It Sy USE_HESIOD
744.YorN 744.YorN
745Indicates whether Hesiod support is 745Indicates whether Hesiod support is
746enabled in the various applications that support it. 746enabled in the various applications that support it.
747If 747If
748.Sy MKHESIOD=no , 748.Sy MKHESIOD=no ,
749.Sy USE_HESIOD 749.Sy USE_HESIOD
750will also be forced to 750will also be forced to
751.Dq no . 751.Dq no .
752.DFLTy 752.DFLTy
753. 753.
754.It Sy USE_INET6 754.It Sy USE_INET6
755.YorN 755.YorN
756Indicates whether INET6 (IPv6) support is 756Indicates whether INET6 (IPv6) support is
757enabled in the various applications that support it. 757enabled in the various applications that support it.
758If 758If
759.Sy MKINET6=no , 759.Sy MKINET6=no ,
760.Sy USE_INET6 760.Sy USE_INET6
761will also be forced to 761will also be forced to
762.Dq no . 762.Dq no .
763.DFLTy 763.DFLTy
764. 764.
765.It Sy USE_JEMALLOC 765.It Sy USE_JEMALLOC
766.YorN 766.YorN
767Indicates whether the 767Indicates whether the
768.Em jemalloc 768.Em jemalloc
769allocator 769allocator
770.Pq which is designed for improved performance with threaded applications 770.Pq which is designed for improved performance with threaded applications
771is used instead of the 771is used instead of the
772.Em phkmalloc 772.Em phkmalloc
773allocator 773allocator
774.Pq that was the default until Nx 5.0 . 774.Pq that was the default until Nx 5.0 .
775.DFLTy 775.DFLTy
776. 776.
777.It Sy USE_KERBEROS 777.It Sy USE_KERBEROS
778.YorN 778.YorN
779Indicates whether Kerberos v5 support is 779Indicates whether Kerberos v5 support is
780enabled in the various applications that support it. 780enabled in the various applications that support it.
781If 781If
782.Sy MKKERBEROS=no , 782.Sy MKKERBEROS=no ,
783.Sy USE_KERBEROS 783.Sy USE_KERBEROS
784will also be forced to 784will also be forced to
785.Dq no . 785.Dq no .
786.DFLTy 786.DFLTy
787. 787.
788.It Sy USE_LDAP 788.It Sy USE_LDAP
789.YorN 789.YorN
790Indicates whether LDAP support is 790Indicates whether LDAP support is
791enabled in the various applications that support it. 791enabled in the various applications that support it.
792If 792If
793.Sy MKLDAP=no , 793.Sy MKLDAP=no ,
794.Sy USE_LDAP 794.Sy USE_LDAP
795will also be forced to 795will also be forced to
796.Dq no . 796.Dq no .
797.DFLTy 797.DFLTy
798. 798.
799.It Sy USE_PAM 799.It Sy USE_PAM
800.YorN 800.YorN
801Indicates whether 801Indicates whether
802.Xr pam 8 802.Xr pam 8
803support is enabled in the various applications that support it. 803support is enabled in the various applications that support it.
804If 804If
805.Sy MKPAM=no , 805.Sy MKPAM=no ,
806.Sy USE_PAM 806.Sy USE_PAM
807will also be forced to 807will also be forced to
808.Dq no . 808.Dq no .
809.DFLTy 809.DFLTy
810. 810.
811.It Sy USE_SKEY 811.It Sy USE_SKEY
812.YorN 812.YorN
813Indicates whether S/key support is 813Indicates whether S/key support is
814enabled in the various applications that support it. 814enabled in the various applications that support it.
815If 815If
816.Sy MKSKEY=no , 816.Sy MKSKEY=no ,
817.Sy USE_SKEY 817.Sy USE_SKEY
818will also be forced to 818will also be forced to
819.Dq no . 819.Dq no .
820.DFLTy 820.DFLTy
821.Pp 821.Pp
822This is mutually exclusive to 822This is mutually exclusive to
823.Sy USE_PAM!=no . 823.Sy USE_PAM!=no .
824. 824.
825.It Sy USE_SSP 825.It Sy USE_SSP
826.YorN 826.YorN
827Indicates whether GCC stack-smashing protection (SSP) support, 827Indicates whether GCC stack-smashing protection (SSP) support,
828which detects stack overflows and aborts the program, 828which detects stack overflows and aborts the program,
829is enabled. 829is enabled.
830This imposes some performance penalty. 830This imposes some performance penalty.
831.DFLTn 831.DFLTn
832. 832.
833.It Sy USE_YP 833.It Sy USE_YP
834.YorN 834.YorN
835Indicates whether YP (NIS) support is 835Indicates whether YP (NIS) support is
836enabled in the various applications that support it. 836enabled in the various applications that support it.
837If 837If
838.Sy MKYP=no , 838.Sy MKYP=no ,
839.Sy USE_YP 839.Sy USE_YP
840will also be forced to 840will also be forced to
841.Dq no . 841.Dq no .
842.DFLTy 842.DFLTy
843. 843.
844.It Sy USETOOLS 844.It Sy USETOOLS
845Indicates whether the tools specified by 845Indicates whether the tools specified by
846.Sy TOOLDIR 846.Sy TOOLDIR
847should be used as part of a build in progress. 847should be used as part of a build in progress.
848Must be set to 848Must be set to
849.Dq yes 849.Dq yes
850if cross-compiling. 850if cross-compiling.
851.Bl -tag -width "never" 851.Bl -tag -width "never"
852.It Sy yes 852.It Sy yes
853Use the tools from 853Use the tools from
854.Sy TOOLDIR . 854.Sy TOOLDIR .
855.It Sy no 855.It Sy no
856Do not use the tools from 856Do not use the tools from
857.Sy TOOLDIR , 857.Sy TOOLDIR ,
858but refuse to build native compilation tool components that are 858but refuse to build native compilation tool components that are
859version-specific for that tool. 859version-specific for that tool.
860.It Sy never 860.It Sy never
861Do not use the tools from 861Do not use the tools from
862.Sy TOOLDIR , 862.Sy TOOLDIR ,
863even when building native tool components. 863even when building native tool components.
864This is similar to the traditional 864This is similar to the traditional
865.Nx 865.Nx
866build method, but does 866build method, but does
867.Em not 867.Em not
868verify that the compilation tools in use are up-to-date enough in order 868verify that the compilation tools in use are up-to-date enough in order
869to build the tree successfully. 869to build the tree successfully.
870This may cause build or runtime problems when building the whole 870This may cause build or runtime problems when building the whole
871.Nx 871.Nx
872source tree. 872source tree.
873.El 873.El
874.DFLT 874.DFLT
875.Dq yes 875.Dq yes
876if building all or part of a whole 876if building all or part of a whole
877.Nx 877.Nx
878source tree (detected automatically); 878source tree (detected automatically);
879.Dq no 879.Dq no
880otherwise (to preserve traditional semantics of the 880otherwise (to preserve traditional semantics of the
881.Aq bsd.*.mk 881.Aq bsd.*.mk
882.Xr make 1 882.Xr make 1
883include files). 883include files).
884. 884.
885.It Sy X11FLAVOUR 885.It Sy X11FLAVOUR
886Picks which X11 distribution to cross-build with 886Picks which X11 distribution to cross-build with
887.Nx . 887.Nx .
888Set to either 888Set to either
889.Dq Xorg 889.Dq Xorg
890or 890or
891.Dq XFree86 . 891.Dq XFree86 .
892Only relevant if 892Only relevant if
893.Sy MKX11!=no . 893.Sy MKX11!=no .
894.Pp 894.Pp
895.Em Default : 895.Em Default :
896.Dq Xorg 896.Dq Xorg
897on alpha, i386, macppc, shark and sparc64 platforms. 897on alpha, i386, macppc, shark and sparc64 platforms.
898.Dq XFree86 898.Dq XFree86
899on everything else. 899on everything else.
900. 900.
901.El 901.El
902. 902.
903.Ss pkgsrc system variables 903.Ss pkgsrc system variables
904. 904.
905Please see the pkgsrc guide at 905Please see the pkgsrc guide at
906.Lk http://www.netbsd.org/Documentation/pkgsrc/ 906.Lk http://www.netbsd.org/Documentation/pkgsrc/
907or 907or
908.Pa pkgsrc/doc/pkgsrc.txt 908.Pa pkgsrc/doc/pkgsrc.txt
909for more variables used internally by the package system and 909for more variables used internally by the package system and
910.Pa ${PKGSRCDIR}/mk/defaults/mk.conf 910.Pa ${PKGSRCDIR}/mk/defaults/mk.conf
911for package-specific examples. 911for package-specific examples.
912. 912.
913.Sh FILES 913.Sh FILES
914.Bl -tag -width /etc/mk.conf 914.Bl -tag -width /etc/mk.conf
915. 915.
916.It Pa /etc/mk.conf 916.It Pa /etc/mk.conf
917This file. 917This file.
918. 918.
919.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf 919.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf
920Examples for settings regarding the pkgsrc collection. 920Examples for settings regarding the pkgsrc collection.
921.El 921.El
922. 922.
923.Sh SEE ALSO 923.Sh SEE ALSO
924.Xr make 1 , 924.Xr make 1 ,
925.Pa /usr/share/mk/bsd.README , 925.Pa /usr/share/mk/bsd.README ,
926.Pa pkgsrc/doc/pkgsrc.txt , 926.Pa pkgsrc/doc/pkgsrc.txt ,
927.Lk http://www.netbsd.org/Documentation/pkgsrc/ 927.Lk http://www.netbsd.org/Documentation/pkgsrc/
928.Sh HISTORY 928.Sh HISTORY
929The 929The
930.Nm 930.Nm
931file appeared in 931file appeared in
932.Nx 1.2 . 932.Nx 1.2 .