aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
-rw-r--r--Makefile.inc19
-rw-r--r--UPDATING5
-rw-r--r--share/man/man7/build.711
4 files changed, 32 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 78177850303c..22c3b2a46d61 100644
--- a/Makefile
+++ b/Makefile
@@ -39,9 +39,11 @@
# xdev-install - Install cross-development tools.
# xdev-links - Create traditional links in /usr/bin for cc, etc
# native-xtools - Create host binaries that produce target objects
-# for use in qemu user-mode jails. Override
-# target location with NXBDESTDIR. TARGET and
+# for use in qemu user-mode jails. TARGET and
# TARGET_ARCH should be defined.
+# native-xtools-install
+# - Install the files to the given DESTDIR/NXTP where
+# NXTP defaults to /nxb-bin.
#
# "quick" way to test all kernel builds:
# _jflag=`sysctl -n hw.ncpu`
@@ -132,13 +134,15 @@ TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
_build-tools _build-metadata _cross-tools _includes _libraries \
build32 distribute32 install32 buildsoft distributesoft installsoft \
builddtb xdev xdev-build xdev-install \
- xdev-links native-xtools stageworld stagekernel stage-packages \
+ xdev-links native-xtools native-xtools-install stageworld stagekernel \
+ stage-packages \
create-packages-world create-packages-kernel create-packages \
packages installconfig real-packages sign-packages package-pkg \
print-dir test-system-compiler
# These targets require a TARGET and TARGET_ARCH be defined.
-XTGTS= native-xtools xdev xdev-build xdev-install xdev-links
+XTGTS= native-xtools native-xtools-install xdev xdev-build xdev-install \
+ xdev-links
# XXX: r156740: This can't work since bsd.subdir.mk is not included ever.
# It will only work for SUBDIR_TARGETS in make.conf.
diff --git a/Makefile.inc1 b/Makefile.inc1
index 39be60e388a4..9b09d2121d58 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2098,7 +2098,11 @@ cross-tools: .MAKE .PHONY
# to pickup.
#
NXBOBJDIR= ${MAKEOBJDIRPREFIX}/nxb/${TARGET}.${TARGET_ARCH}
-NXBDESTDIR= ${NXBOBJDIR}${.CURDIR}/nxb-bin
+NXTP?= /nxb-bin
+.if ${NXTP:N/*}
+.error NXTP variable should be an absolute path
+.endif
+NXBDESTDIR?= ${DESTDIR}${NXTP}
# This is the list of tools to be built/installed as static and where
# appropriate to build for the given TARGET.TARGET_ARCH.
@@ -2227,6 +2231,9 @@ native-xtools: .PHONY
.endif
${_+_}cd ${.CURDIR}; ${NXBMAKE} SUBDIR_OVERRIDE="${NXBDIRS:M*}" \
everything
+ @echo ">> native-xtools done. Use 'make native-xtools-install' to install to a given DESTDIR"
+
+native-xtools-install: .PHONY
mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
-p ${NXBDESTDIR}/usr >/dev/null
diff --git a/UPDATING b/UPDATING
index 44c9be133945..bcd8b653e470 100644
--- a/UPDATING
+++ b/UPDATING
@@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW:
****************************** SPECIAL WARNING: ******************************
+20171028:
+ The native-xtools target no longer installs the files by default to the
+ OBJDIR. Use the native-xtools-install target with a DESTDIR to install
+ to ${DESTDIR}/${NXTP} where NXTP defaults to /nxb-bin.
+
20171021:
As part of the boot loader infrastructure cleanup, LOADER_*_SUPPORT
options are changing from controlling the build if defined / undefined
diff --git a/share/man/man7/build.7 b/share/man/man7/build.7
index b23a8f861d07..e9b22cd46abd 100644
--- a/share/man/man7/build.7
+++ b/share/man/man7/build.7
@@ -234,6 +234,17 @@ performance by avoiding emulating binaries that do not need to be emulated.
and
.Sy TARGET_ARCH
should be defined.
+.It Cm native-xtools-install
+Installs the results to
+.Pa ${DESTDIR}/${NXTP}
+where
+.Va NXTP
+defaults to
+.Pa nxb-bin .
+.Sy TARGET
+and
+.Sy TARGET_ARCH
+must be defined.
.It Cm packageworld
Archive the results of
.Cm distributeworld ,