ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <k...@panix.com>
Subject Re: ant-user Digest 19 Jun 2002 15:21:22 -0000 Issue 396
Date Wed, 19 Jun 2002 16:18:49 GMT



   From: "Erik Hatcher" <jakarta-ant@ehatchersolutions.com>
   To: "Ant Users List" <ant-user@jakarta.apache.org>
   Subject: Re: Conditionally setting code variables
   Date: Wed, 19 Jun 2002 10:42:14 -0400

   Yup.

   We just answered this just a couple of days ago.

   <property name="build.debug" value="false"/>
   <javac debug="${build.debug}"..../>

   To override from the command-line:

       ant -Dbuild.debug=true

Unless I can access build.debug from within my Java source code, as
far as I can see, what you write only alters the way Ant runs, but has
no effect on the source code that actually gets compiled, unlike the
C/C++ example I posted:

   > # in makefile:
   > ifdef DEBUG
   >   DBG_FLGS='-g -DDEBUG'
   > else
   >   DBG_FLGS=
   > endif
   >
   > foo: foo.o
   > cc -o foo $(DBG_FLGS) foo.o
   >
   >
   > ...and in the source .c file
   >
   > ...
   > #ifdef DEBUG
   >        /* print diagnostics */
   > #endif

Thanks!

kj

P.S. Please Cc me in replies, since I get ant-user-digest.

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message