Browse Source

Search for the generated file in the "right" directory in <jjtree>.

PR: 1652


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269265 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
a47dcdd21f
2 changed files with 6 additions and 2 deletions
  1. +3
    -0
      WHATSNEW
  2. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java

+ 3
- 0
WHATSNEW View File

@@ -136,6 +136,9 @@ Fixed bugs:

* perform proper uptodate check in <rmic> when compiling for IIOP.

* <jjtree>'s uptodate test works even if outputdirectory is not the
parent dir of target

Changes from Ant 1.2 to Ant 1.3
===========================================



+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java View File

@@ -187,8 +187,9 @@ public class JJTree extends Task {
cmdl.createArgument().setValue(
"-OUTPUT_DIRECTORY:"+outputDirectory.getAbsolutePath().replace('\\', '/'));
final File javaFile = new File(
target.toString().substring(0, target.toString().indexOf(".jjt")) + ".jj");
String targetName = target.getName();
final File javaFile = new File(outputDirectory,
targetName.substring(0, targetName.indexOf(".jjt")) + ".jj");
if (javaFile.exists() && target.lastModified() < javaFile.lastModified()) {
project.log("Target is already built - skipping (" + target + ")");
return;


Loading…
Cancel
Save