On Tue, Jan 28, 2014 at 1:20 PM, Paul Smith <psm...@gnu.org> wrote: > I'm not sure I'd go that far. $(shell ...) really _is_ useless in a > recipe because make will invoke a shell to run the recipe anyway, so why > have it invoke two shells? It's just redundant. > > However, $(file ...) can be useful in a recipe especially on systems > which have limited command line lengths (Windows for example)... in fact > I'd say that this is one of the main reasons people wanted $(file ...).
I'll grant you your point about $(file ...); sorry for overstating. But (and here we go completely away from the original topic, sorry again) I think $(shell ...) in a recipe should be more firmly deprecated than you do here. It's not just redundant, it creates an order-of-evaluation error. See the third date in this example: % cat Makefile all: @echo The time is now $$(date) @echo The time is now $(shell date) sleep 4 @echo The time is now $(shell date) @echo The time is now $$(date) % make The time is now Tue Jan 28 13:31:08 EST 2014 The time is now Tue Jan 28 13:31:08 EST 2014 sleep 4 The time is now Tue Jan 28 13:31:08 EST 2014 The time is now Tue Jan 28 13:31:12 EST 2014 David _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make