help-make
[Top][All Lists]
Advanced

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

Re: How to stop building when sub-make returns error


From: Harvey Chapman
Subject: Re: How to stop building when sub-make returns error
Date: Tue, 12 Jan 2010 11:17:16 -0500

For more information on pipes and errors, search for "pipefail" in the bash man 
page. http://linux.die.net/man/1/bash

On Jan 12, 2010, at 7:00 AM, Paljas wrote:

> 
> It's not a bug. Make will react on the return status of a command. Commands
> in Make are executed in Bash. The last command in the pipe is 'grep', which
> returns a value of '1' if it does not find a occurrence of the search
> string. The $(MAKE) command returns a '2', which would stop Make from
> continuing, if it weren't for the 'grep' command.
> 
> So basically, you should make sure that Make is able to capture what you
> believe should be an error!
> 
> 
> elight wrote:
>> 
>>      $(MAKE) error 2>&1 | grep error
>> 
>> Redirection and piping make different result.
>> Hmm. It's a bug or not?
>> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/How-to-stop-building-when-sub-make-returns-error-tp27122668p27126572.html
> Sent from the Gnu - Make - Help mailing list archive at Nabble.com.
> 
> 
> 
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make





reply via email to

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