I kind of picked up a project from someone else, and they'd set up the following
for the makefile, saying that there is no way to check if Ant failed or not.
Can I change the makefile so a return code is picked up *without* having to use
the listener?

------------------- makefile.mak -----------------------

ANT=ant -listener ErrorCodeGenerator

# run ant
# if ant.err exists after run, build failed.
# force error by dir command of file that doesn't exist
all:
   $(ANT)
   if exist ant.err dir ThisFileDoesNotExist 2>nul 1>nul


Many thanks,

David





"Conor MacNeill" <[EMAIL PROTECTED]> on
03/13/2002 06:24:45 PM

Please respond to "Ant Users List"
      <[EMAIL PROTECTED]>

To:   "Ant Users List" <[EMAIL PROTECTED]>
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  RE: Return code from Ant



> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>
> Hi.  I am a little perplexed how to call Ant from a makefile (we
> have to in our
> build process) and to check whether the build failed or not.
>
> Do I HAVE to create a BuildListener?  What doesn't Ant simply
> return an error
> code set to 0 or 1 when it's done?!!
>

It should do. What problem are you having?

Conor


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>








--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to