ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: Conditionally setting code variables
Date Wed, 19 Jun 2002 14:42:14 GMT
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



----- Original Message -----
From: <kynn@panix.com>
To: <ant-user@jakarta.apache.org>
Sent: Wednesday, June 19, 2002 10:26 AM
Subject: Conditionally setting code variables


>
>
>
>
> I'm still making the mental migration from C++/make to Java/Ant.  With
> C++/make, I could have the conditional execution of make be in synch
> with the conditional compilation of the source code, with tricks like
> this:
>
> # 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 file
>
> ...
> #ifdef DEBUG
>        /* print diagnostics */
> #endif
>
> etc.
>
> Can I do the same thing using Java/Ant?
>
> Thanks!
>
> kj
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
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