help-make
[Top][All Lists]
Advanced

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

Re: shortcut of ":" but not /bin/true


From: David Boyce
Subject: Re: shortcut of ":" but not /bin/true
Date: Mon, 17 May 2004 21:45:30 -0400

To clarify for anyone following along at home: this is different from the normal GNU make "fast path" feature where it will run <command> directly where possible rather than using the "traditional path" of running '/bin/sh -c <command>'. The ":" is given a third way which we might call the "blazing fast path"; it's not executed at all. The discussion is of whether and how to promote true and false from the fast path to the blazing fast path.

Which raises the question: why wasn't the fast path in use in the truss output I showed? The answer is apparently that the generated Perl makefiles have an explicit SHELL=/bin/sh which disables the fast path. I wonder if it would be possible to detect when assignment to SHELL is a no-op and leave fast path on? Might be harder than it seems when recursively expanded variables are involved. Unfortunately a lot of generated makefiles have this tic. In fact ISTR reading somebody's "best practices with make" paper which included an injunction to always assign SHELL=/bin/sh explicitly. Not saying I agree with that but it's out there and clearly a lot of people do.

-David Boyce





reply via email to

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