Maybe putting it in the form of a patch on the latest git source will help it over the finish line:
diff --git a/doc/make.1 b/doc/make.1 index ec6f8a3b..4c258d68 100644 --- a/doc/make.1 +++ b/doc/make.1 @@ -222,8 +222,12 @@ With no argument, removes a previous load limit. Use the latest mtime between symlinks and target. .TP 0.5i \fB\-n\fR, \fB\-\-just\-print\fR, \fB\-\-dry\-run\fR, \fB\-\-recon\fR -Print the commands that would be executed, but do not execute them (except in -certain circumstances). +Print the commands that would be executed, but do not execute them in +most cases. +If the line contains a call to \fB$(MAKE)\fR, the entire line will still be +executed, with the \fB\-n\fR option passed to the sub-make instance that +is run. +Be prepared for side effects of output redirection. .TP 0.5i \fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR Do not remake the file ________________________________ From: David A. Wheeler <dr.david.a.whee...@gmail.com> Sent: Friday, March 18, 2022 09:08 To: Ambrus Sumegi <ambrus.sum...@arm.com> Cc: psm...@gnu.org <psm...@gnu.org>; Martin Dorey <martin.do...@hitachivantara.com>; bug-make@gnu.org <bug-make@gnu.org> Subject: Re: GNU Make bug report: broken dry-run functionality with sub-make invocations ***** EXTERNAL EMAIL ***** > On Mar 18, 2022, at 3:19 AM, Ambrus Sumegi <ambrus.sum...@arm.com> wrote: > > Thanks a lot for your suggestions, Martin and Paul. I understand the > reasoning behind why Make cannot improve this behavior, and the conditional > execution of tee that you both proposed looks like a concise and elegant > solution to my problem. My only remaining concern is about the man page, > which currently has this rather vague description of the switch in question: > > -n, --just-print, --dry-run, --recon > Print the commands that would be executed, but do not execute > them (except in certain circumstances). > > Perhaps the "(except in certain circumstances)" could be expanded to > something like "If the line contains a call to $(MAKE), the entire line will > still be executed, with the -n option passed to the sub-make instance. Be > prepared for side effects of output redirection." +1 to this. Proposal: Print the commands that would be executed, but do not execute them in most cases. Note: If the line contains a call to $(MAKE), the entire line will still be executed, with the -n option passed to the sub-make instance that is run. Also, be prepared for side effects of output redirection. (If someone has a better way to write that last sentence, please do so.) It's a pretty important exception, so it should be explicitly described in the summary. --- David A. Wheeler