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