You can use the <if> task or if attribute on targets and tasks. For example
a) <if test="${a=b}"> <csc ... /> </if> b) <csc ... if="${a=b}" /> c) <target name="zzz" if="${a=b}"> <csc ... /> </target> Alternatively there's unless attribute which can be used instead of if. Jarek ----- Original Message ----- From: "Burton, Kevin" <[EMAIL PROTECTED]> To: "McCullough, Gary" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, July 28, 2004 10:45 PM Subject: RE: [Nant-users] <if>? > Thank you. Do you know where <if> can be applied? For example can I do something like: > > <csc . . .> > <if . . .> > <arg . . ./> > </if> > </csc> > > Or do I have to > > <if . . .> > <csc . . .> > <arg . . ./> > </csc> > </if> > > -----Original Message----- > From: McCullough, Gary [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 28, 2004 2:53 PM > To: Burton, Kevin; [EMAIL PROTECTED] > Subject: RE: [Nant-users] <if>? > > > Try something like this: > > <if test="${property::exists(build.config) and > string::to-lower(build.config) = 'debug'}"> > ... > </if> > > ________________________________ > > Gary McCullough > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Burton, > Kevin > Sent: Wednesday, July 28, 2004 3:45 PM > To: [EMAIL PROTECTED] > Subject: [Nant-users] <if>? > > I have a property build.config that is either the string "debug" or > "release". I want to test for the property being "debug" or "release" > and change the compilation appropriately. First, how do I compare a > string. There doesn't seem to be a comparison string function just index > or is that what I am supposed to use? Second, do I need to surround the > whole <csc> task with the result of the <if> or can I simply put it > around the <arg> elements? Is there an example that I can use that > doesn't use the "deprecated" functionality? > > Thank you for your help. > > Kevin Burton > [EMAIL PROTECTED] > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_idG21&alloc_id040&op=ick > _______________________________________________ > Nant-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/nant-users > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_idG21&alloc_id040&opĚk > _______________________________________________ > Nant-users mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/nant-users > ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users