Here's a patch, that might, or might not be wanted that supports the
depend and verbose flags on javac and jikes. It also adds some support for
turning on full (+F) dependancy checking with jikes. The only caveat there
is that in order to make this effective, one has to give jikes the full
list of files to compile every time...and let it do the right thing.

Anyway, YMMV, but I'd thought I'd see if I could get these dropped in, so
I didn't have to keep maintaining local changes, and others might want
them.

 - Sean
Index: src/main/org/apache/tools/ant/taskdefs/Javac.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
retrieving revision 1.39
diff -c -r1.39 Javac.java
*** src/main/org/apache/tools/ant/taskdefs/Javac.java   2000/09/15 07:10:58     
1.39
--- src/main/org/apache/tools/ant/taskdefs/Javac.java   2000/09/18 18:14:10
***************
*** 77,82 ****
--- 77,83 ----
   * <li>debug
   * <li>encoding
   * <li>target
+  * <li>depend
   * </ul>
   * Of these arguments, the <b>sourcedir</b> and <b>destdir</b> are required.
   * <p>
***************
*** 105,110 ****
--- 106,113 ----
      private boolean debug = false;
      private boolean optimize = false;
      private boolean deprecation = false;
+     private boolean depend = false;
+     private boolean verbose = false;
      private String target;
      private Path bootclasspath;
      private Path extdirs;
***************
*** 251,256 ****
--- 254,273 ----
           this.optimize = optimize;
       }
  
+     /** 
+      * Set the depend flag.
+      */ 
+      public void setDepend(boolean depend) {
+          this.depend = depend;
+      }  
+ 
+     /** 
+      * Set the verbose flag.
+      */ 
+      public void setVerbose(boolean verbose) {
+          this.verbose = verbose;
+      }  
+ 
      /**
       * Sets the target VM that the classes will be compiled for. Valid
       * strings are "1.1", "1.2", and "1.3".
***************
*** 521,526 ****
--- 538,549 ----
              cmd.createArgument().setValue("-extdirs");
              cmd.createArgument().setPath(extdirs);
          }
+         if (depend) {
+             cmd.createArgument().setValue("-Xdepend");
+         }
+         if (verbose) {
+             cmd.createArgument().setValue("-verbose");
+         }
  
          logAndAddFilesToCompile(cmd);
          return cmd;
***************
*** 608,614 ****
          if (optimize) {
              cmd.createArgument().setValue("-O");
          }
! 
          /**
           * XXX
           * Perhaps we shouldn't use properties for these
--- 631,649 ----
          if (optimize) {
              cmd.createArgument().setValue("-O");
          }
!         if (verbose) {
!             cmd.createArgument().setValue("-verbose");
!         }
!         if (depend) {
!             cmd.createArgument().setValue("-Xdepend");
!             String fullDependProperty = 
project.getProperty("build.compiler.fulldepend");
!             if (fullDependProperty != null &&
!                  (fullDependProperty.equalsIgnoreCase("on") ||
!                   fullDependProperty.equalsIgnoreCase("true"))
!                ) {
!                cmd.createArgument().setValue("+F");
!             }
!         } 
          /**
           * XXX
           * Perhaps we shouldn't use properties for these

Reply via email to