Date: Sat, 17 Oct 2015 16:42:55 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289460 - in head: . share/mk Message-ID: <201510171642.t9HGgt8b000945@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Sat Oct 17 16:42:54 2015 New Revision: 289460 URL: https://svnweb.freebsd.org/changeset/base/289460 Log: 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) Modified: head/Makefile head/UPDATING head/share/mk/sys.mk Modified: head/Makefile ============================================================================== --- head/Makefile Sat Oct 17 16:05:42 2015 (r289459) +++ head/Makefile Sat Oct 17 16:42:54 2015 (r289460) @@ -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 Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 17 16:05:42 2015 (r289459) +++ head/UPDATING Sat Oct 17 16:42:54 2015 (r289460) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151017: + The build previously allowed using 'make -n' to not recurse into + sub-directories while showing what commands would be executed, and + 'make -n -n' to recursively show commands. Now 'make -n' will recurse + and 'make -N' will not. + 20151012: If you specify SENDMAIL_MC or SENDMAIL_CF in make.conf, mergemaster and etcupdate will now use this file. A custom sendmail.cf is now Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Sat Oct 17 16:05:42 2015 (r289459) +++ head/share/mk/sys.mk Sat Oct 17 16:42:54 2015 (r289460) @@ -145,13 +145,12 @@ ECHODIR ?= true .endif .endif -.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 _+_ = + +.if ${.MAKEFLAGS:M-N} +# bmake -N is supposed to skip executing anything but it does not skip +# exeucting '+' commands. The '+' feature is used where .MAKE +# is not safe for the entire target. -N is intended to skip building sub-makes +# so it executing '+' commands is not right. Work around the bug by not +# setting '+' when -N is used. _+_ ?= .else _+_ ?= +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510171642.t9HGgt8b000945>