2024-04-26 20:38:44 +03:00
|
|
|
.\" $NetBSD: BUILDING.mdoc,v 1.150 2024/04/26 17:38:44 rillig Exp $
|
2001-10-29 22:46:47 +03:00
|
|
|
.\"
|
2023-05-17 00:21:38 +03:00
|
|
|
.\" Copyright (c) 2001-2023 The NetBSD Foundation, Inc.
|
2001-10-29 22:46:47 +03:00
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
2003-01-23 19:24:08 +03:00
|
|
|
.\" by Todd Vierling and Luke Mewburn.
|
2001-10-29 22:46:47 +03:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2011-09-09 18:23:37 +04:00
|
|
|
.\" NOTE: After changing this file, run "make regen" in the src/doc
|
|
|
|
.\" directory, and check in both src/BUILDING and src/doc/BUILDING.mdoc.
|
2001-10-29 23:02:01 +03:00
|
|
|
.\"
|
2003-01-30 01:50:08 +03:00
|
|
|
.\" Toolchain prefix for commands
|
|
|
|
.ds toolprefix nb
|
|
|
|
.
|
2023-07-22 01:07:59 +03:00
|
|
|
.Dd July 21, 2023
|
2001-10-29 22:46:47 +03:00
|
|
|
.Dt BUILDING 8
|
|
|
|
.Os NetBSD
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.\" turn off hyphenation
|
|
|
|
.hym 999
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2020-10-13 00:12:34 +03:00
|
|
|
.\" if this file is processed with real roff (doc.tmac)
|
|
|
|
.\" now that the tmac files have been lazily read,
|
|
|
|
.\" we can override ``quotes'' with "quotes" for ascii output
|
|
|
|
.ie '\*[Lq]'``' \{\
|
|
|
|
.ds Lq \*q
|
|
|
|
.ds Rq \*q
|
|
|
|
.\}
|
|
|
|
.\" and disable hyphenation
|
|
|
|
.nr hyphen-flags 0
|
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.Sh NAME
|
|
|
|
.
|
|
|
|
.Nm BUILDING
|
|
|
|
.Nd Procedure for building
|
|
|
|
.Nx
|
2023-06-02 23:48:41 +03:00
|
|
|
from source code
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.Sh REQUIREMENTS
|
|
|
|
.
|
|
|
|
.Nx
|
2001-10-30 19:22:40 +03:00
|
|
|
is designed to be buildable on most POSIX-compliant host systems.
|
2001-10-29 22:46:47 +03:00
|
|
|
The basic build procedure is the same whether compiling
|
|
|
|
.Em natively
|
|
|
|
(on the same
|
|
|
|
.Nx
|
|
|
|
architecture) or
|
|
|
|
.Em cross compiling
|
|
|
|
(on another architecture or OS).
|
|
|
|
.Pp
|
2023-07-18 19:59:57 +03:00
|
|
|
This source tree contains the
|
|
|
|
.Sy build.sh
|
|
|
|
shell script which supports both native and cross builds of
|
|
|
|
.Nx .
|
|
|
|
.Pp
|
2001-10-29 22:46:47 +03:00
|
|
|
This source tree contains a special subtree,
|
|
|
|
.Dq tools ,
|
|
|
|
which uses the host system to create a build toolchain for the target
|
2002-12-18 22:46:48 +03:00
|
|
|
architecture.
|
|
|
|
The host system must have at least C and C++
|
2001-10-29 22:46:47 +03:00
|
|
|
compilers in order to create the toolchain
|
2023-07-18 19:59:57 +03:00
|
|
|
.Xr ( make 1
|
|
|
|
is not required); all other tools
|
|
|
|
(including
|
|
|
|
.Xr make 1
|
|
|
|
as
|
|
|
|
.Sy \*[toolprefix]make )
|
|
|
|
are created as part of the
|
2001-10-29 22:46:47 +03:00
|
|
|
.Nx
|
|
|
|
build process.
|
2023-05-17 00:21:38 +03:00
|
|
|
(See the
|
|
|
|
.Sx Environment variables
|
|
|
|
section below if you need
|
2005-02-15 21:41:18 +03:00
|
|
|
to override or manually select your compilers.)
|
2023-06-11 23:34:14 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
Within this document, cross-references to manual pages are to the
|
|
|
|
.Nx
|
|
|
|
manual pages, not the host system manual pages.
|
|
|
|
The
|
|
|
|
.Xr mdoc 7
|
|
|
|
source
|
|
|
|
to the
|
|
|
|
.Nx
|
|
|
|
manual pages can be found within the source tree,
|
|
|
|
and these and can be formatted with
|
|
|
|
.Xr mandoc 1
|
|
|
|
or
|
|
|
|
.Xr nroff 1
|
|
|
|
if those are available on the host system.
|
|
|
|
The
|
|
|
|
.Nx
|
|
|
|
manual pages are also available at
|
|
|
|
.Lk https://man.netbsd.org
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.Sh FILES
|
|
|
|
.
|
|
|
|
.Ss Source tree layout
|
|
|
|
.
|
|
|
|
.Bl -tag -width "BUILDING.mdoc"
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2014-05-21 17:11:25 +04:00
|
|
|
.It Pa BUILDING
|
2001-10-29 23:02:01 +03:00
|
|
|
This document (in plaintext).
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
Generated from
|
|
|
|
.Pa doc/BUILDING.mdoc .
|
|
|
|
.
|
2014-05-21 17:11:25 +04:00
|
|
|
.It Pa Makefile
|
2001-10-29 22:46:47 +03:00
|
|
|
The main Makefile for
|
|
|
|
.Nx ;
|
2001-10-30 19:22:40 +03:00
|
|
|
should only be run for native builds with an appropriately up-to-date
|
2001-10-29 22:46:47 +03:00
|
|
|
version of
|
|
|
|
.Nx
|
|
|
|
.Xr make 1 .
|
2023-06-02 23:48:41 +03:00
|
|
|
Intended for expert use with knowledge of its shortcomings,
|
|
|
|
it has been superseded by the
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh
|
2017-10-22 01:03:01 +03:00
|
|
|
shell script as the recommended means for building
|
|
|
|
.Nx .
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2014-05-21 17:11:25 +04:00
|
|
|
.It Pa UPDATING
|
2001-10-29 22:46:47 +03:00
|
|
|
Special notes for updating from an earlier revision of
|
|
|
|
.Nx .
|
|
|
|
It is important to read this file before every build of an updated
|
|
|
|
source tree.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2014-05-21 17:11:25 +04:00
|
|
|
.It Pa build.sh
|
2001-10-29 22:46:47 +03:00
|
|
|
Bourne-compatible shell script used for building the host build tools
|
|
|
|
and the
|
|
|
|
.Nx
|
2002-12-18 22:46:48 +03:00
|
|
|
system from scratch.
|
|
|
|
Can be used for both native and cross builds, and should be used instead of
|
2001-10-29 22:46:47 +03:00
|
|
|
.Xr make 1
|
2017-10-22 01:03:01 +03:00
|
|
|
as it performs additional checks to prevent common issues going undetected, such
|
|
|
|
as building with an outdated version of
|
|
|
|
.Xr make 1 .
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2014-05-21 17:11:25 +04:00
|
|
|
.It Pa crypto/dist/ , dist/ , gnu/dist/
|
2001-10-29 22:46:47 +03:00
|
|
|
Sources imported verbatim from third parties, without mangling the
|
2002-12-18 22:46:48 +03:00
|
|
|
existing build structure.
|
|
|
|
Other source trees in
|
2023-07-18 19:59:57 +03:00
|
|
|
.Pa bin
|
2001-10-29 22:46:47 +03:00
|
|
|
through
|
2023-07-18 19:59:57 +03:00
|
|
|
.Pa usr.sbin
|
2001-10-29 22:46:47 +03:00
|
|
|
use the
|
|
|
|
.Nx
|
|
|
|
.Xr make 1
|
|
|
|
.Dq reachover
|
|
|
|
Makefile semantics when building these programs for a native host.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
|
|
|
.It Pa distrib/ , etc/
|
|
|
|
Sources for items used when making a full release snapshot, such as
|
|
|
|
files installed in
|
|
|
|
.Sy DESTDIR Ns Pa /etc
|
|
|
|
on the destination system, boot media, and release notes.
|
|
|
|
.
|
|
|
|
.It Pa doc/BUILDING.mdoc
|
2023-06-11 23:34:14 +03:00
|
|
|
The source to this document, in
|
|
|
|
.Xr mdoc 7
|
|
|
|
format.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
Used to generate
|
|
|
|
.Pa BUILDING .
|
|
|
|
.
|
2023-07-19 18:40:38 +03:00
|
|
|
.It Pa external/ , sys/external/
|
2014-05-19 13:49:07 +04:00
|
|
|
Sources and build infrastructure for components imported (mostly) unchanged
|
|
|
|
from upstream maintainers, sorted by applicable license.
|
2014-05-21 17:11:25 +04:00
|
|
|
This is (slowly) replacing the
|
|
|
|
.Pa crypto/dist ,
|
|
|
|
.Pa dist ,
|
|
|
|
and
|
|
|
|
.Pa gnu/dist
|
|
|
|
directories.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
|
|
|
.It Pa external/mit/xorg/
|
|
|
|
.Dq Reachover
|
|
|
|
build structure for modular Xorg; the source is in
|
|
|
|
.Sy X11SRCDIR .
|
|
|
|
.
|
2023-07-18 19:59:57 +03:00
|
|
|
.It Pa mk.conf
|
|
|
|
Optional source tree specific
|
|
|
|
.Xr mk.conf 5 ,
|
|
|
|
used (if present) instead of
|
|
|
|
.Pa /etc/mk.conf
|
|
|
|
unless
|
|
|
|
.Sy MAKECONF
|
|
|
|
is defined.
|
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
Not part of the
|
|
|
|
.Nx
|
|
|
|
source repository.
|
|
|
|
.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.It Pa regress/ , tests/
|
2002-12-18 22:46:48 +03:00
|
|
|
Regression test harness.
|
|
|
|
Can be cross-compiled, but only run natively.
|
2008-03-28 08:23:44 +03:00
|
|
|
.Pa tests/
|
|
|
|
uses the
|
|
|
|
.Xr atf 7
|
|
|
|
test framework;
|
|
|
|
.Pa regress/
|
|
|
|
contains older tests that have not yet been migrated to
|
|
|
|
.Xr atf 7 .
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2014-05-21 17:11:25 +04:00
|
|
|
.It Pa sys/
|
2001-10-29 22:46:47 +03:00
|
|
|
.Nx
|
|
|
|
kernel sources.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2014-05-21 17:11:25 +04:00
|
|
|
.It Pa tools/
|
2001-10-29 22:46:47 +03:00
|
|
|
.Dq Reachover
|
2002-12-18 22:46:48 +03:00
|
|
|
build structure for the host build tools.
|
|
|
|
This has a special method of determining out-of-date status.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
|
|
|
.It Pa tools/compat/README
|
|
|
|
Special notes for cross-hosting a NetBSD build on non-NetBSD platforms.
|
|
|
|
.
|
|
|
|
.It Other directories including Pa bin/ ... usr.sbin/
|
2001-10-29 22:46:47 +03:00
|
|
|
Sources to the
|
|
|
|
.Nx
|
2002-12-18 22:46:48 +03:00
|
|
|
userland (non-kernel) programs.
|
|
|
|
If any of these directories are missing, they will be skipped during the build.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.El
|
|
|
|
.
|
|
|
|
.Ss Build tree layout
|
|
|
|
.
|
|
|
|
The
|
|
|
|
.Nx
|
|
|
|
build tree is described in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Xr hier 7
|
2023-07-05 19:41:12 +03:00
|
|
|
(whose
|
|
|
|
.Xr mdoc 7
|
|
|
|
source is in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Pa share/man/man7/hier.7 ) ,
|
2001-10-29 22:46:47 +03:00
|
|
|
and the release layout is described in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Xr release 7
|
2023-07-05 19:41:12 +03:00
|
|
|
(whose
|
|
|
|
.Xr mdoc 7
|
|
|
|
source is in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Pa share/man/man7/release.7 ) .
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.Sh CONFIGURATION
|
|
|
|
.
|
2002-03-05 04:15:51 +03:00
|
|
|
.Ss Environment variables
|
2013-05-29 18:45:55 +04:00
|
|
|
.
|
2023-05-18 17:22:53 +03:00
|
|
|
.de DFLT
|
|
|
|
.Pp
|
|
|
|
.Em Default :
|
|
|
|
..
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.de DFLTn
|
|
|
|
.DFLT
|
2023-06-11 23:34:14 +03:00
|
|
|
.Dq no .
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
..
|
2023-05-18 17:22:53 +03:00
|
|
|
.de DFLTu
|
|
|
|
.DFLT
|
|
|
|
Unset.
|
|
|
|
..
|
|
|
|
.de DFLTy
|
|
|
|
.DFLT
|
2023-06-11 23:34:14 +03:00
|
|
|
.Dq yes .
|
2023-05-18 17:22:53 +03:00
|
|
|
..
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.de NODEF
|
|
|
|
.Pp
|
|
|
|
Forced to
|
2023-05-18 17:22:53 +03:00
|
|
|
.Dq no
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
if
|
|
|
|
.Sy \\$*
|
|
|
|
is defined,
|
|
|
|
usually in the Makefile before any
|
|
|
|
.Xr make 1
|
|
|
|
.Cm \&.include
|
|
|
|
directives.
|
|
|
|
..
|
|
|
|
.de NOVAR
|
|
|
|
.Pp
|
|
|
|
Forced to
|
|
|
|
.Dq no
|
|
|
|
if
|
|
|
|
.Sy \\$* .
|
|
|
|
..
|
|
|
|
.de YorN
|
|
|
|
Can be set to
|
|
|
|
.Dq yes
|
|
|
|
or
|
|
|
|
.Dq no .
|
2023-05-18 17:22:53 +03:00
|
|
|
..
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
2002-03-05 04:15:51 +03:00
|
|
|
Several environment variables control the behaviour of
|
|
|
|
.Nx
|
|
|
|
builds.
|
|
|
|
.
|
2023-06-06 01:36:17 +03:00
|
|
|
.Bl -tag -width 14n
|
|
|
|
.
|
|
|
|
.\" These entries are sorted alphabetically.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
|
|
|
.It Sy HOST_CC
|
|
|
|
Path name to C compiler used to create the toolchain.
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLT
|
|
|
|
.Dq cc .
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
|
|
|
.It Sy HOST_CFLAGS
|
|
|
|
Flags passed to the host C compiler.
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLT
|
|
|
|
.Dq \&-O .
|
|
|
|
.
|
|
|
|
.It Sy HOST_CPPFLAGS
|
|
|
|
Flags passed to the host C/C++ pre-processor.
|
|
|
|
.DFLTu
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.
|
|
|
|
.It Sy HOST_CXX
|
|
|
|
Path name to C++ compiler used to create the toolchain.
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLT
|
|
|
|
Unset, but defaults to
|
|
|
|
.Dq c++
|
|
|
|
where required.
|
2002-03-05 04:15:51 +03:00
|
|
|
.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.It Sy HOST_CXXFLAGS
|
|
|
|
Flags passed to the host C++ compiler.
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLTu
|
2005-02-15 21:41:18 +03:00
|
|
|
.
|
2006-09-29 23:57:04 +04:00
|
|
|
.It Sy HOST_SH
|
2011-09-09 22:48:34 +04:00
|
|
|
Path name to a shell available on the host system
|
|
|
|
and suitable for use during the build.
|
|
|
|
The
|
|
|
|
.Nx
|
|
|
|
build system requires a modern Bourne-like shell
|
|
|
|
with POSIX-compliant features,
|
|
|
|
and also requires support for the
|
|
|
|
.Dq local
|
|
|
|
keyword to declare local variables in shell functions
|
|
|
|
(which is a widely-implemented but non-standardised feature).
|
|
|
|
.Pp
|
|
|
|
Depending on the host system, a suitable shell may be
|
|
|
|
.Pa /bin/sh ,
|
|
|
|
.Pa /usr/xpg4/bin/sh ,
|
|
|
|
.Pa /bin/ksh
|
|
|
|
(provided it is a variant of ksh that supports the
|
|
|
|
.Dq local
|
|
|
|
keyword,
|
|
|
|
such as ksh88, but not ksh93),
|
|
|
|
or
|
|
|
|
.Pa /usr/local/bin/bash .
|
|
|
|
.Pp
|
|
|
|
Most parts of the build require
|
|
|
|
.Sy HOST_SH
|
|
|
|
to be an absolute path; however,
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh
|
2011-09-09 22:48:34 +04:00
|
|
|
allows it to be a simple command name, which will be converted
|
|
|
|
to an absolute path by searching the
|
2023-06-11 23:34:14 +03:00
|
|
|
.Ev PATH .
|
|
|
|
.DFLT
|
|
|
|
.Dq sh .
|
2006-09-29 23:57:04 +04:00
|
|
|
.
|
2023-05-17 00:21:38 +03:00
|
|
|
.It Sy INSTALLBOOT_UBOOT_PATHS
|
|
|
|
A colon-separated list of search paths used by
|
|
|
|
.Xr installboot 8
|
|
|
|
to find U-Boot packages.
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLTu
|
2023-05-17 00:21:38 +03:00
|
|
|
.
|
2002-03-05 04:15:51 +03:00
|
|
|
.It Sy MACHINE
|
2008-03-28 08:23:44 +03:00
|
|
|
Machine type, e.g.,
|
|
|
|
.Dq macppc .
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLTu
|
2002-03-05 04:15:51 +03:00
|
|
|
.
|
|
|
|
.It Sy MACHINE_ARCH
|
2008-03-28 08:23:44 +03:00
|
|
|
Machine architecture, e.g.,
|
|
|
|
.Dq powerpc .
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLTu
|
2002-03-05 04:15:51 +03:00
|
|
|
.
|
|
|
|
.It Sy MAKE
|
|
|
|
Path name to invoke
|
|
|
|
.Xr make 1
|
|
|
|
as.
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLT
|
|
|
|
.Dq make .
|
2002-03-05 04:15:51 +03:00
|
|
|
.
|
2023-06-02 23:48:41 +03:00
|
|
|
.It Sy MAKECONF
|
|
|
|
The name of the
|
|
|
|
.Xr make 1
|
|
|
|
configuration file.
|
|
|
|
See
|
2023-07-22 21:50:04 +03:00
|
|
|
.Sx make variables
|
2023-06-02 23:48:41 +03:00
|
|
|
and
|
|
|
|
.Xr mk.conf 5 .
|
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
Only settable in the process environment.
|
|
|
|
.DFLT
|
2023-07-18 19:59:57 +03:00
|
|
|
.Dq Pa /etc/mk.conf ,
|
|
|
|
although
|
|
|
|
.Sy build.sh
|
|
|
|
will set the default to the full path to
|
|
|
|
.Pa mk.conf
|
|
|
|
if the latter is present in the same directory as
|
|
|
|
.Sy build.sh .
|
2023-06-02 23:48:41 +03:00
|
|
|
.
|
2002-03-05 04:15:51 +03:00
|
|
|
.It Sy MAKEFLAGS
|
|
|
|
Flags to invoke
|
|
|
|
.Xr make 1
|
|
|
|
with.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
2011-09-09 17:29:23 +04:00
|
|
|
.Sy build.sh
|
|
|
|
ignores the value of
|
|
|
|
.Sy MAKEFLAGS
|
|
|
|
passed in the environment, but allows
|
|
|
|
.Sy MAKEFLAGS
|
|
|
|
to be set via the
|
|
|
|
.Fl V
|
|
|
|
option.
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLT
|
|
|
|
.Dq \&-X
|
|
|
|
on systems with a small
|
|
|
|
.Dv ARG_MAX
|
|
|
|
(Cygwin, Darwin, FreeBSD);
|
|
|
|
otherwise unset.
|
2002-03-05 04:15:51 +03:00
|
|
|
.
|
|
|
|
.It Sy MAKEOBJDIR
|
|
|
|
Directory to use as the
|
|
|
|
.Sy .OBJDIR
|
|
|
|
for the current directory.
|
2006-10-08 21:54:30 +04:00
|
|
|
The value is subjected to variable expansion by
|
|
|
|
.Xr make 1 .
|
2008-08-06 02:40:33 +04:00
|
|
|
Typical usage is to set this variable to a value involving the use of
|
|
|
|
.Sq ${.CURDIR:S...}
|
|
|
|
or
|
|
|
|
.Sq ${.CURDIR:C...} ,
|
|
|
|
to derive the value of
|
|
|
|
.Sy .OBJDIR
|
|
|
|
from the value of
|
|
|
|
.Sy .CURDIR .
|
2002-03-05 04:15:51 +03:00
|
|
|
Used only if
|
|
|
|
.Sy MAKEOBJDIRPREFIX
|
|
|
|
is not defined.
|
2023-06-02 23:48:41 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
2002-03-05 04:15:51 +03:00
|
|
|
.Sy MAKEOBJDIR
|
2008-08-06 02:40:33 +04:00
|
|
|
can be provided only in the environment or via the
|
2003-08-08 05:52:24 +04:00
|
|
|
.Fl O
|
2003-07-03 09:52:47 +04:00
|
|
|
flag of
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh ;
|
2023-06-02 23:48:41 +03:00
|
|
|
it cannot usefully be set inside a Makefile, including in
|
|
|
|
.Xr mk.conf 5
|
2008-12-03 01:28:21 +03:00
|
|
|
or
|
2023-06-02 23:48:41 +03:00
|
|
|
.Sy MAKECONF .
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLTu
|
2002-03-05 04:15:51 +03:00
|
|
|
.
|
|
|
|
.It Sy MAKEOBJDIRPREFIX
|
|
|
|
Top level directory of the object directory tree.
|
2009-09-27 22:08:24 +04:00
|
|
|
The value is subjected to variable expansion by
|
|
|
|
.Xr make 1 .
|
|
|
|
.Sy build.sh
|
|
|
|
will create the
|
|
|
|
${MAKEOBJDIRPREFIX}
|
|
|
|
directory if necessary, but if
|
|
|
|
.Xr make 1
|
|
|
|
is used without
|
|
|
|
.Sy build.sh ,
|
|
|
|
then rules in
|
|
|
|
.Aq bsd.obj.mk
|
|
|
|
will abort the build if the
|
|
|
|
${MAKEOBJDIRPREFIX}
|
|
|
|
directory does not exist.
|
|
|
|
If the value is defined and valid, then
|
2002-03-05 04:15:51 +03:00
|
|
|
${MAKEOBJDIRPREFIX}/${.CURDIR}
|
|
|
|
is used as the
|
|
|
|
.Sy .OBJDIR
|
|
|
|
for the current directory.
|
|
|
|
The current directory may be read only.
|
2023-06-02 23:48:41 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
2002-03-05 04:15:51 +03:00
|
|
|
.Sy MAKEOBJDIRPREFIX
|
2008-08-06 02:40:33 +04:00
|
|
|
can be provided only in the environment or via the
|
2003-07-03 09:52:47 +04:00
|
|
|
.Fl M
|
|
|
|
flag of
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh ;
|
2023-06-02 23:48:41 +03:00
|
|
|
it cannot usefully be set inside a Makefile, including in
|
|
|
|
.Xr mk.conf 5
|
2008-12-03 01:28:21 +03:00
|
|
|
or
|
2023-06-02 23:48:41 +03:00
|
|
|
.Sy MAKECONF .
|
2023-06-11 23:34:14 +03:00
|
|
|
.DFLTu
|
2023-05-18 17:22:53 +03:00
|
|
|
.
|
2023-06-11 23:34:14 +03:00
|
|
|
.It Ev TMPDIR
|
2023-05-18 17:22:53 +03:00
|
|
|
Top-level directory to store temporary directories used by
|
|
|
|
.Sy build.sh
|
|
|
|
before paths to other directories such as
|
|
|
|
.Sy .OBJDIR
|
|
|
|
can be determined.
|
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
Must support execution of binaries.
|
|
|
|
I.e., without
|
|
|
|
.Xr mount 8 Ns 's
|
|
|
|
.Fl o
|
2023-07-18 19:59:57 +03:00
|
|
|
.Cm noexec
|
2023-05-18 17:22:53 +03:00
|
|
|
option.
|
|
|
|
.DFLT
|
2023-06-11 23:34:14 +03:00
|
|
|
.Dq Pa /tmp .
|
2023-05-18 17:22:53 +03:00
|
|
|
.
|
2002-03-05 04:15:51 +03:00
|
|
|
.El
|
|
|
|
.
|
2023-07-22 21:50:04 +03:00
|
|
|
.Ss make variables
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2023-07-05 19:41:12 +03:00
|
|
|
Variables that control the behavior of
|
2001-10-29 22:46:47 +03:00
|
|
|
.Nx
|
2023-06-11 23:34:14 +03:00
|
|
|
builds are documented in
|
|
|
|
.Xr mk.conf 5
|
2023-07-05 19:41:12 +03:00
|
|
|
(whose
|
|
|
|
.Xr mdoc 7
|
|
|
|
source is in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Pa share/man/man5/mk.conf.5 ) .
|
|
|
|
.Pp
|
2002-12-18 22:46:48 +03:00
|
|
|
Unless otherwise specified, these variables may be set in
|
2001-10-29 22:46:47 +03:00
|
|
|
either the process environment or the
|
|
|
|
.Xr make 1
|
2023-06-02 23:48:41 +03:00
|
|
|
configuration file
|
|
|
|
.Xr mk.conf 5
|
|
|
|
specified by
|
2001-10-29 22:46:47 +03:00
|
|
|
.Sy MAKECONF .
|
2023-07-22 01:07:59 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
Variables set in the environment, either directly or via
|
|
|
|
.Sy build.sh
|
|
|
|
options to set specific values in the
|
|
|
|
.Sy \*[toolprefix]make- Ns Sy MACHINE
|
|
|
|
wrapper script do not override variables set in the
|
|
|
|
.Xr mk.conf 5
|
|
|
|
file.
|
|
|
|
To allow variables in
|
|
|
|
.Xr mk.conf 5
|
|
|
|
to be overridden by the environment or
|
|
|
|
.Sy build.sh
|
|
|
|
options, define the variables using the
|
|
|
|
.Dq Li ?=
|
|
|
|
.Xr make 1
|
|
|
|
variable assignment operator.
|
|
|
|
For example,
|
|
|
|
.Bd -unfilled -offset indent
|
|
|
|
.Li MAKEVERBOSE?=1
|
|
|
|
.Ed
|
2023-07-22 21:50:04 +03:00
|
|
|
.Pp
|
|
|
|
The supported
|
|
|
|
.Xr mk.conf 5
|
|
|
|
make variables are:
|
|
|
|
.\" Keep in sync with share/man/man5/mk.conf.5 section NETBSD SYSTEM VARIABLES
|
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Sy BSDOBJDIR ,
|
|
|
|
.Sy BSDSRCDIR ,
|
|
|
|
.Sy BUILD ,
|
|
|
|
.Sy BUILDID ,
|
|
|
|
.Sy BUILDINFO ,
|
|
|
|
.Sy BUILDSEED ,
|
|
|
|
.Sy CDEXTRA ,
|
|
|
|
.Sy CONFIGOPTS ,
|
|
|
|
.Sy COPTS ,
|
|
|
|
.Sy CPUFLAGS ,
|
|
|
|
.Sy DESTDIR ,
|
|
|
|
.Sy EXTERNAL_TOOLCHAIN ,
|
|
|
|
.Sy INSTALLBOOT_BOARDS ,
|
|
|
|
.Sy INSTALLWORLDDIR ,
|
|
|
|
.Sy KERNARCHDIR ,
|
|
|
|
.Sy KERNCONFDIR ,
|
|
|
|
.Sy KERNEL_DIR ,
|
|
|
|
.Sy KERNOBJDIR ,
|
|
|
|
.Sy KERNSRCDIR ,
|
|
|
|
.Sy LOCALTIME ,
|
|
|
|
.Sy MAKEVERBOSE ,
|
|
|
|
.Sy MKAMDGPUFIRMWARE ,
|
|
|
|
.Sy MKARGON2 ,
|
|
|
|
.Sy MKARZERO ,
|
|
|
|
.Sy MKATF ,
|
|
|
|
.Sy MKBINUTILS ,
|
|
|
|
.Sy MKBSDGREP ,
|
|
|
|
.Sy MKBSDTAR ,
|
|
|
|
.Sy MKCATPAGES ,
|
|
|
|
.Sy MKCLEANSRC ,
|
|
|
|
.Sy MKCLEANVERIFY ,
|
|
|
|
.Sy MKCOMPAT ,
|
|
|
|
.Sy MKCOMPATMODULES ,
|
|
|
|
.Sy MKCOMPATTESTS ,
|
|
|
|
.Sy MKCOMPATX11 ,
|
|
|
|
.Sy MKCOMPLEX ,
|
|
|
|
.Sy MKCROSSGDB ,
|
|
|
|
.Sy MKCTF ,
|
|
|
|
.Sy MKCVS ,
|
|
|
|
.Sy MKCXX ,
|
|
|
|
.Sy MKDEBUG ,
|
|
|
|
.Sy MKDEBUGKERNEL ,
|
|
|
|
.Sy MKDEBUGLIB ,
|
|
|
|
.Sy MKDEBUGTOOLS ,
|
|
|
|
.Sy MKDEPINCLUDES ,
|
|
|
|
.Sy MKDOC ,
|
|
|
|
.Sy MKDTB ,
|
|
|
|
.Sy MKDTC ,
|
|
|
|
.Sy MKDTRACE ,
|
|
|
|
.Sy MKDYNAMICROOT ,
|
|
|
|
.Sy MKFIRMWARE ,
|
|
|
|
.Sy MKGCC ,
|
|
|
|
.Sy MKGCCCMDS ,
|
|
|
|
.Sy MKGDB ,
|
|
|
|
.Sy MKGROFF ,
|
|
|
|
.Sy MKGROFFHTMLDOC ,
|
|
|
|
.Sy MKHESIOD ,
|
|
|
|
.Sy MKHOSTOBJ ,
|
|
|
|
.Sy MKHTML ,
|
|
|
|
.Sy MKIEEEFP ,
|
|
|
|
.Sy MKINET6 ,
|
|
|
|
.Sy MKINFO ,
|
|
|
|
.Sy MKIPFILTER ,
|
|
|
|
.Sy MKISCSI ,
|
|
|
|
.Sy MKKERBEROS ,
|
|
|
|
.Sy MKKMOD ,
|
|
|
|
.Sy MKKYUA ,
|
|
|
|
.Sy MKLDAP ,
|
|
|
|
.Sy MKLIBCSANITIZER ,
|
|
|
|
.Sy MKLIBCXX ,
|
|
|
|
.Sy MKLIBSTDCXX ,
|
|
|
|
.Sy MKLINKLIB ,
|
|
|
|
.Sy MKLINT ,
|
|
|
|
.Sy MKLLVM ,
|
|
|
|
.Sy MKLLVMRT ,
|
|
|
|
.Sy MKLVM ,
|
|
|
|
.Sy MKMAKEMANDB ,
|
|
|
|
.Sy MKMAN ,
|
|
|
|
.Sy MKMANDOC ,
|
|
|
|
.Sy MKMANZ ,
|
|
|
|
.Sy MKMDNS ,
|
|
|
|
.Sy MKNLS ,
|
|
|
|
.Sy MKNOUVEAUFIRMWARE ,
|
|
|
|
.Sy MKNPF ,
|
|
|
|
.Sy MKNSD ,
|
|
|
|
.Sy MKOBJ ,
|
|
|
|
.Sy MKOBJDIRS ,
|
|
|
|
.Sy MKPAM ,
|
|
|
|
.Sy MKPCC ,
|
|
|
|
.Sy MKPF ,
|
|
|
|
.Sy MKPIC ,
|
|
|
|
.Sy MKPICINSTALL ,
|
|
|
|
.Sy MKPICLIB ,
|
|
|
|
.Sy MKPIE ,
|
|
|
|
.Sy MKPIGZGZIP ,
|
|
|
|
.Sy MKPOSTFIX ,
|
|
|
|
.Sy MKPROFILE ,
|
|
|
|
.Sy MKRADEONFIRMWARE ,
|
|
|
|
.Sy MKRELRO ,
|
|
|
|
.Sy MKREPRO ,
|
|
|
|
.Sy MKREPRO_TIMESTAMP ,
|
|
|
|
.Sy MKRUMP ,
|
|
|
|
.Sy MKSANITIZER ,
|
|
|
|
.Sy MKSHARE ,
|
|
|
|
.Sy MKSKEY ,
|
|
|
|
.Sy MKSLJIT ,
|
|
|
|
.Sy MKSOFTFLOAT ,
|
|
|
|
.Sy MKSTATICLIB ,
|
|
|
|
.Sy MKSTATICPIE ,
|
|
|
|
.Sy MKSTRIPIDENT ,
|
|
|
|
.Sy MKSTRIPSYM ,
|
|
|
|
.Sy MKTEGRAFIRMWARE ,
|
|
|
|
.Sy MKTPM ,
|
|
|
|
.Sy MKUNBOUND ,
|
|
|
|
.Sy MKUNPRIVED ,
|
|
|
|
.Sy MKUPDATE ,
|
|
|
|
.Sy MKX11 ,
|
|
|
|
.Sy MKX11FONTS ,
|
|
|
|
.Sy MKX11MOTIF ,
|
|
|
|
.Sy MKXORG_SERVER ,
|
|
|
|
.Sy MKYP ,
|
|
|
|
.Sy MKZFS ,
|
|
|
|
.Sy NETBSDSRCDIR ,
|
|
|
|
.Sy NETBSD_OFFICIAL_RELEASE ,
|
|
|
|
.Sy NOCLEANDIR ,
|
|
|
|
.Sy NODISTRIBDIRS ,
|
|
|
|
.Sy NOINCLUDES ,
|
|
|
|
.Sy OBJMACHINE ,
|
|
|
|
.Sy RELEASEDIR ,
|
|
|
|
.Sy RUMPUSER_THREADS ,
|
|
|
|
.Sy RUMP_CURLWP ,
|
|
|
|
.Sy RUMP_DEBUG ,
|
|
|
|
.Sy RUMP_DIAGNOSTIC ,
|
|
|
|
.Sy RUMP_KTRACE ,
|
|
|
|
.Sy RUMP_LOCKDEBUG ,
|
|
|
|
.Sy RUMP_LOCKS_UP ,
|
|
|
|
.Sy RUMP_NBCOMPAT ,
|
|
|
|
.Sy RUMP_VIRTIF ,
|
|
|
|
.Sy RUMP_VNODE_LOCKDEBUG ,
|
|
|
|
.Sy TOOLCHAIN_MISSING ,
|
|
|
|
.Sy TOOLDIR ,
|
|
|
|
.Sy USETOOLS ,
|
|
|
|
.Sy USE_FORT ,
|
|
|
|
.Sy USE_HESIOD ,
|
|
|
|
.Sy USE_INET6 ,
|
|
|
|
.Sy USE_JEMALLOC ,
|
|
|
|
.Sy USE_KERBEROS ,
|
|
|
|
.Sy USE_LDAP ,
|
|
|
|
.Sy USE_LIBCSANITIZER ,
|
|
|
|
.Sy USE_PAM ,
|
|
|
|
.Sy USE_PIGZGZIP ,
|
|
|
|
.Sy USE_SANITIZER ,
|
|
|
|
.Sy USE_SKEY ,
|
|
|
|
.Sy USE_SSP ,
|
|
|
|
.Sy USE_XZ_SETS ,
|
|
|
|
.Sy USE_YP ,
|
|
|
|
.Sy X11MOTIFPATH ,
|
|
|
|
.Sy X11SRCDIR .
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The obsolete
|
|
|
|
.Xr mk.conf 5
|
|
|
|
make variables are:
|
|
|
|
.\" Keep in sync with share/man/man5/mk.conf.5 section OBSOLETE VARIABLES
|
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Sy EXTSRCSRCDIR ,
|
|
|
|
.Sy MKBFD ,
|
|
|
|
.Sy MKCRYPTO ,
|
|
|
|
.Sy MKEXTSRC ,
|
|
|
|
.Sy MKKDEBUG ,
|
|
|
|
.Sy MKKERBEROS4 ,
|
|
|
|
.Sy MKLLD ,
|
|
|
|
.Sy MKLLDB ,
|
|
|
|
.Sy MKMCLINKER ,
|
|
|
|
.Sy MKPERFUSE ,
|
|
|
|
.Sy MKTOOLSDEBUG ,
|
|
|
|
.Sy NBUILDJOBS ,
|
|
|
|
.Sy SHAREDSTRINGS ,
|
|
|
|
.Sy USE_COMBINE ,
|
|
|
|
.Sy USE_NEW_TOOLCHAIN .
|
|
|
|
.Ed
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.Sh BUILDING
|
|
|
|
.
|
2023-07-22 21:50:04 +03:00
|
|
|
.Ss make command line options
|
2004-10-12 08:07:09 +04:00
|
|
|
This is not a summary of all the options available to
|
2001-10-29 22:46:47 +03:00
|
|
|
.Xr make 1 ;
|
|
|
|
only the options used most frequently with
|
|
|
|
.Nx
|
|
|
|
builds are listed here.
|
|
|
|
.
|
|
|
|
.Bl -tag -width "var=value"
|
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl j Ar njob
|
2002-05-03 02:13:30 +04:00
|
|
|
Run up to
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar njob
|
2012-09-20 03:08:37 +04:00
|
|
|
.Xr make 1
|
2002-05-03 02:13:30 +04:00
|
|
|
subjobs in parallel.
|
2012-09-20 03:08:37 +04:00
|
|
|
Makefiles should use .WAIT or have explicit dependencies
|
2002-05-03 02:13:30 +04:00
|
|
|
as necessary to enforce build ordering.
|
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl m Ar dir
|
2001-10-30 19:22:40 +03:00
|
|
|
Specify the default directory for searching for system Makefile
|
2001-10-29 22:46:47 +03:00
|
|
|
segments, mainly the
|
|
|
|
.Aq bsd.*.mk
|
2002-12-18 22:46:48 +03:00
|
|
|
files.
|
|
|
|
When building any full
|
2001-10-29 22:46:47 +03:00
|
|
|
.Nx
|
|
|
|
source tree, this should be set to the
|
2014-05-21 17:11:25 +04:00
|
|
|
.Dq Pa share/mk
|
2002-12-18 22:46:48 +03:00
|
|
|
directory in the source tree.
|
2008-03-28 08:23:44 +03:00
|
|
|
This is set automatically when building from the top level, or when using
|
|
|
|
.Sy build.sh .
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl n
|
2023-05-17 00:39:26 +03:00
|
|
|
Show the commands that would have been executed, but do not
|
2002-12-18 22:46:48 +03:00
|
|
|
actually execute them.
|
|
|
|
This will still cause recursion to take place.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2003-12-19 15:06:45 +03:00
|
|
|
.It Fl V Ar var
|
2023-05-17 00:39:26 +03:00
|
|
|
Show
|
2001-10-30 19:22:40 +03:00
|
|
|
.Xr make 1 Ns 's
|
2001-10-29 22:46:47 +03:00
|
|
|
idea of the value of
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar var .
|
2001-10-29 22:46:47 +03:00
|
|
|
Does not build any targets.
|
|
|
|
.
|
2023-05-17 00:39:26 +03:00
|
|
|
.It Ar var Ns Sy = Ns Ar value
|
2001-10-29 22:46:47 +03:00
|
|
|
Set the variable
|
2023-05-17 00:39:26 +03:00
|
|
|
.Ar var
|
2001-10-29 22:46:47 +03:00
|
|
|
to
|
2023-05-17 00:39:26 +03:00
|
|
|
.Ar value ,
|
2001-10-29 22:46:47 +03:00
|
|
|
overriding any setting specified by the process environment, the
|
|
|
|
.Sy MAKECONF
|
|
|
|
configuration file, or the system Makefile segments.
|
|
|
|
.
|
|
|
|
.El
|
|
|
|
.
|
2023-07-22 21:50:04 +03:00
|
|
|
.Ss make targets
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
These default targets may be built by running
|
|
|
|
.Xr make 1
|
|
|
|
in any subtree of the
|
|
|
|
.Nx
|
2002-12-18 22:46:48 +03:00
|
|
|
source code.
|
|
|
|
It is recommended that none of these be used from the top
|
2001-10-29 22:46:47 +03:00
|
|
|
level Makefile; as a specific exception,
|
|
|
|
.Dq make obj
|
|
|
|
and
|
|
|
|
.Dq make cleandir
|
|
|
|
are useful in that context.
|
|
|
|
.
|
|
|
|
.Bl -tag -width "dependall"
|
|
|
|
.
|
|
|
|
.It Sy all
|
|
|
|
Build programs, libraries, and preformatted documentation.
|
|
|
|
.
|
|
|
|
.It Sy clean
|
|
|
|
Remove program and library object code files.
|
|
|
|
.
|
|
|
|
.It Sy cleandir
|
|
|
|
Same as
|
|
|
|
.Sy clean ,
|
2001-10-30 19:22:40 +03:00
|
|
|
but also remove preformatted documentation, dependency files generated
|
2001-10-29 22:46:47 +03:00
|
|
|
by
|
|
|
|
.Dq make depend ,
|
2001-10-30 19:22:40 +03:00
|
|
|
and any other files known to be created at build time.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.It Sy depend
|
|
|
|
Create dependency files
|
2023-07-18 19:59:57 +03:00
|
|
|
.Pa ( .depend )
|
2001-10-30 19:22:40 +03:00
|
|
|
containing more detailed information about the dependencies of source
|
2002-12-18 22:46:48 +03:00
|
|
|
code on header files.
|
|
|
|
Allows programs to be recompiled automatically when a dependency changes.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.It Sy dependall
|
|
|
|
Does a
|
|
|
|
.Dq make depend
|
|
|
|
immediately followed by a
|
|
|
|
.Dq make all .
|
2002-05-03 02:13:30 +04:00
|
|
|
This improves cache locality of the build since both passes read the source
|
|
|
|
files in their entirety.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2004-02-07 02:22:44 +03:00
|
|
|
.It Sy distclean
|
|
|
|
Synonym for
|
|
|
|
.Sy cleandir .
|
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.It Sy includes
|
2002-12-18 22:46:48 +03:00
|
|
|
Build and install system header files.
|
|
|
|
Typically needed before any system libraries or programs can be built.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.It Sy install
|
|
|
|
Install programs, libraries, and documentation into
|
|
|
|
.Sy DESTDIR .
|
2002-09-17 20:35:39 +04:00
|
|
|
Few files will be installed to
|
2003-01-30 05:52:40 +03:00
|
|
|
.Sy DESTDIR Ns Pa /dev ,
|
|
|
|
.Sy DESTDIR Ns Pa /etc ,
|
|
|
|
.Sy DESTDIR Ns Pa /root
|
2002-09-17 20:35:39 +04:00
|
|
|
or
|
2003-01-30 05:52:40 +03:00
|
|
|
.Sy DESTDIR Ns Pa /var
|
2002-09-17 20:35:39 +04:00
|
|
|
in order to prevent user supplied configuration data from being overwritten.
|
2001-10-29 22:46:47 +03:00
|
|
|
.It Sy lint
|
|
|
|
Run
|
|
|
|
.Xr lint 1
|
2001-10-30 19:22:40 +03:00
|
|
|
against the C source code, where appropriate, and generate
|
2001-10-29 22:46:47 +03:00
|
|
|
system-installed lint libraries.
|
|
|
|
.
|
|
|
|
.It Sy obj
|
2001-10-30 19:22:40 +03:00
|
|
|
Create object directories to be used for built files, instead of
|
2001-10-29 22:46:47 +03:00
|
|
|
building directly in the source tree.
|
|
|
|
.
|
|
|
|
.It Sy tags
|
|
|
|
Create
|
|
|
|
.Xr ctags 1
|
|
|
|
searchable function lists usable by the
|
|
|
|
.Xr ex 1
|
|
|
|
and
|
|
|
|
.Xr vi 1
|
|
|
|
text editors.
|
|
|
|
.
|
|
|
|
.El
|
|
|
|
.
|
2023-07-22 21:50:04 +03:00
|
|
|
.Ss make targets for the top level
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
Additional
|
|
|
|
.Xr make 1
|
|
|
|
targets are usable specifically from the top source level to facilitate
|
|
|
|
building the entire
|
|
|
|
.Nx
|
|
|
|
source tree.
|
|
|
|
.
|
2002-12-25 03:58:00 +03:00
|
|
|
.Bl -tag -width "distribution"
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.It Sy build
|
|
|
|
Build the entire
|
|
|
|
.Nx
|
2008-03-08 17:48:57 +03:00
|
|
|
system (except the kernel).
|
2002-12-18 22:46:48 +03:00
|
|
|
This orders portions of the source tree such that prerequisites
|
2001-10-29 22:46:47 +03:00
|
|
|
will be built in the proper order.
|
|
|
|
.
|
2002-12-25 03:58:00 +03:00
|
|
|
.It Sy distribution
|
|
|
|
Do a
|
|
|
|
.Dq make build ,
|
2008-03-08 17:48:57 +03:00
|
|
|
and then install a full distribution (which does not include a kernel) into
|
2003-01-23 19:24:08 +03:00
|
|
|
.Sy DESTDIR ,
|
|
|
|
including files in
|
2003-01-30 05:52:40 +03:00
|
|
|
.Sy DESTDIR Ns Pa /dev ,
|
|
|
|
.Sy DESTDIR Ns Pa /etc ,
|
|
|
|
.Sy DESTDIR Ns Pa /root
|
2003-01-23 19:24:08 +03:00
|
|
|
and
|
2003-01-30 05:52:40 +03:00
|
|
|
.Sy DESTDIR Ns Pa /var .
|
2002-12-25 03:58:00 +03:00
|
|
|
.
|
|
|
|
.It Sy buildworld
|
|
|
|
As per
|
|
|
|
.Dq make distribution ,
|
|
|
|
except that it ensures that
|
|
|
|
.Sy DESTDIR
|
|
|
|
is not the root directory.
|
|
|
|
.
|
|
|
|
.It Sy installworld
|
|
|
|
Install the distribution from
|
|
|
|
.Sy DESTDIR
|
|
|
|
to
|
2008-03-28 08:23:44 +03:00
|
|
|
.Sy INSTALLWORLDDIR ,
|
|
|
|
which defaults to the root directory.
|
2002-12-25 03:58:00 +03:00
|
|
|
Ensures that
|
|
|
|
.Sy INSTALLWORLDDIR
|
2004-10-12 08:07:09 +04:00
|
|
|
is not the root directory if cross compiling.
|
2002-12-25 03:58:00 +03:00
|
|
|
.Pp
|
2007-03-26 21:35:06 +04:00
|
|
|
The
|
|
|
|
.Sy INSTALLSETS
|
2011-09-09 18:01:28 +04:00
|
|
|
environment variable may be set to a space-separated list of
|
2007-03-26 21:35:06 +04:00
|
|
|
distribution sets to be installed.
|
|
|
|
By default, all sets except
|
|
|
|
.Dq etc
|
|
|
|
and
|
|
|
|
.Dq xetc
|
2008-03-28 08:23:44 +03:00
|
|
|
are installed, so most files in
|
2007-03-26 21:35:06 +04:00
|
|
|
.Sy INSTALLWORLDDIR Ns Pa /etc
|
2008-03-28 08:23:44 +03:00
|
|
|
will not be installed or modified.
|
2007-03-26 21:35:06 +04:00
|
|
|
.Pp
|
2002-12-25 03:58:00 +03:00
|
|
|
.Em Note :
|
2007-03-26 21:35:06 +04:00
|
|
|
Before performing this operation with
|
|
|
|
.Sy INSTALLWORLDDIR Ns = Ns Pa / ,
|
|
|
|
it is highly recommended that you upgrade your kernel and reboot.
|
|
|
|
After performing this operation,
|
|
|
|
it is recommended that you use
|
|
|
|
.Xr etcupdate 8
|
|
|
|
to update files in
|
2012-09-20 03:31:36 +04:00
|
|
|
.Sy INSTALLWORLDDIR Ns Pa /etc ,
|
|
|
|
and
|
2007-03-26 21:35:06 +04:00
|
|
|
.Xr postinstall 8
|
2012-09-20 03:31:36 +04:00
|
|
|
to check for or fix inconsistencies.
|
2003-01-26 16:15:17 +03:00
|
|
|
.It Sy sets
|
|
|
|
Create distribution sets from
|
|
|
|
.Sy DESTDIR
|
|
|
|
into
|
2008-03-18 07:24:38 +03:00
|
|
|
.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/sets .
|
2003-01-26 16:15:17 +03:00
|
|
|
Should be run after
|
2008-03-28 08:23:44 +03:00
|
|
|
.Dq make distribution ,
|
|
|
|
as
|
2003-01-26 16:15:17 +03:00
|
|
|
.Dq make build
|
2008-03-28 08:23:44 +03:00
|
|
|
alone does not install all of the required files.
|
2003-01-26 16:15:17 +03:00
|
|
|
.
|
2003-05-10 11:12:37 +04:00
|
|
|
.It Sy sourcesets
|
|
|
|
Create source sets of the source tree into
|
|
|
|
.Sy RELEASEDIR Ns Pa /source/sets .
|
|
|
|
.
|
2006-01-04 18:35:20 +03:00
|
|
|
.It Sy syspkgs
|
|
|
|
Create syspkgs from
|
|
|
|
.Sy DESTDIR
|
|
|
|
into
|
2008-03-18 07:24:38 +03:00
|
|
|
.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /binary/syspkgs .
|
2006-01-04 18:35:20 +03:00
|
|
|
Should be run after
|
2008-03-28 08:23:44 +03:00
|
|
|
.Dq make distribution ,
|
|
|
|
as
|
2006-01-04 18:35:20 +03:00
|
|
|
.Dq make build
|
2008-03-28 08:23:44 +03:00
|
|
|
alone does not install all of the required files.
|
2006-01-04 18:35:20 +03:00
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.It Sy release
|
|
|
|
Do a
|
2003-01-23 19:24:08 +03:00
|
|
|
.Dq make distribution ,
|
2003-01-26 16:15:17 +03:00
|
|
|
build kernels, distribution media, and install sets
|
|
|
|
(this as per
|
|
|
|
.Dq make sets ) ,
|
|
|
|
and
|
2001-10-29 22:46:47 +03:00
|
|
|
then package the system into a standard release layout as described by
|
|
|
|
.Xr release 7 .
|
|
|
|
This requires that
|
|
|
|
.Sy RELEASEDIR
|
|
|
|
be set (see above).
|
|
|
|
.
|
2008-03-28 08:23:44 +03:00
|
|
|
.It Sy iso-image
|
2007-04-13 23:43:38 +04:00
|
|
|
Create a
|
|
|
|
.Nx
|
|
|
|
installation CD-ROM image in the
|
2014-11-05 11:15:04 +03:00
|
|
|
.Sy RELEASEDIR Ns Pa /images
|
2007-04-13 23:43:38 +04:00
|
|
|
directory.
|
|
|
|
The CD-ROM file system will have a layout as described in
|
|
|
|
.Xr release 7 .
|
|
|
|
.Pp
|
|
|
|
For most machine types, the CD-ROM will be bootable, and will automatically
|
|
|
|
run the
|
|
|
|
.Xr sysinst 8
|
|
|
|
menu-based installation program, which can be used to install or upgrade a
|
|
|
|
.Nx
|
|
|
|
system.
|
|
|
|
Bootable CD-ROMs also contain tools that may be useful in
|
|
|
|
repairing a damaged
|
|
|
|
.Nx
|
|
|
|
installation.
|
|
|
|
.Pp
|
|
|
|
Before
|
|
|
|
.Dq make iso-image
|
|
|
|
is attempted, RELEASEDIR must be populated by
|
2006-01-29 00:34:07 +03:00
|
|
|
.Dq make release
|
|
|
|
or equivalent.
|
2007-04-13 23:43:38 +04:00
|
|
|
.Pp
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Em Note :
|
|
|
|
Other, smaller, CD-ROM images may be created in the
|
2008-03-18 07:24:38 +03:00
|
|
|
.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/cdrom
|
2007-04-13 23:43:38 +04:00
|
|
|
directory by
|
|
|
|
.Dq "make release" .
|
|
|
|
These smaller images usually contain the same tools as the larger images in
|
2014-11-05 11:15:04 +03:00
|
|
|
.Sy RELEASEDIR Ns Pa /images ,
|
2007-04-13 23:43:38 +04:00
|
|
|
but do not contain additional content such as the distribution sets.
|
|
|
|
.Pp
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Em Note :
|
|
|
|
The mac68k port still uses an older method of creating
|
2007-04-13 23:43:38 +04:00
|
|
|
CD-ROM images.
|
2006-01-29 00:34:07 +03:00
|
|
|
This requires the
|
|
|
|
.Xr mkisofs 1
|
|
|
|
utility, which is not part of
|
|
|
|
.Nx ,
|
|
|
|
but which can be installed from
|
2006-01-29 17:03:59 +03:00
|
|
|
.Pa pkgsrc/sysutils/cdrtools .
|
2006-01-29 00:34:07 +03:00
|
|
|
.
|
2008-08-18 09:27:05 +04:00
|
|
|
.It Sy iso-image-source
|
2007-08-30 14:29:02 +04:00
|
|
|
Create a
|
|
|
|
.Nx
|
|
|
|
installation CD-ROM image in the
|
2014-11-05 11:15:04 +03:00
|
|
|
.Sy RELEASEDIR Ns Pa /images
|
2007-08-30 14:29:02 +04:00
|
|
|
directory.
|
|
|
|
The CD-ROM file system will have a layout as described in
|
|
|
|
.Xr release 7 .
|
|
|
|
It will have top level directories for the machine type and source.
|
|
|
|
.Pp
|
|
|
|
For most machine types, the CD-ROM will be bootable, and will automatically
|
|
|
|
run the
|
|
|
|
.Xr sysinst 8
|
|
|
|
menu-based installation program, which can be used to install or upgrade a
|
|
|
|
.Nx
|
|
|
|
system.
|
|
|
|
Bootable CD-ROMs also contain tools that may be useful in
|
|
|
|
repairing a damaged
|
|
|
|
.Nx
|
|
|
|
installation.
|
|
|
|
.Pp
|
|
|
|
Before
|
|
|
|
.Dq make iso-image-source
|
|
|
|
is attempted, RELEASEDIR must be populated by
|
|
|
|
.Dq make sourcesets release
|
|
|
|
or equivalent.
|
|
|
|
.Pp
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Em Note :
|
|
|
|
Other, smaller, CD-ROM images may be created in the
|
2008-03-18 07:24:38 +03:00
|
|
|
.Sy RELEASEDIR/RELEASEMACHINEDIR Ns Pa /installation/cdrom
|
2007-08-30 14:29:02 +04:00
|
|
|
directory by
|
|
|
|
.Dq make release .
|
|
|
|
These smaller images usually contain the same tools as the larger images in
|
2014-11-05 11:15:04 +03:00
|
|
|
.Sy RELEASEDIR Ns Pa /images ,
|
2007-08-30 14:29:02 +04:00
|
|
|
but do not contain additional content such as the distribution sets.
|
|
|
|
.Pp
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Em Note :
|
|
|
|
The mac68k port still uses an older method of creating
|
2007-08-30 14:29:02 +04:00
|
|
|
CD-ROM images.
|
|
|
|
This requires the
|
|
|
|
.Xr mkisofs 1
|
|
|
|
utility, which is not part of
|
|
|
|
.Nx ,
|
|
|
|
but which can be installed from
|
|
|
|
.Pa pkgsrc/sysutils/cdrtools .
|
|
|
|
.
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.It Sy install-image
|
|
|
|
Create a bootable
|
|
|
|
.Nx
|
|
|
|
installation disk image in the
|
2017-04-22 10:48:19 +03:00
|
|
|
.Sy RELEASEDIR Ns Pa /images
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
directory.
|
2012-02-15 01:32:07 +04:00
|
|
|
The installation disk image is suitable for copying to
|
|
|
|
bootable USB flash memory sticks, etc., for machines which
|
|
|
|
are able to boot from such devices.
|
|
|
|
The file system in the bootable disk image will have a layout
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
as described in
|
|
|
|
.Xr release 7 .
|
|
|
|
.Pp
|
|
|
|
The installation image is bootable, and will automatically
|
|
|
|
run the
|
|
|
|
.Xr sysinst 8
|
|
|
|
menu-based installation program, which can be used to install or upgrade a
|
|
|
|
.Nx
|
|
|
|
system.
|
2012-02-15 01:32:07 +04:00
|
|
|
The image also contains tools that may be
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
useful in repairing a damaged
|
|
|
|
.Nx
|
|
|
|
installation.
|
|
|
|
.Pp
|
|
|
|
Before
|
|
|
|
.Dq make install-image
|
2012-02-15 01:32:07 +04:00
|
|
|
is attempted,
|
|
|
|
.Sy RELEASEDIR
|
|
|
|
must be populated by
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.Dq make release
|
2012-02-15 01:32:07 +04:00
|
|
|
or equivalent.
|
|
|
|
The build must have been performed with
|
2012-09-20 03:08:37 +04:00
|
|
|
.Sy MKUNPRIVED=yes
|
2012-02-15 01:32:07 +04:00
|
|
|
because
|
|
|
|
.Dq make install-image
|
|
|
|
relies on information in
|
|
|
|
.Sy DESTDIR Ns Pa /METALOG .
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.
|
2015-01-09 02:59:26 +03:00
|
|
|
.It Sy live-image
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
Create
|
|
|
|
.Nx
|
|
|
|
live images in the
|
2015-06-07 08:30:18 +03:00
|
|
|
.Sy RELEASEDIR/images
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
directory.
|
|
|
|
The live image contains all necessary files
|
|
|
|
to boot
|
|
|
|
.Nx
|
2012-02-15 01:32:07 +04:00
|
|
|
up to multi-user mode, including all files
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
which should be extracted during installation,
|
|
|
|
.Nx
|
2012-02-15 01:32:07 +04:00
|
|
|
disklabel, bootloaders, etc.
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.Pp
|
2012-02-15 01:32:07 +04:00
|
|
|
The live image is suitable for use as a disk image in
|
|
|
|
virtual machine environments such as QEMU,
|
|
|
|
and also useful to boot
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.Nx
|
2012-02-15 01:32:07 +04:00
|
|
|
from a USB flash memory stick
|
|
|
|
on a real machine, without the need for installation.
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.Pp
|
|
|
|
Before
|
|
|
|
.Dq make live-image
|
|
|
|
is attempted, RELEASEDIR must be populated by
|
|
|
|
.Dq make release
|
2012-02-23 17:34:15 +04:00
|
|
|
or equivalent.
|
2012-02-15 01:32:07 +04:00
|
|
|
The build must have been performed with
|
2012-09-20 03:08:37 +04:00
|
|
|
.Sy MKUNPRIVED=yes
|
2012-02-15 01:32:07 +04:00
|
|
|
because
|
|
|
|
.Dq make install-image
|
|
|
|
relies on information in
|
|
|
|
.Sy DESTDIR Ns Pa /METALOG .
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.It Sy regression-tests
|
|
|
|
Can only be run after building the regression tests in the directory
|
|
|
|
.Dq regress .
|
2008-03-28 08:23:44 +03:00
|
|
|
Runs those compiled regression tests on the local host.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
Most tests are now managed instead using
|
2008-03-28 08:23:44 +03:00
|
|
|
.Xr atf 7 ;
|
|
|
|
this target should probably run those as well but currently does not.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.El
|
|
|
|
.
|
2023-07-22 21:50:04 +03:00
|
|
|
.Ss The build.sh script
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2011-09-09 22:48:34 +04:00
|
|
|
This script file is a shell script designed to build the
|
2001-10-29 22:46:47 +03:00
|
|
|
entire
|
|
|
|
.Nx
|
2011-09-09 22:48:34 +04:00
|
|
|
system on any host with a suitable modern shell and some common
|
|
|
|
utilities.
|
|
|
|
The required shell features are described under the
|
|
|
|
.Sy HOST_SH
|
|
|
|
variable.
|
|
|
|
.Pp
|
|
|
|
If a host system's default shell does support the required
|
|
|
|
features, then we suggest that you explicitly specify
|
|
|
|
a suitable shell using a command like
|
|
|
|
.Bd -unfilled -offset indent
|
|
|
|
.Li /path/to/suitable/shell build.sh Op Ar options
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
The above command will usually enable
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh
|
2011-09-09 22:48:34 +04:00
|
|
|
to automatically set
|
|
|
|
.Sy HOST_SH Ns Cm = Ns Pa /path/to/suitable/shell ,
|
|
|
|
but if that fails, then the following set of commands may be used instead:
|
|
|
|
.Bd -unfilled -offset indent
|
|
|
|
.Li HOST_SH= Ns Va /path/to/suitable/shell
|
|
|
|
.Li export HOST_SH
|
|
|
|
.Li ${HOST_SH} build.sh Op Ar options
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
If
|
|
|
|
.Sy build.sh
|
|
|
|
detects that it is being executed under an unsuitable shell, it attempts
|
2023-05-17 00:39:26 +03:00
|
|
|
to exec a suitable shell instead, or shows an error message.
|
2011-09-09 22:48:34 +04:00
|
|
|
If
|
|
|
|
.Sy HOST_SH
|
|
|
|
is not set explicitly, then
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh
|
2011-09-09 22:48:34 +04:00
|
|
|
sets a default using heuristics dependent on the host platform,
|
|
|
|
or from the shell under which
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh
|
2011-09-09 22:48:34 +04:00
|
|
|
is executed (if that can be determined),
|
|
|
|
or using the first copy of
|
|
|
|
.Pa sh
|
|
|
|
found in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Ev PATH .
|
2001-10-29 22:46:47 +03:00
|
|
|
.Pp
|
2001-10-30 19:22:40 +03:00
|
|
|
All cross-compile builds, and most native builds, of the entire system
|
2001-10-29 22:46:47 +03:00
|
|
|
should make use of
|
|
|
|
.Sy build.sh
|
|
|
|
rather than just running
|
|
|
|
.Dq make .
|
|
|
|
This way, the
|
|
|
|
.Xr make 1
|
2001-10-30 19:22:40 +03:00
|
|
|
program will be bootstrapped properly, in case the host system has an
|
2001-10-29 22:46:47 +03:00
|
|
|
older or incompatible
|
|
|
|
.Dq make
|
|
|
|
program.
|
|
|
|
.Pp
|
|
|
|
When compiling the entire system via
|
|
|
|
.Sy build.sh ,
|
|
|
|
many
|
|
|
|
.Xr make 1
|
2001-10-30 19:22:40 +03:00
|
|
|
variables are set for you in order to help encapsulate the build
|
2002-12-18 22:46:48 +03:00
|
|
|
process.
|
|
|
|
In the list of options below, variables that are automatically set by
|
2001-10-29 22:46:47 +03:00
|
|
|
.Sy build.sh
|
2001-11-01 02:20:34 +03:00
|
|
|
are noted where applicable.
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.Pp
|
2003-01-23 19:24:08 +03:00
|
|
|
The following operations are supported by
|
2001-10-29 22:46:47 +03:00
|
|
|
.Sy build.sh :
|
|
|
|
.
|
2003-01-23 19:24:08 +03:00
|
|
|
.Bl -tag -width "distribution"
|
|
|
|
.
|
|
|
|
.It Sy build
|
|
|
|
Build the system as per
|
|
|
|
.Dq make build .
|
2008-03-28 08:23:44 +03:00
|
|
|
Before the main part of the build commences, this command runs the
|
2003-01-23 19:24:08 +03:00
|
|
|
.Sy obj
|
2008-03-28 08:23:44 +03:00
|
|
|
operation (unless the
|
|
|
|
.Fl o
|
|
|
|
option is given),
|
|
|
|
.Dq make cleandir
|
|
|
|
(unless the
|
|
|
|
.Fl u
|
|
|
|
option is given),
|
|
|
|
and the
|
2003-01-23 19:24:08 +03:00
|
|
|
.Sy tools
|
2008-03-28 08:23:44 +03:00
|
|
|
operation.
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
|
|
|
.It Sy distribution
|
|
|
|
Build a full distribution as per
|
|
|
|
.Dq make distribution .
|
2008-03-28 08:23:44 +03:00
|
|
|
This command first runs the
|
2003-01-23 19:24:08 +03:00
|
|
|
.Sy build
|
|
|
|
operation.
|
|
|
|
.
|
|
|
|
.It Sy release
|
|
|
|
Build a full release as per
|
|
|
|
.Dq make release .
|
2008-03-28 08:23:44 +03:00
|
|
|
This command first runs the
|
2003-01-23 19:24:08 +03:00
|
|
|
.Sy distribution
|
|
|
|
operation.
|
|
|
|
.
|
2023-05-17 00:39:26 +03:00
|
|
|
.It Sy help
|
|
|
|
Show a help message, and exit.
|
|
|
|
.
|
2003-01-26 08:34:32 +03:00
|
|
|
.It Sy makewrapper
|
|
|
|
Create the
|
2023-06-11 23:34:14 +03:00
|
|
|
.Sy \*[toolprefix]make- Ns Sy MACHINE
|
2023-07-22 01:07:59 +03:00
|
|
|
wrapper script.
|
2003-01-26 08:34:32 +03:00
|
|
|
This operation is automatically performed for any of the other
|
|
|
|
operations.
|
|
|
|
.
|
2008-08-18 09:27:05 +04:00
|
|
|
.It Sy cleandir
|
|
|
|
Perform
|
|
|
|
.Dq make cleandir .
|
|
|
|
.
|
2003-01-23 19:24:08 +03:00
|
|
|
.It Sy obj
|
|
|
|
Perform
|
|
|
|
.Dq make obj .
|
2003-01-26 09:19:12 +03:00
|
|
|
.
|
2003-01-23 19:24:08 +03:00
|
|
|
.It Sy tools
|
|
|
|
Build and install the host tools from
|
|
|
|
.Pa src/tools .
|
2008-03-28 08:23:44 +03:00
|
|
|
This command will first run
|
|
|
|
.Dq make obj
|
|
|
|
and
|
|
|
|
.Dq make cleandir
|
2012-09-20 03:08:37 +04:00
|
|
|
in the
|
2008-03-28 08:23:44 +03:00
|
|
|
.Pa tools
|
|
|
|
subdirectory unless the
|
|
|
|
.Fl o
|
|
|
|
or
|
|
|
|
.Fl u
|
|
|
|
options (respectively) are given.
|
2003-05-25 16:34:27 +04:00
|
|
|
.
|
|
|
|
.It Sy install Ns = Ns Ar idir
|
|
|
|
Install the contents of
|
|
|
|
.Sy DESTDIR
|
|
|
|
to
|
|
|
|
.Ar idir ,
|
|
|
|
using
|
|
|
|
.Dq make installworld .
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
Files that are part of the
|
2007-03-26 21:35:06 +04:00
|
|
|
.Dq etc
|
|
|
|
or
|
|
|
|
.Dq xetc
|
2011-09-09 18:01:28 +04:00
|
|
|
sets will not be installed, unless overridden by
|
|
|
|
the INSTALLSETS environment variable.
|
2003-05-25 16:34:27 +04:00
|
|
|
.
|
2003-01-23 19:24:08 +03:00
|
|
|
.It Sy kernel Ns = Ns Ar kconf
|
|
|
|
Build a new kernel.
|
|
|
|
The
|
|
|
|
.Ar kconf
|
|
|
|
argument is the name of a configuration file suitable
|
|
|
|
for use by
|
2005-06-20 17:25:23 +04:00
|
|
|
.Xr config 1 .
|
2003-01-23 19:24:08 +03:00
|
|
|
If
|
|
|
|
.Ar kconf
|
|
|
|
does not contain any
|
|
|
|
.Sq /
|
|
|
|
characters, the configuration file is expected to be found in the
|
|
|
|
.Sy KERNCONFDIR
|
|
|
|
directory, which is typically
|
2014-05-21 17:11:25 +04:00
|
|
|
.Pa sys/arch/MACHINE/conf .
|
2003-01-23 19:24:08 +03:00
|
|
|
The new kernel will be built in a subdirectory of
|
|
|
|
.Sy KERNOBJDIR ,
|
|
|
|
which is typically
|
2023-06-11 23:34:14 +03:00
|
|
|
.Pa sys/arch/ Ns Sy MACHINE Ns Pa /compile
|
2003-01-23 19:24:08 +03:00
|
|
|
or an associated object directory.
|
2008-03-28 08:23:44 +03:00
|
|
|
.Pp
|
|
|
|
This command does
|
|
|
|
.Em not
|
|
|
|
imply the
|
|
|
|
.Sy tools
|
|
|
|
command; run the
|
2003-01-23 19:24:08 +03:00
|
|
|
.Sy tools
|
2008-03-28 08:23:44 +03:00
|
|
|
command first unless it is
|
|
|
|
.Em certain
|
|
|
|
that the tools already exist and are up to date.
|
|
|
|
.Pp
|
|
|
|
This command will run
|
|
|
|
.Dq make cleandir
|
|
|
|
on the kernel in question first unless the
|
|
|
|
.Fl u
|
|
|
|
option is given.
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2014-05-19 14:12:19 +04:00
|
|
|
.It Sy kernel.gdb Ns = Ns Ar kconf
|
|
|
|
Build a new kernel with debug information.
|
|
|
|
Similar to the above
|
|
|
|
.Sy kernel Ns = Ns Ar kconf
|
|
|
|
operation, but creates a
|
|
|
|
.Pa netbsd.gdb
|
|
|
|
file alongside of the kernel
|
|
|
|
.Pa netbsd ,
|
|
|
|
which contains a full symbol table and can be used for debugging
|
2014-05-21 17:11:25 +04:00
|
|
|
(for example with a cross-gdb built by
|
2014-05-19 14:12:19 +04:00
|
|
|
.Sy MKCROSSGDB ) .
|
2014-11-06 09:41:23 +03:00
|
|
|
.It Sy kernels
|
|
|
|
This command will build all kernels defined in port specific release build
|
|
|
|
procedure.
|
|
|
|
.Pp
|
|
|
|
This command internally calls the
|
|
|
|
.Sy kernel Ns = Ns Ar kconf
|
|
|
|
operation for each found kernel configuration file.
|
2009-09-27 20:44:40 +04:00
|
|
|
.It Sy modules
|
|
|
|
This command will build kernel modules and install them into
|
|
|
|
.Sy DESTDIR .
|
|
|
|
.
|
2003-05-25 16:34:27 +04:00
|
|
|
.It Sy releasekernel Ns = Ns Ar kconf
|
|
|
|
Install a
|
|
|
|
.Xr gzip 1 Ns ed
|
2008-03-28 08:23:44 +03:00
|
|
|
copy of the kernel previously built by
|
2003-05-25 16:34:27 +04:00
|
|
|
.Sy kernel Ns = Ns Ar kconf
|
|
|
|
into
|
2023-06-11 23:34:14 +03:00
|
|
|
.Sy RELEASEDIR Ns Pa / Ns Sy RELEASEMACHINEDIR Ns Pa /binary/kernel ,
|
2003-05-25 16:34:27 +04:00
|
|
|
usually as
|
|
|
|
.Pa netbsd- Ns Ar kconf Ns Pa .gz ,
|
|
|
|
although the
|
|
|
|
.Dq Pa netbsd
|
|
|
|
prefix is determined from the
|
|
|
|
.Dq Sy config
|
|
|
|
directives in
|
|
|
|
.Ar kconf .
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2003-01-26 09:19:12 +03:00
|
|
|
.It Sy sets
|
|
|
|
Perform
|
|
|
|
.Dq make sets .
|
2003-05-10 11:12:37 +04:00
|
|
|
.
|
|
|
|
.It Sy sourcesets
|
|
|
|
Perform
|
|
|
|
.Dq make sourcesets .
|
|
|
|
.
|
2006-01-04 18:35:20 +03:00
|
|
|
.It Sy syspkgs
|
|
|
|
Perform
|
|
|
|
.Dq make syspkgs .
|
|
|
|
.
|
2006-01-29 00:34:07 +03:00
|
|
|
.It Sy iso-image
|
|
|
|
Perform
|
|
|
|
.Dq make iso-image .
|
|
|
|
.
|
2007-09-01 12:15:27 +04:00
|
|
|
.It Sy iso-image-source
|
|
|
|
Perform
|
|
|
|
.Dq make iso-image-source .
|
|
|
|
.
|
Document build.sh "live-image" and "install-image" targets.
These were documented in revision 1.97 of src/BUILDING, but were
not documented in src/doc/BUILDING.sh. The original log message
was:
revision 1.97
date: 2012/01/22 03:53:32; author: tsutsui; state: Exp; lines: +39 -0
Add "live-image" and "install-image" target support to build.sh.
"live-image" target builds pre-installed disk images that can be used on
emulators or boot from USB memory sticks to try NetBSD without installation.
Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
(which have working emulators and don't require extra tools like preparing
msdosfs or partitioning MD label structures) support this target.
"install-image" target builds an bootable installation disk image that can
be used as an install CD but burned into USB memory sticks etc.
Current only amd64 and i386 (which would support USB boot) have this target.
For more details (and known issue) see following posts on netbsd-bugs@:
http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html
No particular comments about implementation, and
"go ahead" comments from mrg@, riz@ and christos@.
Closes PR toolchain/45153 and PR misc/45155.
2012-02-15 01:19:19 +04:00
|
|
|
.It Sy install-image
|
|
|
|
Perform
|
|
|
|
.Dq make install-image .
|
|
|
|
.
|
|
|
|
.It Sy live-image
|
|
|
|
Perform
|
|
|
|
.Dq make live-image .
|
|
|
|
.
|
2014-08-08 01:32:11 +04:00
|
|
|
.It Sy list-arch
|
2023-05-17 00:39:26 +03:00
|
|
|
Show a list of valid
|
2014-08-08 01:32:11 +04:00
|
|
|
.Sy MACHINE
|
|
|
|
and
|
|
|
|
.Sy MACHINE_ARCH
|
|
|
|
settings, the default
|
|
|
|
.Sy MACHINE_ARCH
|
|
|
|
for each
|
|
|
|
.Sy MACHINE ,
|
|
|
|
and aliases for
|
|
|
|
.Sy MACHINE Ns No / Ns Sy MACHINE_ARCH
|
|
|
|
pairs, and then exits.
|
|
|
|
The
|
|
|
|
.Fl m
|
|
|
|
or
|
|
|
|
.Fl a
|
|
|
|
options (or both) may be used to specify glob patterns
|
|
|
|
that will be used to narrow the list of results;
|
|
|
|
for example,
|
2018-02-16 13:05:01 +03:00
|
|
|
.Dq Li build.sh -m 'evb*' -a '*arm*' list-arch
|
2014-08-08 01:32:11 +04:00
|
|
|
will list all known
|
|
|
|
.Sy MACHINE Ns No / Ns Sy MACHINE_ARCH
|
|
|
|
values in which either
|
|
|
|
.Sy MACHINE
|
|
|
|
or
|
|
|
|
.Sy ALIAS
|
|
|
|
matches the pattern
|
|
|
|
.Ql evb* ,
|
|
|
|
and
|
|
|
|
.Sy MACHINE_ARCH
|
|
|
|
matches the pattern
|
|
|
|
.Ql *arm* .
|
|
|
|
.
|
2003-01-23 19:24:08 +03:00
|
|
|
.El
|
|
|
|
.
|
|
|
|
.Pp
|
|
|
|
The following command line options alter the behaviour of the
|
|
|
|
.Sy build.sh
|
|
|
|
operations described above:
|
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.Bl -tag -width "-T tools"
|
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl a Ar arch
|
2001-10-29 22:46:47 +03:00
|
|
|
Set the value of
|
|
|
|
.Sy MACHINE_ARCH
|
|
|
|
to
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar arch .
|
2014-08-08 01:32:11 +04:00
|
|
|
See the
|
|
|
|
.Fl m
|
|
|
|
option for more information.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl B Ar buildid
|
2002-03-14 21:33:04 +03:00
|
|
|
Set the value of
|
|
|
|
.Sy BUILDID
|
|
|
|
to
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar buildid .
|
2007-11-23 19:19:28 +03:00
|
|
|
This will also append the build identifier to the name of the
|
2023-07-22 01:07:59 +03:00
|
|
|
.Sy \*[toolprefix]make- Ns Sy MACHINE
|
2002-03-14 21:33:04 +03:00
|
|
|
wrapper script so that the resulting name is of the form
|
2023-06-11 23:34:14 +03:00
|
|
|
.Dq Sy \*[toolprefix]make- Ns Sy MACHINE Ns Sy -BUILDID .
|
2002-03-14 21:33:04 +03:00
|
|
|
.
|
2007-11-23 19:19:28 +03:00
|
|
|
.It Fl C Ar cdextras
|
2009-09-27 21:28:38 +04:00
|
|
|
Append
|
2012-09-20 03:08:37 +04:00
|
|
|
.Ar cdextras
|
2009-09-27 21:28:38 +04:00
|
|
|
to the
|
|
|
|
.Sy CDEXTRA
|
|
|
|
variable,
|
|
|
|
which is a space-separated list of files or directories that will be
|
|
|
|
added to the CD-ROM image that may be create by the
|
2007-09-01 13:32:19 +04:00
|
|
|
.Dq iso-image
|
|
|
|
or
|
2009-09-27 21:28:38 +04:00
|
|
|
.Dq iso-image-source
|
|
|
|
operations.
|
2007-11-23 19:19:28 +03:00
|
|
|
Files will be added to the root of the CD-ROM image, whereas directories
|
|
|
|
will be copied recursively.
|
|
|
|
If relative paths are specified, they will be converted to
|
|
|
|
absolute paths before being used.
|
2009-09-27 21:28:38 +04:00
|
|
|
Multiple paths may be specified via multiple
|
|
|
|
.Fl C
|
|
|
|
options, or via a single option whose argument contains multiple
|
|
|
|
space-separated paths.
|
2007-09-01 13:32:19 +04:00
|
|
|
.
|
2020-07-01 00:22:19 +03:00
|
|
|
.It Fl c Ar compiler
|
|
|
|
Select the compiler for the toolchain to build
|
|
|
|
.Nx
|
|
|
|
and for inclusion in the
|
|
|
|
.Nx
|
|
|
|
distribution.
|
|
|
|
Supported choices:
|
|
|
|
.Bl -inset -offset indent
|
|
|
|
.It clang
|
|
|
|
.It gcc
|
|
|
|
[default]
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The compiler used to build the toolchain can be different; see
|
|
|
|
.Sy HOST_CC
|
|
|
|
and
|
|
|
|
.Sy HOST_CXX .
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl D Ar dest
|
|
|
|
Set the value of
|
|
|
|
.Sy DESTDIR
|
|
|
|
to
|
|
|
|
.Ar dest .
|
2006-10-08 21:54:30 +04:00
|
|
|
If a relative path is specified, it will be converted to an
|
|
|
|
absolute path before being used.
|
2002-12-08 11:42:51 +03:00
|
|
|
.
|
2002-12-09 01:14:00 +03:00
|
|
|
.It Fl E
|
|
|
|
Set
|
|
|
|
.Sq expert
|
2003-01-26 08:34:32 +03:00
|
|
|
mode.
|
|
|
|
This overrides various sanity checks, and allows:
|
2002-12-09 01:14:00 +03:00
|
|
|
.Sy DESTDIR
|
2003-01-26 08:34:32 +03:00
|
|
|
does not have to be set to a non-root path for builds,
|
|
|
|
and
|
2003-07-18 12:38:10 +04:00
|
|
|
.Sy MKUNPRIVED=yes
|
2003-01-26 08:34:32 +03:00
|
|
|
does not have to be set when building as a non-root user.
|
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
It is highly recommended that you know what you are doing when
|
|
|
|
you use this option.
|
2002-12-09 01:14:00 +03:00
|
|
|
.
|
2004-06-25 19:04:02 +04:00
|
|
|
.It Fl h
|
2023-05-17 00:39:26 +03:00
|
|
|
Show a help message, and exit.
|
2004-06-25 19:04:02 +04:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl j Ar njob
|
2008-03-28 08:23:44 +03:00
|
|
|
Run up to
|
|
|
|
.Ar njob
|
2012-09-20 03:08:37 +04:00
|
|
|
.Xr make 1
|
2008-03-28 08:23:44 +03:00
|
|
|
subjobs in parallel;
|
2012-09-20 03:08:37 +04:00
|
|
|
passed through to
|
2002-05-03 02:13:30 +04:00
|
|
|
.Xr make 1 .
|
2008-08-11 12:22:39 +04:00
|
|
|
If you see failures for reasons other than running out of memory
|
|
|
|
while using
|
|
|
|
.Sy build.sh
|
|
|
|
with
|
|
|
|
.Fl j ,
|
2012-09-20 03:08:37 +04:00
|
|
|
please save complete build logs
|
2002-05-03 02:13:30 +04:00
|
|
|
so the failures can be analyzed.
|
2008-08-11 12:22:39 +04:00
|
|
|
.Pp
|
|
|
|
To achieve the fastest builds,
|
|
|
|
.Fl j
|
|
|
|
values between (1 + the number of CPUs) and (2 * the number of CPUs)
|
|
|
|
are recommended.
|
|
|
|
Use lower values on machines with limited memory or I/O bandwidth.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl M Ar obj
|
|
|
|
Set
|
|
|
|
.Sy MAKEOBJDIRPREFIX
|
|
|
|
to
|
|
|
|
.Ar obj .
|
2009-09-27 22:08:24 +04:00
|
|
|
Unsets
|
|
|
|
.Sy MAKEOBJDIR .
|
|
|
|
See
|
2013-12-25 00:10:29 +04:00
|
|
|
.Dq Fl O Ar obj
|
2009-09-27 22:08:24 +04:00
|
|
|
for more information.
|
|
|
|
.Pp
|
2008-08-06 02:40:33 +04:00
|
|
|
For instance, if the source directory is
|
|
|
|
.Pa /usr/src ,
|
|
|
|
a setting of
|
|
|
|
.Dq Fl M Pa /usr/obj
|
|
|
|
will place build-time files under
|
|
|
|
.Pa /usr/obj/usr/src/bin ,
|
|
|
|
.Pa /usr/obj/usr/src/lib ,
|
|
|
|
.Pa /usr/obj/usr/src/usr.bin ,
|
|
|
|
and so forth.
|
2009-09-27 22:08:24 +04:00
|
|
|
.Pp
|
2006-10-08 21:54:30 +04:00
|
|
|
If a relative path is specified, it will be converted to an
|
|
|
|
absolute path before being used.
|
2009-09-27 22:08:24 +04:00
|
|
|
.Sy build.sh
|
|
|
|
imposes the restriction that the argument to the
|
|
|
|
.Fl M
|
|
|
|
option must not begin with a
|
|
|
|
.Dq \&$
|
|
|
|
(dollar sign)
|
|
|
|
character; otherwise it would be too difficult
|
|
|
|
to determine whether the value is an absolute or a relative path.
|
|
|
|
If the directory does not already exist,
|
|
|
|
.Sy build.sh
|
|
|
|
will create it.
|
2002-12-08 11:42:51 +03:00
|
|
|
.
|
|
|
|
.It Fl m Ar mach
|
2001-10-29 22:46:47 +03:00
|
|
|
Set the value of
|
|
|
|
.Sy MACHINE
|
|
|
|
to
|
2007-01-27 14:47:36 +03:00
|
|
|
.Ar mach ,
|
2014-08-08 01:32:11 +04:00
|
|
|
unless the
|
|
|
|
.Ar mach
|
|
|
|
argument is an alias that refers to a
|
|
|
|
.Sy MACHINE Ns No / Ns Sy MACHINE_ARCH
|
|
|
|
pair, in which case both
|
|
|
|
.Sy MACHINE
|
|
|
|
and
|
2001-10-29 22:46:47 +03:00
|
|
|
.Sy MACHINE_ARCH
|
2014-08-08 01:32:11 +04:00
|
|
|
are set from the alias.
|
|
|
|
Such aliases are interpreted entirely by
|
|
|
|
.Sy build.sh ;
|
|
|
|
they are not used by any other part of the build system.
|
|
|
|
The
|
|
|
|
.Sy MACHINE_ARCH
|
|
|
|
setting implied by
|
|
|
|
.Ar mach
|
|
|
|
will override any value of
|
|
|
|
.Sy MACHINE_ARCH
|
|
|
|
in the process environment, but will not override a value set by the
|
2002-12-08 11:42:51 +03:00
|
|
|
.Fl a
|
2014-08-08 01:32:11 +04:00
|
|
|
option.
|
2002-12-18 22:46:48 +03:00
|
|
|
All cross builds require
|
2002-12-08 11:42:51 +03:00
|
|
|
.Fl m ,
|
2001-11-01 02:20:34 +03:00
|
|
|
but if unset on a NetBSD host, the host's value of MACHINE will be
|
|
|
|
detected and used automatically.
|
2003-05-17 12:10:39 +04:00
|
|
|
.Pp
|
2014-08-08 01:32:11 +04:00
|
|
|
See the
|
|
|
|
.Cm list-arch
|
|
|
|
operation for a way to get a list of valid
|
2017-10-22 00:16:07 +03:00
|
|
|
.Sy MACHINE
|
2003-05-17 12:10:39 +04:00
|
|
|
and
|
2014-08-08 01:32:11 +04:00
|
|
|
.Sy MACHINE_ARCH
|
|
|
|
settings.
|
2001-11-01 02:20:34 +03:00
|
|
|
.
|
2003-10-25 07:46:09 +04:00
|
|
|
.It Fl N Ar noiselevel
|
|
|
|
Set the
|
2024-04-26 20:38:44 +03:00
|
|
|
.Dq noisiness
|
2003-10-26 05:17:46 +03:00
|
|
|
level of the build, by setting
|
|
|
|
.Sy MAKEVERBOSE
|
|
|
|
to
|
|
|
|
.Ar noiselevel .
|
2003-10-25 07:46:09 +04:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl n
|
2001-11-01 02:20:34 +03:00
|
|
|
Show the commands that would be executed by
|
|
|
|
.Sy build.sh ,
|
2002-12-18 22:46:48 +03:00
|
|
|
but do not make any changes.
|
|
|
|
This is similar in concept to
|
2001-11-01 02:20:34 +03:00
|
|
|
.Dq make -n .
|
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl O Ar obj
|
2001-11-01 02:20:34 +03:00
|
|
|
Create an appropriate transform macro for
|
|
|
|
.Sy MAKEOBJDIR
|
|
|
|
that will place the built object files under
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar obj .
|
2009-09-27 22:08:24 +04:00
|
|
|
Unsets
|
|
|
|
.Sy MAKEOBJDIRPREFIX .
|
|
|
|
.Pp
|
2001-11-01 02:20:34 +03:00
|
|
|
For instance, a setting of
|
2008-08-06 02:40:33 +04:00
|
|
|
.Dq Fl O Pa /usr/obj
|
2002-07-22 13:49:05 +04:00
|
|
|
will place build-time files under
|
2008-08-06 02:40:33 +04:00
|
|
|
.Pa /usr/obj/bin ,
|
|
|
|
.Pa /usr/obj/lib ,
|
|
|
|
.Pa /usr/obj/usr.bin ,
|
2001-11-01 02:20:34 +03:00
|
|
|
and so forth.
|
2009-09-27 22:08:24 +04:00
|
|
|
.Pp
|
2008-08-06 02:40:33 +04:00
|
|
|
If a relative path is specified, it will be converted to an
|
|
|
|
absolute path before being used.
|
2009-09-27 22:08:24 +04:00
|
|
|
.Sy build.sh
|
|
|
|
imposes the restriction that the argument to the
|
|
|
|
.Fl O
|
|
|
|
option must not contain a
|
|
|
|
.Dq \&$
|
|
|
|
(dollar sign)
|
|
|
|
character.
|
|
|
|
If the directory does not already exist,
|
|
|
|
.Sy build.sh
|
|
|
|
will create it.
|
2008-08-06 02:40:33 +04:00
|
|
|
.Pp
|
|
|
|
In normal use, exactly one of the
|
|
|
|
.Fl M
|
|
|
|
or
|
|
|
|
.Fl O
|
|
|
|
options should be specified.
|
2008-09-24 11:36:52 +04:00
|
|
|
If neither
|
2008-08-06 02:40:33 +04:00
|
|
|
.Fl M
|
|
|
|
nor
|
|
|
|
.Fl O
|
|
|
|
is specified, then a default object directory will be chosen
|
|
|
|
according to rules in
|
2008-09-24 11:36:52 +04:00
|
|
|
.Aq bsd.obj.mk .
|
|
|
|
Relying on this default is not recommended because
|
|
|
|
it is determined by complex rules that are influenced
|
|
|
|
by the values of several variables and
|
|
|
|
by the location of the source directory.
|
2014-08-08 01:45:27 +04:00
|
|
|
.Pp
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Em Note :
|
|
|
|
Placing the
|
2014-08-08 01:45:27 +04:00
|
|
|
.Ar obj
|
|
|
|
directory location outside of the default source tree hierarchy makes
|
|
|
|
it easier to manually clear out old files in the event the
|
|
|
|
.Dq make cleandir
|
|
|
|
operation is unable to do so.
|
|
|
|
(See
|
|
|
|
.Sx CAVEATS
|
|
|
|
below.)
|
|
|
|
.Pp
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Em Note :
|
|
|
|
The use of one of
|
2014-08-08 01:45:27 +04:00
|
|
|
.Fl M
|
|
|
|
or
|
|
|
|
.Fl O
|
|
|
|
is the only means of building multiple machine architecture userlands
|
|
|
|
from the same source tree without cleaning between builds (in which
|
|
|
|
case, one would specify distinct
|
|
|
|
.Ar obj
|
|
|
|
locations for each).
|
2023-05-17 00:39:26 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl o
|
|
|
|
Set the value of
|
|
|
|
.Sy MKOBJDIRS
|
|
|
|
to
|
|
|
|
.Dq no .
|
2003-05-18 15:18:02 +04:00
|
|
|
Otherwise, it will be automatically set to
|
2008-03-28 08:23:44 +03:00
|
|
|
.Dq yes .
|
|
|
|
This default is opposite to the behaviour when not using
|
|
|
|
.Sy build.sh .
|
2002-12-08 11:42:51 +03:00
|
|
|
.
|
2023-05-17 00:39:26 +03:00
|
|
|
.It Fl P
|
2023-06-02 23:48:41 +03:00
|
|
|
Set the value of
|
2023-05-17 00:39:26 +03:00
|
|
|
.Sy MKREPRO
|
|
|
|
and
|
|
|
|
.Sy MKREPRO_TIMESTAMP
|
|
|
|
to the latest source CVS timestamp for reproducible builds.
|
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl R Ar rel
|
2001-10-29 22:46:47 +03:00
|
|
|
Set the value of
|
|
|
|
.Sy RELEASEDIR
|
|
|
|
to
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar rel .
|
2006-10-08 21:54:30 +04:00
|
|
|
If a relative path is specified, it will be converted to an
|
|
|
|
absolute path before being used.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl r
|
|
|
|
Remove the contents of
|
|
|
|
.Sy DESTDIR
|
|
|
|
and
|
|
|
|
.Sy TOOLDIR
|
2002-12-18 22:46:48 +03:00
|
|
|
before building (provides a clean starting point).
|
|
|
|
This will skip deleting
|
2002-12-08 11:42:51 +03:00
|
|
|
.Sy DESTDIR
|
|
|
|
if building on a native system to the root directory.
|
|
|
|
.
|
2008-08-05 23:43:33 +04:00
|
|
|
.It Fl S Ar seed
|
|
|
|
Change the value of
|
|
|
|
.Sy BUILDSEED
|
|
|
|
to
|
|
|
|
.Ar seed .
|
|
|
|
This should rarely be necessary.
|
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl T Ar tools
|
2001-10-29 22:46:47 +03:00
|
|
|
Set the value of
|
|
|
|
.Sy TOOLDIR
|
|
|
|
to
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar tools .
|
2006-10-08 21:54:30 +04:00
|
|
|
If a relative path is specified, it will be converted to an
|
|
|
|
absolute path before being used.
|
2001-11-01 02:20:34 +03:00
|
|
|
If set, the bootstrap
|
|
|
|
.Dq make
|
2008-03-28 08:23:44 +03:00
|
|
|
will only be rebuilt if the source files for
|
2001-11-01 02:20:34 +03:00
|
|
|
.Xr make 1
|
2008-03-28 08:23:44 +03:00
|
|
|
have changed.
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl U
|
2003-07-18 12:38:10 +04:00
|
|
|
Set
|
|
|
|
.Sy MKUNPRIVED=yes .
|
2002-03-04 05:10:02 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl u
|
2003-07-18 12:38:10 +04:00
|
|
|
Set
|
|
|
|
.Sy MKUPDATE=yes .
|
2002-12-08 11:42:51 +03:00
|
|
|
.
|
2003-01-04 15:55:32 +03:00
|
|
|
.It Xo
|
|
|
|
.Fl V
|
|
|
|
.Sm off
|
|
|
|
.Ar var
|
|
|
|
.Li =
|
|
|
|
.Op Ar value
|
|
|
|
.Sm on
|
|
|
|
.Xc
|
2003-07-29 14:07:15 +04:00
|
|
|
Set the environment variable
|
2003-01-04 15:55:32 +03:00
|
|
|
.Ar var
|
2003-07-29 14:07:15 +04:00
|
|
|
to an optional
|
|
|
|
.Ar value .
|
2012-09-20 03:08:37 +04:00
|
|
|
This is propagated to the
|
2023-07-22 01:07:59 +03:00
|
|
|
.Sy \*[toolprefix]make- Ns Sy MACHINE
|
|
|
|
wrapper script.
|
2003-01-04 15:55:32 +03:00
|
|
|
.
|
2002-12-08 11:42:51 +03:00
|
|
|
.It Fl w Ar wrapper
|
2003-07-29 14:07:15 +04:00
|
|
|
Create the
|
2023-07-22 01:07:59 +03:00
|
|
|
.Sy \*[toolprefix]make- Ns Sy MACHINE
|
2003-07-29 14:07:15 +04:00
|
|
|
wrapper script (see below) in a custom location,
|
2002-12-08 11:42:51 +03:00
|
|
|
specified by
|
|
|
|
.Ar wrapper .
|
2023-07-22 01:07:59 +03:00
|
|
|
This allows, for instance, to place the wrapper script in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Ev PATH
|
2002-12-18 22:46:48 +03:00
|
|
|
automatically.
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
2002-12-08 11:42:51 +03:00
|
|
|
.Ar wrapper
|
|
|
|
is the full name of the file, not just a directory name.
|
2006-10-08 21:54:30 +04:00
|
|
|
If a relative path is specified, it will be converted to an
|
|
|
|
absolute path before being used.
|
2002-12-08 11:42:51 +03:00
|
|
|
.
|
2004-02-07 02:22:44 +03:00
|
|
|
.It Fl X Ar x11src
|
|
|
|
Set the value of
|
|
|
|
.Sy X11SRCDIR
|
|
|
|
to
|
|
|
|
.Ar x11src .
|
2006-10-08 21:54:30 +04:00
|
|
|
If a relative path is specified, it will be converted to an
|
|
|
|
absolute path before being used.
|
2004-02-07 02:22:44 +03:00
|
|
|
.
|
|
|
|
.It Fl x
|
|
|
|
Set
|
|
|
|
.Sy MKX11=yes .
|
|
|
|
.
|
2003-07-29 14:07:15 +04:00
|
|
|
.It Fl Z Ar var
|
|
|
|
Unset ("zap") the environment variable
|
|
|
|
.Ar var .
|
2012-09-20 03:08:37 +04:00
|
|
|
This is propagated to the
|
2023-07-22 01:07:59 +03:00
|
|
|
.Sy \*[toolprefix]make- Ns Sy MACHINE
|
|
|
|
wrapper script.
|
2003-07-29 14:07:15 +04:00
|
|
|
.
|
2023-05-17 00:39:26 +03:00
|
|
|
.It Fl ?
|
|
|
|
Show a help message, and exit.
|
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.El
|
|
|
|
.
|
2023-07-22 21:50:04 +03:00
|
|
|
.Ss The \*[toolprefix]make-MACHINE wrapper script
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
If using the
|
|
|
|
.Sy build.sh
|
|
|
|
script to build
|
|
|
|
.Nx ,
|
|
|
|
a
|
2003-01-30 01:50:08 +03:00
|
|
|
.Sy \*[toolprefix]make-MACHINE
|
2023-07-22 01:07:59 +03:00
|
|
|
wrapper script will be created in
|
2014-05-21 17:11:25 +04:00
|
|
|
.Sy TOOLDIR Ns Pa /bin
|
2001-10-30 19:22:40 +03:00
|
|
|
upon the first build to assist in building subtrees on a cross-compile
|
2001-10-29 22:46:47 +03:00
|
|
|
host.
|
|
|
|
.Pp
|
2023-07-22 01:07:59 +03:00
|
|
|
The
|
2003-01-30 01:50:08 +03:00
|
|
|
.Sy \*[toolprefix]make-MACHINE
|
2023-07-22 01:07:59 +03:00
|
|
|
wrapper script can be invoked in lieu of
|
2001-10-29 22:46:47 +03:00
|
|
|
.Xr make 1 ,
|
|
|
|
and will instead call the up-to-date version of
|
2003-01-30 01:50:08 +03:00
|
|
|
.Dq \*[toolprefix]make
|
2001-10-29 22:46:47 +03:00
|
|
|
installed into
|
2014-05-21 17:11:25 +04:00
|
|
|
.Sy TOOLDIR Ns Pa /bin
|
2001-10-29 22:46:47 +03:00
|
|
|
with several key variables pre-set, including
|
|
|
|
.Sy MACHINE , MACHINE_ARCH ,
|
|
|
|
and
|
|
|
|
.Sy TOOLDIR .
|
2008-03-28 08:23:44 +03:00
|
|
|
.Sy \*[toolprefix]make-MACHINE
|
2003-07-29 14:07:15 +04:00
|
|
|
will also set variables specified with
|
|
|
|
.Fl V ,
|
|
|
|
and unset variables specified with
|
|
|
|
.Fl Z .
|
2023-07-22 01:07:59 +03:00
|
|
|
Note that by default these variables will not override
|
|
|
|
.Xr mk.conf 5 ;
|
|
|
|
see
|
2023-07-22 21:50:04 +03:00
|
|
|
.Sx make variables
|
2023-07-22 01:07:59 +03:00
|
|
|
for more details.
|
2003-07-29 14:07:15 +04:00
|
|
|
.Pp
|
2023-07-22 01:07:59 +03:00
|
|
|
This wrapper script can be symlinked into a directory listed in
|
2023-06-11 23:34:14 +03:00
|
|
|
.Ev PATH ,
|
2001-10-29 22:46:47 +03:00
|
|
|
or called with an absolute path.
|
|
|
|
.
|
2002-10-20 19:48:01 +04:00
|
|
|
.Sh EXAMPLES
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2003-02-02 15:37:41 +03:00
|
|
|
.Bl -enum
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2003-02-02 15:37:41 +03:00
|
|
|
.It
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Li "% ./build.sh [OPTIONS] tools kernel=GENERIC"
|
2003-02-02 15:37:41 +03:00
|
|
|
.Pp
|
2002-10-20 19:48:01 +04:00
|
|
|
Build a new toolchain, and use the new toolchain to
|
|
|
|
configure and build a new GENERIC kernel.
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2003-02-02 15:37:41 +03:00
|
|
|
.It
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Li "% ./build.sh [OPTIONS] -U distribution"
|
2003-02-02 15:37:41 +03:00
|
|
|
.Pp
|
2002-10-20 19:48:01 +04:00
|
|
|
Using unprivileged mode,
|
2003-05-08 18:42:05 +04:00
|
|
|
build a complete distribution to a
|
|
|
|
.Sy DESTDIR
|
|
|
|
directory that
|
|
|
|
.Sy build.sh
|
2023-05-17 00:39:26 +03:00
|
|
|
selects (and will show).
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2003-02-02 15:37:41 +03:00
|
|
|
.It
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Li "# ./build.sh [OPTIONS] -U install=/"
|
2003-02-02 15:37:41 +03:00
|
|
|
.Pp
|
2003-02-08 13:00:33 +03:00
|
|
|
As root, install to
|
|
|
|
.Pa /
|
|
|
|
the distribution that was built
|
|
|
|
by example 2.
|
2003-02-02 15:37:41 +03:00
|
|
|
Even though this is run as root,
|
2003-01-23 19:24:08 +03:00
|
|
|
.Fl U
|
|
|
|
is required so that the permissions stored in
|
2003-05-08 18:42:05 +04:00
|
|
|
.Sy DESTDIR Ns Pa /METALOG
|
2003-01-23 19:24:08 +03:00
|
|
|
are correctly applied to the files as they're copied to
|
2003-02-02 15:37:41 +03:00
|
|
|
.Pa / .
|
2003-01-23 19:24:08 +03:00
|
|
|
.
|
2003-02-02 15:37:41 +03:00
|
|
|
.It
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Li "% ./build.sh [OPTIONS] -U -u release"
|
2003-02-02 15:37:41 +03:00
|
|
|
.Pp
|
2002-10-20 19:48:01 +04:00
|
|
|
Using unprivileged mode,
|
2003-05-08 18:42:05 +04:00
|
|
|
build a complete release to
|
|
|
|
.Sy DESTDIR
|
|
|
|
and
|
|
|
|
.Sy RELEASEDIR
|
|
|
|
directories that
|
|
|
|
.Sy build.sh
|
2023-05-17 00:39:26 +03:00
|
|
|
selects (and will show).
|
2003-07-18 12:38:10 +04:00
|
|
|
.Sy MKUPDATE=yes
|
2003-02-02 15:37:41 +03:00
|
|
|
.Pq Fl u
|
|
|
|
is set to prevent the
|
|
|
|
.Dq make cleandir ,
|
|
|
|
so that if this is run after example 2, it doesn't need to redo that
|
|
|
|
portion of the release build.
|
2002-10-20 19:48:01 +04:00
|
|
|
.El
|
|
|
|
.
|
2001-10-29 22:46:47 +03:00
|
|
|
.Sh SEE ALSO
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Xr config 1 ,
|
|
|
|
.Xr ctags 1 ,
|
|
|
|
.Xr ex 1 ,
|
|
|
|
.Xr gzip 1 ,
|
|
|
|
.Xr lint 1 ,
|
2001-10-29 22:46:47 +03:00
|
|
|
.Xr make 1 ,
|
2023-06-11 23:34:14 +03:00
|
|
|
.Xr mandoc 1 ,
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Xr mkisofs 1 ,
|
2023-06-11 23:34:14 +03:00
|
|
|
.Xr nroff 1 ,
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Xr vi 1 ,
|
2023-06-02 23:48:41 +03:00
|
|
|
.Xr mk.conf 5 ,
|
BUILDING: update from canonical mk.conf(5)
Incorporate content and styles updates for mk.conf entries
from share/man/man5/mk.conf.5, which is the canonical
reference for mk.conf.
Add: BSDOBJDIR, BSDSRCDIR, EXTERNAL_TOOLCHAIN, MKDEBUGKERNEL,
MKDEBUGTOOLS, MKHTML, MKLINKLIB, MKOBJDIRS, TOOLCHAIN_MISSING,
NETBSDSRCDIR
It's for further study as to whether we just replace the
most of subsection "make" variables with a link to mk.conf(5).
Style:
- Add more .de macros per mk.conf.5.
- Order list items alphabetically. When multiple items are present
in a list item, sort within the item first.
- More cross-references.
2023-06-04 23:08:21 +03:00
|
|
|
.Xr atf 7 ,
|
2001-10-29 22:46:47 +03:00
|
|
|
.Xr hier 7 ,
|
2023-06-11 23:34:14 +03:00
|
|
|
.Xr mdoc 7 ,
|
2006-01-29 00:34:07 +03:00
|
|
|
.Xr release 7 ,
|
2007-03-26 21:35:06 +04:00
|
|
|
.Xr etcupdate 8 ,
|
2023-05-17 00:21:38 +03:00
|
|
|
.Xr installboot 8 ,
|
2023-05-18 17:22:53 +03:00
|
|
|
.Xr mount 8 ,
|
2007-03-26 21:35:06 +04:00
|
|
|
.Xr postinstall 8 ,
|
2007-04-13 23:43:38 +04:00
|
|
|
.Xr sysinst 8 ,
|
2006-01-29 17:03:59 +03:00
|
|
|
.Pa pkgsrc/sysutils/cdrtools
|
2023-06-11 23:34:14 +03:00
|
|
|
.Pp
|
|
|
|
.Em Note :
|
|
|
|
The
|
|
|
|
.Nx
|
|
|
|
manual pages are also available at
|
|
|
|
.Lk https://man.netbsd.org
|
2001-10-29 22:46:47 +03:00
|
|
|
.
|
|
|
|
.Sh HISTORY
|
|
|
|
.
|
|
|
|
The
|
2023-07-18 19:59:57 +03:00
|
|
|
.Sy build.sh
|
2002-09-21 09:17:52 +04:00
|
|
|
based build scheme was introduced for
|
|
|
|
.Nx 1.6
|
|
|
|
as
|
|
|
|
.Sy USE_NEW_TOOLCHAIN ,
|
|
|
|
and re-worked to
|
|
|
|
.Sy TOOLCHAIN_MISSING
|
|
|
|
after that.
|
2014-08-08 01:45:27 +04:00
|
|
|
.
|
|
|
|
.Sh CAVEATS
|
|
|
|
.
|
|
|
|
After significant updates to third-party components in the source
|
|
|
|
tree, the
|
|
|
|
.Dq make cleandir
|
|
|
|
operation may be insufficient to clean out old files in object
|
|
|
|
directories.
|
|
|
|
Instead, one may have to manually remove the files.
|
|
|
|
Consult the
|
|
|
|
.Pa UPDATING
|
|
|
|
file for notices concerning this.
|