On Fri, Oct 16, 2009 at 6:31 PM, Helge Fredriksen <[email protected]> wrote:
> If the legal stuff aren't putting any constraints to the process (which we
> might have concluded with now?) I can't see any reason for not proceeding.
>
> My experience with ant-contrib is that it makes the build process far more
> readable, however, it might add some more space to it. However, I understand
> that you plan to split it up into several parts, so that might not be so
> problematic.
>
> Could be nice to see some examples first before we decide fully, thought ;-)
>
> Helge F.
>
[Cc:ed to the list]
Expect examples by Sunday. But here is an example for a very simple
file (setenv.xml) which I have introduced into the branch. Right now
it reads:
----
<condition property="iswindows">
<os family="windows"/>
</condition>
<target name="libsubdir.if.windows" if="iswindows">
<property name="libsubdir" value="bin"/>
</target>
<target name="libsubdir.if.not.windows" unless="iswindows">
<property name="libsubdir" value="lib"/>
</target>
<target name="setenv"
depends="libsubdir.if.windows, libsubdir.if.not.windows">
<propertyfile file="env.properties">
<entry key="qtjambi.libsubdir" value="${libsubdir}"/>
</propertyfile>
</target>
----
With ant-contrib, this becomes:
----
<target name="setenv">
<var name="libsubdir" value="lib"/>
<if>
<os familly="windows"/>
<then>
<var name="libsubdir" value="bin"/>
</then>
</if>
<propertyfile file="env.properties">
<entry key="qtjambi.libsubdir" value="${libsubdir}"/>
</propertyfile>
</target>
----
No <condition>, no two extra targets just for setting one property in
a file. It makes use of if/then (I don't even need the else here) and
var. And it's shorter than the corresponding Java code :p
--
Francis Galiegue, [email protected]
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest