help-make
[Top][All Lists]
Advanced

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

Re: Checking return code from Ant


From: Jens Schweikhardt
Subject: Re: Checking return code from Ant
Date: Wed, 20 Mar 2002 08:22:11 +0100
User-agent: Mutt/1.2.5i

On Tue, Mar 19, 2002 at 04:35:06PM -0500, address@hidden wrote:
# 
# Hi everyone.  I have a strange situation which I was wondering if anyone could
# help me with:
# 
# I call Ant from within a make file.  However, if Ant fails, the make file
# continues to run as if no problem occurred.
# 
# I call Ant through its batchfile ant.bat, and ant's errorlevel value when it
# returns is definitely 1 when it fails.  Although this doesn't seem to get 
passed

If this is interpreted by the '&&' operator like under Unix,
then 1 means false and the short-circuiting property of &&
prevents evaluation of the right hand side: in

        false && whatever

whatever is never executed.

# back to make for some reason, if I create another batch file, say called
# antWithRC.bat, and put the following line in it, it blows up with ant fails, 
and
# causes the make to stop.
# 
# antWithRC.bat:
# ant %1 %2 %3 %4 %5 %6 %7 %8 %9 && if errorlevel 1 goto noop
# :noop

What happens if you use || instead?

Regards,

        Jens
-- 
Jens Schweikhardt  http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)



reply via email to

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