[Top][All Lists]

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

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

From: Noel Yap
Subject: Re: shortcut of ":" but not /bin/true
Date: Tue, 18 May 2004 06:34:42 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

I'm not sure if the following is feasible or advisable, but what could be done is to test some common, simple 
things like ":", "true", and "false" to see if $SHELL has it as a built-in.


David Boyce wrote:

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

Help-make mailing list

reply via email to

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