make-w32
[Top][All Lists]
Advanced

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

Re: handling Make errors


From: Greg Chicares
Subject: Re: handling Make errors
Date: Fri, 14 Jan 2011 23:46:32 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 2011-01-14 20:13Z, Jeff Solheim wrote:
> 
> Within my Makefile_1, I am invoking Makefile_2. In certain
> circumstances, Makefile_2 "throws" an error.
> 
> Is there a way for me to "catch" and "handle" (within Makefile_1) the
> error that Makefile_2 might possibly throw?

Makefile_1 can capture the exit code of '$(MAKE) Makefile_2',
and vary its subsequent behavior according to the value returned.
But 'make' has only three possible exit codes, and only two that
would probably be useful to you. Alternatively, you could redirect
the submakefile's output to a file and parse that upstream.

You may need to write '-' before commands, or use '-k', to
prevent 'make' from stopping at the first error.



reply via email to

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