ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Vincent" <>
Subject help - uptodate task clarification needed please.
Date Fri, 22 Feb 2002 01:49:13 GMT
Could someone please help me clarify the usage of the uptodate task in
ANT (v1.4.1) ?

I have the following files:


The 'gensrc' directory is peer to both the Lexer.g file and my
build.xml file.  The files inside gensrc are generated by a tool that
processes the Lexer.g file (antlr.Tool if it matters).  I want
regenerate the files withing the gensrc directory ONLY if Lexer.g is
NEWER.  It seemed that the uptodate task would work for this purpose.  

Here is my task.  I think I only need to check the Lexer.g file against
the file to make things simpler.

<target name="isUpToDate">
         <uptodate property="buildLexer"
            <srcfiles dir="." includesfile="Lexer.g"/>

However, this ALWAYS sets buildLexer to true.  My understanding is that
the targetFile is the file that gets generated through some action on
the srcfiles.  I then tried:

<uptodate property="buildLexer">
	<srcfiles dir="." includesfile="Lexer.g"/>
	<mapper from="Lexer.g" to="gensrc/" type="glob"/>

Same result, buildLexer is ALWAYS set to true.  What am I missing,
besides a bit more hair?  I tried switching the srcfile and targetfile
thinking I had them backwards and still it gets set to true.

Thanks much,


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message