summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2014-05-08 23:54:15 +0000
committersjg <sjg@FreeBSD.org>2014-05-08 23:54:15 +0000
commited3fc70bf5a8edaf648093b11acca450802244ef (patch)
tree8ce0ddd0e6f508bd20c77429c448969589170fae /Makefile
parentd4e443e0426fee44056ba3c1123455666d083aef (diff)
parenta2e6be0add027bf3e713c0d56ba9715b83a01144 (diff)
downloadFreeBSD-src-ed3fc70bf5a8edaf648093b11acca450802244ef.zip
FreeBSD-src-ed3fc70bf5a8edaf648093b11acca450802244ef.tar.gz
Merge from head
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 20 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 924ad9e..b6cad2f 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 && \
OpenPOWER on IntegriCloud