You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by pi...@apache.org on 2003/06/21 23:55:25 UTC

cvs commit: cocoon-2.1/src/scratchpad/garbage/tools .cvsignore

pier        2003/06/21 14:55:25

  Modified:    src/scratchpad/garbage build.xml
  Added:       src/scratchpad/garbage/tools .cvsignore
  Log:
  Make sure we give a good explaination on why we can't compile if JavaCC
  is missing and JavaCC is unavailabe (JavaCC itself cannot be redistributed,
  but we can store its output in CVS no problems)
  
  Revision  Changes    Path
  1.2       +45 -9     cocoon-2.1/src/scratchpad/garbage/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/scratchpad/garbage/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	21 Jun 2003 21:11:47 -0000	1.1
  +++ build.xml	21 Jun 2003 21:55:25 -0000	1.2
  @@ -61,14 +61,6 @@
       <echo message="Compiling with J2SDK version ${ant.java.version}"/>
   
       <!--
  -     | Set the "javadoc.uptodate" if the API documentation is up to date.
  -     +-->
  -    <uptodate property="javadoc.uptodate">
  -      <srcfiles dir="${dir.source.java}" includes="**/*.java"/>
  -      <mapper type="merge" to="${dir.build.apidocs}/index.html"/>
  -    </uptodate>
  -
  -    <!--
        | Set the "javacc.uptodate" property if the parser doesn't need to be
        | rebuilt from its "JavaCC" grammar.
        +-->
  @@ -77,6 +69,32 @@
       </uptodate>
   
       <!--
  +     | Set the "javacc.available" property if the JavaCC class is available.
  +     +-->
  +    <available property="javacc.available" classname="javacc">
  +      <classpath refid="classpath"/>
  +    </available>
  +
  +    <!--
  +     | Set the "javacc.required" property if JavaCC is not available in the
  +     | current classpath, and a JavaCC recompilation is necessary.
  +     +-->
  +    <condition property="javacc.required">
  +      <and>
  +        <not><isset property="javacc.available"/></not>
  +        <not><isset property="javacc.uptodate"/></not>
  +      </and>
  +    </condition>
  +
  +    <!--
  +     | Set the "javadoc.uptodate" if the API documentation is up to date.
  +     +-->
  +    <uptodate property="javadoc.uptodate">
  +      <srcfiles dir="${dir.source.java}" includes="**/*.java"/>
  +      <mapper type="merge" to="${dir.build.apidocs}/index.html"/>
  +    </uptodate>
  +
  +    <!--
        | Set the "javadoc.param" property to contain "-breakiterator" if this
        | build is being executed by J2SDK 1.4.x.
        +-->
  @@ -106,9 +124,27 @@
   
   
     <!-- ========================================================================
  +   | Fail if JavaCC is required (and therefore we don't have it)
  +   +-->
  +  <target name="javacc.check" depends="prepare" if="javacc.required">
  +    <echo message="The JavaCC-generated sources for the Garbage parser are"/>
  +    <echo message="not up-to-date. The build system requires to re-generate"/>
  +    <echo message="the parser Java sources, but it appears that JavaCC is"/>
  +    <echo message="not currently available. Please check your classpath, and"/>
  +    <echo message="if you need to download JavaCC, please visit:"/>
  +    <echo message="    "/>
  +    <echo message="    http://www.experimentalstuff.com/Technologies/JavaCC"/>
  +    <echo message="    "/>
  +    <echo message="Then place a copy of the 'javacc.jar' java archive your"/>
  +    <echo message="'${dir.tools}' directory."/>
  +    <fail message="JavaCC unavailable"/>
  +  </target>
  +
  +
  +  <!-- ========================================================================
      | Invoke JavaCC to build the parser from the JJ Grammar.
      +-->
  -  <target name="javacc" depends="prepare" unless="javacc.uptodate">
  +  <target name="javacc" depends="javacc.check" unless="javacc.uptodate">
   
       <!--
        | Compile the parser from the original JavaCC grammar if necessary.
  
  
  
  1.1                  cocoon-2.1/src/scratchpad/garbage/tools/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  javacc.jar
  javacc-3.0.jar