ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Any way to optionally include an attribute in an ant task?
Date Tue, 24 Apr 2007 11:26:05 GMT
>> a) Why do you have "sometimes" the value for mainclass set 
>and sometimes not? 
>
>Because sometimes I'm building a DLL and sometimes an 
>executable depending on whether mainclass is set.
>
>> b) You could use conditional targets (<target if="mainclass">)
>
>But then I'd have to repeat the target twice. I don't want to do that.


Because you (should) know while implementing the buildfile what to
generate you can do

<presetdef name="dll">
    <csc --set-some-common-attributes-- />
</presetdef>
<presetdef name="exe">
    <dll mainclass="..."/>
</presetdef>

<dll .../>
<dll .../>
<exe .../>



Jan

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


Mime
View raw message