[Top][All Lists]

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

[bug #28092] $(shell false) should break build

From: Paul D. Smith
Subject: [bug #28092] $(shell false) should break build
Date: Wed, 25 Nov 2009 18:38:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091109 Ubuntu/9.10 (karmic) Firefox/3.5.5

Update of bug #28092 (project make):

              Item Group:                    None => Enhancement            


Follow-up Comment #1:

There's no way $(shell ...) failing can or should cause make to stop.  There
are many legitimate reasons why the shell exiting with an error should not
cause make to fail, and adding this would be an enormous
backward-compatibility break.

For your situation, you can just check to see whether the result of the
variable was valid; this will also catch the situation where there's an empty
file as well as a non-existent one:

a := $(shell cat version.txt)
ifeq (,$(a))
$(error version.txt does not contain a valid version)

I agree it might be useful to find out the exit code of the last $(shell ...)
function invocation, so I'm leaving this open as an enhancement request to
create a variable containing the exit code of the last $(shell ...)


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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