What you are asking for just about summarizes several
of the requests I've made lately.
We need:
1. Ability to have compound conditionals (OR, AND, NOT, ()),
within if/unless construct:
2. Need ability to optionally apply conditional test prior to executing
targets in depends list.
3. Need ability to specifiy a fileset as an argument to the <available> task.
4. Need to allow wild-card expansion in fileset for <available> task, in order
to test whether any of a number of possible files are present.
Jason
----- Original Message -----
From: "Tom Elrod" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 22, 2000 11:28 AM
Subject: RE: <uptodate> check that srcfile exists
> The only problem with using the <available> tag is that I can only set one
> property per <file>. I would like to check a directory for several files
> and only set the property to true if all files exist. Is there any way to
> nest the list of files (I tried, but didn't seem to work).
>
> <available property="pb.statestore.idl.exists"
> file="statestore/NamedValue.java,statestore/StateStore.java" />
>
> Also wondering if there is a way to do an 'or' in the conditionals within a
> target? For example:
>
> <target name="statestore.idl" depends="statestore.exists" unless
> ="statestore.idl.exists" OR if="statestore.idl.uptodate" >
>
> I only want to run this target if statestore.idl.exists is false OR
> statestore.idl.update is true.
>
> Thanks for you help.
>
> -Tom
>
>
>
> > -----Original Message-----
> > From: Tom Elrod
> > Sent: Thursday, December 21, 2000 2:17 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: <uptodate> check that srcfile exists
> >
> > I would like to recompile an IDL file if the IDL file is newer than the
> > source it generates, which the sample code below does. I would also like
> > to recompile the IDL file if the source it generates does not exist.
> > Anyone have an idea how I would do this?
> >
> > <target name="loader.exists" depends="prepare">
> > <uptodate property="pb.loader.idl"
> > targetfile="${srcDir}\infrastructure\loader\Loader.idl" >
> > <srcfiles dir="${srcDir}\infrastructure\loader\"
> > includes="*Loader*.java,stringArrayH*.java" />
> > </uptodate>
> > </target>
> > <target name="loader.idl" depends="prepare,loader.exists"
> > if="pb.loader.idl" >
> > <exec executable="${idlcmd}"
> > dir="source/infrastructure/loader"
> > output="idl.log"
> > failonerror="true"
> > >
> > <arg value="-no_tie"/>
> > <arg value="-no_examples"/>
> > <arg value="-no_comments"/>
> > <arg value="-root_dir"/>
> > <arg value="${srcDir}"/>
> > <arg value="Loader.idl"/>
> > </exec>