From b37be1a5d4a9bb1f6db52fef0ef23687dde561ff Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Fri, 14 Jun 2013 16:24:07 +0000 Subject: [PATCH] We cannot remove the _+_ trick, until old make is completely deprecated. But we don't want to set it to + for bmake since it breaks make -N which is used to supress the normal handling of targets marked with .MAKE (which seems broken in fmake and might be why _+_ was introduced). Add some comments to explain what's gong on. Reviewed by: obrien --- share/mk/sys.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 04294ac60d1..c534cea748c 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -95,7 +95,13 @@ ECHODIR ?= true .endif .endif -.if !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n" +.if defined(.PARSEDIR) +# _+_ appears to be a workaround for the special src .MAKE not working. +# setting it to + interferes with -N +_+_ ?= +.elif !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n" +# the check above matches only a single -n, so -n -n will result +# in _+_ = + _+_ ?= .else _+_ ?= +