Make universe configuration more consistent with rest of system
Add 'WITHOUT_WORLDS' and 'WITHOUT_KERNELS' as aliases for the inconsistently named MAKE_JUST_KERNELS and MAKE_JUST_WORLDS respectively. I always forget the MAKE_ part (or is it BUILD_), and it's inconsistent with everything else. Document the new things, but leave speculation of any eventual MAKE_JUST_* deprecation out of the manuals and comments. Reviewed by: brooks, bdrewery, emaste (LGTM) MFC After: 3 days Differential Revision: https://reviews.freebsd.org/D24212
This commit is contained in:
parent
144af011b4
commit
a7783b5a72
27
Makefile
27
Makefile
@ -5,10 +5,12 @@
|
|||||||
#
|
#
|
||||||
# universe - *Really* build *everything* (buildworld and
|
# universe - *Really* build *everything* (buildworld and
|
||||||
# all kernels on all architectures). Define
|
# all kernels on all architectures). Define
|
||||||
# MAKE_JUST_KERNELS to only build kernels,
|
# MAKE_JUST_KERNELS or WITHOUT_WORLDS to only build kernels,
|
||||||
# MAKE_JUST_WORLDS to only build userland.
|
# MAKE_JUST_WORLDS or WITHOUT_KERNELS to only build userland.
|
||||||
# tinderbox - Same as universe, but presents a list of failed build
|
# tinderbox - Same as universe, but presents a list of failed build
|
||||||
# targets and exits with an error if there were any.
|
# 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
|
# buildworld - Rebuild *everything*, including glue to help do
|
||||||
# upgrades.
|
# upgrades.
|
||||||
# installworld - Install everything built by "buildworld".
|
# installworld - Install everything built by "buildworld".
|
||||||
@ -104,6 +106,15 @@
|
|||||||
# For more information, see the build(7) manual page.
|
# 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
|
# 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
|
# 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
|
# old fmake from FreeBSD 9.x or older, so avoid including it then to avoid
|
||||||
@ -521,11 +532,7 @@ universe_${toolchain}_skip: universe_prologue .PHONY
|
|||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.if defined(UNIVERSE_TARGET)
|
|
||||||
MAKE_JUST_WORLDS= YES
|
|
||||||
.else
|
|
||||||
UNIVERSE_TARGET?= buildworld
|
UNIVERSE_TARGET?= buildworld
|
||||||
.endif
|
|
||||||
KERNSRCDIR?= ${.CURDIR}/sys
|
KERNSRCDIR?= ${.CURDIR}/sys
|
||||||
|
|
||||||
targets: .PHONY
|
targets: .PHONY
|
||||||
@ -634,7 +641,7 @@ MAKE_PARAMS_${target}+= \
|
|||||||
.endfor
|
.endfor
|
||||||
.endif # !make(targets)
|
.endif # !make(targets)
|
||||||
|
|
||||||
.if !defined(MAKE_JUST_KERNELS)
|
.if ${__DO_WORLDS} == "yes"
|
||||||
universe_${target}_done: universe_${target}_worlds .PHONY
|
universe_${target}_done: universe_${target}_worlds .PHONY
|
||||||
.for target_arch in ${TARGET_ARCHES_${target}}
|
.for target_arch in ${TARGET_ARCHES_${target}}
|
||||||
universe_${target}_worlds: universe_${target}_${target_arch} .PHONY
|
universe_${target}_worlds: universe_${target}_${target_arch} .PHONY
|
||||||
@ -658,9 +665,9 @@ universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY
|
|||||||
${MAKEFAIL}))
|
${MAKEFAIL}))
|
||||||
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
|
@echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`"
|
||||||
.endfor
|
.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}_done: universe_${target}_kernels .PHONY
|
||||||
universe_${target}_kernels: universe_${target}_worlds .PHONY
|
universe_${target}_kernels: universe_${target}_worlds .PHONY
|
||||||
universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY
|
universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY
|
||||||
@ -673,7 +680,7 @@ universe_${target}_kernels: universe_${target}_prologue .MAKE .PHONY
|
|||||||
fi
|
fi
|
||||||
@cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \
|
@cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \
|
||||||
universe_kernels
|
universe_kernels
|
||||||
.endif # !MAKE_JUST_WORLDS
|
.endif # ${__DO_KERNELS} == "yes"
|
||||||
|
|
||||||
# Tell the user the worlds and kernels have completed
|
# Tell the user the worlds and kernels have completed
|
||||||
universe_${target}: universe_${target}_done
|
universe_${target}: universe_${target}_done
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd December 3, 2018
|
.Dd March 29, 2020
|
||||||
.Dt BUILD 7
|
.Dt BUILD 7
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -775,11 +775,17 @@ while still building each architecture serially.
|
|||||||
Only build kernels for each supported architecture.
|
Only build kernels for each supported architecture.
|
||||||
.It Va MAKE_JUST_WORLDS
|
.It Va MAKE_JUST_WORLDS
|
||||||
Only build worlds for each supported architecture.
|
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
|
.It Va UNIVERSE_TARGET
|
||||||
Execute the specified
|
Execute the specified
|
||||||
.Xr make 1
|
.Xr make 1
|
||||||
target for each supported architecture instead of the default action of
|
target for each supported architecture instead of the default action of
|
||||||
building a world and one or more kernels.
|
building a world and one or more kernels.
|
||||||
|
This variable implies
|
||||||
|
.Va WITHOUT_KERNELS .
|
||||||
.El
|
.El
|
||||||
.Sh FILES
|
.Sh FILES
|
||||||
.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
|
.Bl -tag -width ".Pa /usr/share/examples/etc/make.conf" -compact
|
||||||
|
Loading…
x
Reference in New Issue
Block a user