help-make
[Top][All Lists]
Advanced

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

capturing make's exit status


From: Nolan Ring
Subject: capturing make's exit status
Date: Mon, 27 Jan 2003 16:24:26 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020618 Netscape/7.0b1

Hi,

OS is Solaris 5.9
make is 3.8.0

We have a large project whose code base consists of both java and native code. We are using ant as our build tool - and calling make from ant. I want to capture the exit status when make encounters a problem, even if the problem is deep down in the directory structure that it's building. What happens now is that my return status is usually 0 because of the way I'm invoking make. Is there some way for me to capture the exit status from make at the time that it fails? Or set a flag?
My Makefile is pretty basic:

all: versionfile $(BUILDDIRS)
       @(for i in $(MAKEDIRS); do cd $$i; echo "Making in $$i" ;make -f 
Makefile.sun; cd ..; done)

Thanks much.









reply via email to

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