Page MenuHomeFreeBSD

D24212.id70056.diff
No OneTemporary

D24212.id70056.diff

Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -5,8 +5,8 @@
#
# 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.
# buildworld - Rebuild *everything*, including glue to help do
@@ -104,6 +104,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
@@ -521,11 +530,7 @@
.endif
.endfor
-.if defined(UNIVERSE_TARGET)
-MAKE_JUST_WORLDS= YES
-.else
UNIVERSE_TARGET?= buildworld
-.endif
KERNSRCDIR?= ${.CURDIR}/sys
targets: .PHONY
@@ -634,7 +639,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 +663,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 +678,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
@@ -775,11 +775,17 @@
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 .
.El
.Sh FILES
.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 12, 9:34 AM (8 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26893329
Default Alt Text
D24212.id70056.diff (3 KB)

Event Timeline