ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lionel van den Berg" <>
Subject Dependset not working for me (checking if files are up to date)
Date Wed, 29 Aug 2007 02:56:26 GMT
I ended up with teh following script after many many attempts to
try to get something working. It's a bit of a hack now but I thought it
was working until today.

<target name="parser-uptodate-check">
     <srcfileset dir="${grammar.dir}">
       <include name="*.grammar" />
     <srcfileset dir="${lib.dir}">
       <include name="*.jar" />
     <targetfileset dir="${generate.dir}" includes="**/*" />

   <condition property="parser.isUptodate">
       <available file="${generate.dir}/al/parser/" />
       <available file="${generate.dir}/ae/parser/" />
       <available file="${generate.dir}/ab/parser/" />
       <available file="${generate.dir}/dse/parser/" />
       <available file="${generate.dir}/lte/parser/" />

The above doesn't work regardless of what I do, I've googled, I've tried all
sorts of combinations, I've looked at uptodate task but can't see if it will
do what I want.

My requirements are quite simple and from all the documentation I've read,
ant should
do it no problems.

What I want to do is:

If any file ending in .grammar in the directory grammar/ has been modified
after any file in the directory generate/ then set a property. In the above
I set the property only if it is up to date, I'm sure I can do the negation

The one extra complication is that in the generate/ directory there will be
bunch of subdirectories that I may not know the names of and these too may
contain subdirectories. I want to check all files recursively down these

Any help appreciated.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message