Could someone please help me clarify the usage of the uptodate task in ANT (v1.4.1) ?
I have the following files: ./build.xml ./Lexer.g ./gensrc/Lexer.java ./gensrc/LexerTokenTypes.java ./gensrc/LexerTokenTypes.txt 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 Lexer.java file to make things simpler. <target name="isUpToDate"> <uptodate property="buildLexer" targetfile="gensrc/Lexer.java"> <srcfiles dir="." includesfile="Lexer.g"/> </uptodate> </target> 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/Lexer.java" type="glob"/> </uptodate> 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, Jeff -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>