ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javac.java
Date Mon, 31 Jul 2000 08:24:49 GMT
bodewig     00/07/31 01:24:48

  Modified:    src/bin  ant
               src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  Improved Jikes support. Added build.compiler.pedantic option for Jikes
  +P flag and use JIKESPATH if set.
  Submitted by:	Peter Donald <donaldp@mad.scientist.com>
  
  Revision  Changes    Path
  1.5       +9 -0      jakarta-ant/src/bin/ant
  
  Index: ant
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/bin/ant,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ant	2000/07/28 08:57:29	1.4
  +++ ant	2000/07/31 08:24:46	1.5
  @@ -58,5 +58,14 @@
     echo "  to the installation directory of java."
   fi
   
  +# supply JIKESPATH to Ant as jikes.class.path
  +if [ "$JIKESPATH" != "" ] ; then
  +  if [ "$ANT_OPTS" != "" ] ; then
  +    ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
  +  else
  +    ANT_OPTS=-Djikes.class.path=$JIKESPATH
  +  fi
  +fi
  +
   $JAVACMD -classpath $LOCALCLASSPATH -Dant.home=${ANT_HOME} $ANT_OPTS org.apache.tools.ant.Main
$@
   
  
  
  
  1.27      +21 -0     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Javac.java	2000/07/24 15:52:57	1.26
  +++ Javac.java	2000/07/31 08:24:47	1.27
  @@ -632,6 +632,12 @@
           // will add it to classpath.
           classpath.append(src);
   
  +        // if the user has set JIKESPATH we should add the contents as well
  +        String jikesPath = System.getProperty("jikes.class.path");
  +        if (jikesPath != null) {
  +            classpath.append(new Path(project, jikesPath));
  +        }
  +        
           Vector argList = new Vector();
   
           if (deprecation == true)
  @@ -690,6 +696,21 @@
              warnings = false;
          }
   
  +       /**
  +        * Jikes can issue pedantic warnings. 
  +        */
  +       boolean pedantic = false;
  +       String pedanticProperty = project.getProperty("build.compiler.pedantic");
  +       if (pedanticProperty != null &&
  +           (pedanticProperty.equalsIgnoreCase("on") ||
  +            pedanticProperty.equalsIgnoreCase("true"))
  +           ) {
  +           pedantic = true;
  +       }
  + 
  +       if (pedantic)
  +           argList.addElement("+P");
  + 
          if (emacsMode)
              argList.addElement("+E");
   
  
  
  

Mime
View raw message