aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 20 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 924ad9eb9389..b6cad2f953df 100644
--- a/Makefile
+++ b/Makefile
@@ -139,11 +139,7 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
# Choices add to complexity though.
# We cannot blindly use a make which may not be the one we want
# so be exlicit - until all choice is removed.
-.if !defined(WITHOUT_BMAKE)
WANT_MAKE= bmake
-.else
-WANT_MAKE= fmake
-.endif
MYMAKE= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}/${WANT_MAKE}
.if defined(.PARSEDIR)
HAVE_MAKE= bmake
@@ -152,7 +148,7 @@ HAVE_MAKE= fmake
.endif
.if exists(${MYMAKE})
SUB_MAKE:= ${MYMAKE} -m ${.CURDIR}/share/mk
-.elif ${WANT_MAKE} != ${HAVE_MAKE} || ${WANT_MAKE} != "bmake"
+.elif ${WANT_MAKE} != ${HAVE_MAKE}
# It may not exist yet but we may cause it to.
# In the case of fmake, upgrade_checks may cause a newer version to be built.
SUB_MAKE= `test -x ${MYMAKE} && echo ${MYMAKE} || echo ${MAKE}` \
@@ -238,8 +234,17 @@ tinderbox toolchains kernel-toolchains: .MAKE
${TGTS}:
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
-# Set a reasonable default
-.MAIN: all
+# The historic default "all" target creates files which may cause stale
+# or (in the cross build case) unlinkable results. Fail with an error
+# when no target is given. The users can explicitly specify "all"
+# if they want the historic behavior.
+.MAIN: _guard
+
+_guard:
+ @echo
+ @echo "Explicit target required (use \"all\" for historic behavior)"
+ @echo
+ @false
STARTTIME!= LC_ALL=C date
CHECK_TIME!= find ${.CURDIR}/sys/sys/param.h -mtime -0s ; echo
@@ -342,7 +347,7 @@ make bmake: .PHONY
${MMAKE} obj && \
${MMAKE} depend && \
${MMAKE} all && \
- ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR=
+ ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= NO_MAN=t
tinderbox toolchains kernel-toolchains: upgrade_checks
@@ -449,9 +454,15 @@ universe_kernels: universe_kernconfs
.if !defined(TARGET)
TARGET!= uname -m
.endif
+.if defined(MAKE_ALL_KERNELS)
+_THINNER=cat
+.else
+_THINNER=xargs grep -L "^.NO_UNIVERSE"
+.endif
KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \
find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
- ! -name DEFAULTS ! -name NOTES
+ ! -name DEFAULTS ! -name NOTES | \
+ ${_THINNER}
universe_kernconfs:
.for kernel in ${KERNCONFS}
TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \