help-make
[Top][All Lists]
Advanced

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

Re: Exit status ignored during variable expansion?


From: Angel Tsankov
Subject: Re: Exit status ignored during variable expansion?
Date: Thu, 28 Jul 2011 22:37:03 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

On 07/28/11 22:28, Paul Smith wrote:
On Thu, 2011-07-28 at 22:18 +0300, Angel Tsankov wrote:
Does anyone have an idea why 'make' ignores the exit status from any
commands that are run as part of variable expansion:

a=$(shell no-such-command)
b=$(shell false)

What do you think make should do with the exit status of these
operations?  These are not run as part of any rule or target.  I suppose
if it had been documented/worked since the beginning that non-0 exit
codes from the shell function would cause make to fail, that would have
been OK.

But I don't see any clear enough advantage to behaving that way to
justify a massively backward-incompatible change like that.


If 'make' does not fail on non-zero exit from a command (during variable expansion) then we have no way to determine if the command completed successfully (with empty output) or if it failed. This is my only concern.

A possible solution would be to introduce a new target (such as .LOW_RESOLUTION_TIME) for this behavior.


Regards,
Angel Tsankov




reply via email to

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