summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2015-10-17 16:42:54 +0000
committerbdrewery <bdrewery@FreeBSD.org>2015-10-17 16:42:54 +0000
commitd50682643925d5cfbafa2f2297f3283a11e758cb (patch)
treef6101128ff9d51c03e67cc10df2f63edf9fb9e34 /Makefile
parentb5af77bf9f311f59fdf978fc5132901f1f3a4037 (diff)
downloadFreeBSD-src-d50682643925d5cfbafa2f2297f3283a11e758cb.zip
FreeBSD-src-d50682643925d5cfbafa2f2297f3283a11e758cb.tar.gz
Rework the 'make -n -n' feature such that '-n' recurses and '-N' does not.
Bmake has a documented feature of '-N' to skip executing commands which is specifically intended for debugging top-level builds and not recursing into sub-directories. This matches the older 'make -n' behavior we added which made '-n -n' the recursing target and '-n' a non-recursing target. Removing the '-n -n' feature allows the build to work as documented in the bmake manpage with '-n' and '-N'. The older '-n -n' feature was also not documented anywhere that I could see. Note that the ${_+_} var is still needed as currently bmake incorrectly executes '+' commands when '-N' is specified. The '-n' and '-n -n' features were broken for several reasons prior to this. r251748 made '_+_' never expand with '-n -n' which resulted in many sub-directories not being visited until fixed 2 years later in r288391, and many targets were given .MAKE over the past few years which resulted in non-sub-make commands, such as rm and ln and mtree, to be executed. This should also allow removing some indirection hacks in bsd.subdir.mk and other cases of .USE that have a .MAKE by using '+'. Sponsored by: EMC / Isilon Storage Division Discussed on: arch@ (mostly silence)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 1 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index c3326b7..130fdbf 100644
--- a/Makefile
+++ b/Makefile
@@ -243,14 +243,8 @@ cleanworld:
# Handle the user-driven targets, using the source relative mk files.
#
-.if !(!empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n")
-# skip this for -n to avoid changing previous behavior of
-# 'make -n buildworld' etc. Using -n -n will run it.
-${TGTS}: .MAKE
tinderbox toolchains kernel-toolchains: .MAKE
-.endif
-
-${TGTS}: .PHONY
+${TGTS}: .PHONY .MAKE
${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET}
# The historic default "all" target creates files which may cause stale
OpenPOWER on IntegriCloud