Page MenuHomeFreeBSD

D24212.id70058.diff
No OneTemporary

D24212.id70058.diff

Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -5,10 +5,12 @@
#
# universe - *Really* build *everything* (buildworld and
# all kernels on all architectures). Define
-# MAKE_JUST_KERNELS to only build kernels,
-# MAKE_JUST_WORLDS to only build userland.
+# MAKE_JUST_KERNELS or WITHOUT_WORLDS to only build kernels,
+# MAKE_JUST_WORLDS or WITHOUT_KERNELS to only build userland.
# tinderbox - Same as universe, but presents a list of failed build
# targets and exits with an error if there were any.
+# worlds - Same as universe, except just makes the worlds.
+# kernels - Same as universe, except just makes the kernels.
# buildworld - Rebuild *everything*, including glue to help do
# upgrades.
# installworld - Install everything built by "buildworld".
@@ -104,6 +106,15 @@
# For more information, see the build(7) manual page.
#
+.if defined(UNIVERSE_TARGET) || defined(MAKE_JUST_WORLDS) || defined(WITHOUT_KERNELS)
+__DO_KERNELS=no
+.endif
+.if defined(MAKE_JUST_KERNELS) || defined(WITHOUT_WORLDS)
+__DO_WORLDS=no
+.endif
+__DO_WORLDS?=yes
+__DO_KERNELS?=yes
+
# This is included so CC is set to ccache for -V, and COMPILER_TYPE/VERSION
# can be cached for sub-makes. We can't do this while still running on the
# old fmake from FreeBSD 9.x or older, so avoid including it then to avoid
@@ -468,7 +479,7 @@
@cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe
kernels: .PHONY
- @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildkernel universe
+ @cd ${.CURDIR}; ${SUB_MAKE} universe -DWITHOUT_WORLDS
worlds: .PHONY
@cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=buildworld universe
@@ -483,19 +494,20 @@
.if make(universe) || make(universe_kernels) || make(tinderbox) || \
make(targets) || make(universe-toolchain)
#
-# Don't build rarely used architectures unless requested.
+# Don't build rarely used, semi-supported architectures unless requested.
#
.if defined(EXTRA_TARGETS)
EXTRA_ARCHES_mips= mipsel mipshf mipselhf mips64el mips64hf mips64elhf
EXTRA_ARCHES_mips+= mipsn32
+# powerpcspe excluded from main list until clang fixed
+EXTRA_ARCHES_powerpc= powerpcspe
.endif
TARGETS?=amd64 arm arm64 i386 mips powerpc riscv
_UNIVERSE_TARGETS= ${TARGETS}
TARGET_ARCHES_arm?= armv6 armv7
TARGET_ARCHES_arm64?= aarch64
TARGET_ARCHES_mips?= mips mips64 ${EXTRA_ARCHES_mips}
-# powerpcspe excluded until clang fixed
-TARGET_ARCHES_powerpc?= powerpc powerpc64
+TARGET_ARCHES_powerpc?= powerpc powerpc64 ${EXTRA_ARCHES_powerpc}
TARGET_ARCHES_riscv?= riscv64 riscv64sf
.for target in ${TARGETS}
TARGET_ARCHES_${target}?= ${target}
@@ -521,11 +533,7 @@
.endif
.endfor
-.if defined(UNIVERSE_TARGET)
-MAKE_JUST_WORLDS= YES
-.else
UNIVERSE_TARGET?= buildworld
-.endif
KERNSRCDIR?= ${.CURDIR}/sys
targets: .PHONY
@@ -634,7 +642,7 @@
.endfor
.endif # !make(targets)
-.if !defined(MAKE_JUST_KERNELS)
+.if ${__DO_WORLDS} == "yes"
universe_${target}_done: universe_${target}_worlds .PHONY
.for target_arch in ${TARGET_ARCHES_${target}}
universe_${target}_worlds: universe_${target}_${target_arch} .PHONY
@@ -658,9 +666,9 @@
${MAKEFAIL}))
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
.endfor
-.endif # !MAKE_JUST_KERNELS
+.endif # ${__DO_WORLDS} == "yes"
-.if !defined(MAKE_JUST_WORLDS)
+.if ${__DO_KERNELS} == "yes"
universe_${target}_done: universe_${target}_kernels .PHONY
universe_${target}_kernels: universe_${target}_worlds .PHONY
universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY
@@ -673,7 +681,7 @@
fi
@cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \
universe_kernels
-.endif # !MAKE_JUST_WORLDS
+.endif # ${__DO_KERNELS} == "yes"
# Tell the user the worlds and kernels have completed
universe_${target}: universe_${target}_done
Index: share/man/man7/build.7
===================================================================
--- share/man/man7/build.7
+++ share/man/man7/build.7
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 3, 2018
+.Dd March 29, 2020
.Dt BUILD 7
.Os
.Sh NAME
@@ -289,6 +289,18 @@
including
.Pa LINT .
This command takes a long time.
+.It Cm kernels
+Like
+.Cm universe
+with
+.Va WITHOUT_WORLDS
+defined so only the kernels for each architecture are built.
+.It Cm worlds
+Like
+.Cm universe
+with
+.Va WITHOUT_KERNELS
+defined so only the worlds for each architecture are built.
.It Cm update
Get updated sources as configured in
.Xr make.conf 5 .
@@ -761,7 +773,7 @@
.Pp
Builds using the
.Cm universe
-target are influenced by the following
+and related targets are influenced by the following
.Xr make 1
variables:
.Bl -tag -width ".Va MAKE_JUST_KERNELS"
@@ -775,11 +787,26 @@
Only build kernels for each supported architecture.
.It Va MAKE_JUST_WORLDS
Only build worlds for each supported architecture.
+.It Va WITHOUT_WORLDS
+Only build kernels for each supported architecture.
+.It Va WITHOUT_KERNELS
+Only build worlds for each supported architecture.
.It Va UNIVERSE_TARGET
Execute the specified
.Xr make 1
target for each supported architecture instead of the default action of
building a world and one or more kernels.
+This variable implies
+.Va WITHOUT_KERNELS .
+.It Va TARGETS
+Only build the listed targets instead of each supported architecture.
+.It Va EXTRA_TARGETS
+In addition to the supported architectures, build the semi-supported
+architectures.
+A semi-supported architecture has build support in the
+.Fx
+tree, but receives significantly less testing and is generally for
+fringe uses that do not have a wide appeal.
.El
.Sh FILES
.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 15, 6:22 PM (12 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28751827
Default Alt Text
D24212.id70058.diff (5 KB)

Event Timeline