cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r761427 - /incubator/cassandra/trunk/build.xml
Date Thu, 02 Apr 2009 21:07:40 GMT
Author: jbellis
Date: Thu Apr  2 21:07:40 2009
New Revision: 761427

URL: http://svn.apache.org/viewvc?rev=761427&view=rev
Log:
don't re-run antlr unless the grammar changed.  patch by Per Mellqvist

Modified:
    incubator/cassandra/trunk/build.xml

Modified: incubator/cassandra/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/build.xml?rev=761427&r1=761426&r2=761427&view=diff
==============================================================================
--- incubator/cassandra/trunk/build.xml (original)
+++ incubator/cassandra/trunk/build.xml Thu Apr  2 21:07:40 2009
@@ -49,7 +49,13 @@
     <!--
        This generates the CLI grammar files from Cli.g
     -->
-    <target name="gen-cli-grammar">
+    <target name="check-gen-cli-grammar">
+        <uptodate property="cliUpToDate" 
+                srcfile="${build.src}/org/apache/cassandra/cli/Cli.g" 
+                targetfile="${build.src}/org/apache/cassandra/cli/Cli.tokens"/>
+    </target>
+ 
+    <target name="gen-cli-grammar" depends="check-gen-cli-grammar" unless="cliUpToDate">
       <echo>Building Grammar ${build.src}/org/apache/cassandra/cli/Cli.g  ....</echo>
       <java classname="org.antlr.Tool"
             classpath="${build.lib}/antlr-3.0.1.jar:${build.lib}/stringtemplate-3.0.jar:${build.lib}/antlr-2.7.7.jar"
@@ -61,7 +67,13 @@
     <!--
        This generates the CQL grammar files from Cql.g
     -->
-    <target name="gen-cql-grammar">
+    <target name="check-gen-cql-grammar">
+        <uptodate property="cqlUpToDate" 
+                srcfile="${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g" 
+                targetfile="${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.tokens"/>
+    </target>
+ 
+    <target name="gen-cql-grammar" depends="check-gen-cql-grammar" unless="cqlUpToDate">
       <echo>Building Grammar ${build.src}/org/apache/cassandra/cql/compiler/parse/Cql.g
 ....</echo>
       <java classname="org.antlr.Tool"
             classpath="${build.lib}/antlr-3.0.1.jar:${build.lib}/stringtemplate-3.0.jar:${build.lib}/antlr-2.7.7.jar"



Mime
View raw message