bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Make bug report: broken dry-run functionality with sub-make invo


From: Edward Welbourne
Subject: Re: GNU Make bug report: broken dry-run functionality with sub-make invocations
Date: Mon, 21 Mar 2022 15:31:08 +0000

Ambrus Sumegi (21 March 2022 14:22) wrote:
> If the invocation is a function, i.e., `$(make,"external_target") |
> tee logs/external_task.log` then Make knows exactly where the call to
> the sub-make ends without having to parse a shell command. So, when
> running with the -n switch, it can simply print "make external_target
> | tee logs/external_task.log" and proceed to show the output of `make
> external_target -n`

However, that doesn't help cases like

subdirs:; find sub/ -type f -name Makefile | \
        sed -e 's!/Makefile!!' | grep . | \
        while read dir; do $(MAKE) -C $$dir; done

where the failure to run the rest of the command makes the call to
$(MAKE) never happen; and replacing the last line with

        while read dir; do $(make -C $$dir); done

or similar won't save you.
Fixing one use-case while breaking all others is no solution,

        Eddy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]