On Thu, 2022-03-17 at 18:27 +, Martin Dorey wrote:
> That coped with -nj --no-print-directory on the one version of Make
> that I tested it with, but I don't know how portable that would
> prove.
Modern versions of make guarantee a canonical format of MAKEFLAGS such
that you can parse them
> the statement after the pipe also gets executed
Would you have Make parse the shell command, assuming that SHELL isn't eg
/usr/bin/perl, splitting off anything after | and maybe ; and && and, why not,
||, so it only dry-runs the part of the command that invoked $(MAKE)? The
current behavior
Dear Devs,
I stumbled upon a rather rare case where Make produces a false error with the
--dry-run switch. I've attached a sample Makefile for reproduction.
The output of make main_target with this file is the following:
$ make main_target
mkdir logs
make external_target | tee