Skip to content

Apache Lucene open-source search software

LUCENE-1851: Change 'javacc' and 'clean-javacc' targets to build and clean contrib/surround files.

Michael Busch1f152463364e
diff --git a/CHANGES.txt b/CHANGES.txt
index ad264c1a141..be01212d54c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -818,6 +818,9 @@ Build
3. LUCENE-1529: Properly test "drop-in" replacement of jar with
backwards-compatibility tests. (Mike McCandless, Michael Busch)
+ 4. LUCENE-1851: Change 'javacc' and 'clean-javacc' targets to build
+ and clean contrib/surround files. (Luis Alves via Michael Busch)
+
Test Cases
1. LUCENE-1791: Enhancements to the QueryUtils and CheckHits utility
diff --git a/build.xml b/build.xml
index fae44b76e6e..5afe3aadf08 100644
--- a/build.xml
+++ b/build.xml
@@ -552,14 +552,18 @@
outputfile="${build.dir}/docs/grammars/QueryParser.html"
javacchome="${javacc.home}"
/>
- <jjdoc target="src/java/org/apache/lucene/analysis/standard/StandardTokenizer.jj"
- outputfile="${build.dir}/docs/grammars/StandardTokenizer.html"
- javacchome="${javacc.home}"
- />
<jjdoc target="src/demo/org/apache/lucene/demo/html/HTMLParser.jj"
outputfile="${build.dir}/docs/grammars/HTMLParser.html"
javacchome="${javacc.home}"
/>
+ <jjdoc target="contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj"
+ outputfile="${build.dir}/docs/grammars/Surround_QueryParser.html"
+ javacchome="${javacc.home}"
+ />
+ <jjdoc target="contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser/StandardSyntaxParser.jj"
+ outputfile="${build.dir}/docs/grammars/StandardSyntaxParser.html"
+ javacchome="${javacc.home}"
+ />
</target>
<target name="clean-javacc">
@@ -571,6 +575,9 @@
<fileset dir="src/java/org/apache/lucene/queryParser" includes="*.java">
<containsregexp expression="Generated.*By.*JavaCC"/>
</fileset>
+ <fileset dir="contrib/surround/src/java/org/apache/lucene/queryParser/surround/parser" includes="*.java">
+ <containsregexp expression="Generated.*By.*JavaCC"/>
+ </fileset>
<fileset dir="contrib/queryparser/src/java/org/apache/lucene/queryParser/standard/parser" includes="*.java">
<containsregexp expression="Generated.*By.*JavaCC"/>
</fileset>
@@ -580,13 +587,13 @@
</delete>
</target>
- <target name="javacc" depends="clean-javacc,javacc-QueryParser,javacc-HTMLParser,javacc-contrib-queryparser"/>
+ <target name="javacc" depends="clean-javacc,javacc-QueryParser,javacc-HTMLParser,javacc-contrib-queryparser, javacc-contrib-surround"/>
<target name="javacc-QueryParser" depends="init,javacc-check" if="javacc.present">
<invoke-javacc target="src/java/org/apache/lucene/queryParser/QueryParser.jj"
outputDir="src/java/org/apache/lucene/queryParser"
/>
- </target>
+ </target>
<target name="javacc-HTMLParser" depends="init,javacc-check" if="javacc.present">
<invoke-javacc target="src/demo/org/apache/lucene/demo/html/HTMLParser.jj"
@@ -600,6 +607,13 @@
antfile="build.xml"
/>
</target>
+
+ <target name="javacc-contrib-surround" depends="init,javacc-check" if="javacc.present">
+ <ant target="javacc"
+ dir="contrib/surround"
+ antfile="build.xml"
+ />
+ </target>
<!-- ================================================================== -->
<!-- Build the JFlex files into the source tree -->
diff --git a/contrib/surround/build.xml b/contrib/surround/build.xml
index df316783f42..37584dd6a04 100644
--- a/contrib/surround/build.xml
+++ b/contrib/surround/build.xml
@@ -25,9 +25,9 @@
<import file="../contrib-build.xml"/>
- <target name="javacc">
+ <target name="javacc" depends="init,javacc-check" if="javacc.present">
<invoke-javacc target="src/java/org/apache/lucene/queryParser/surround/parser/QueryParser.jj"
- outputDir="${build.dir}/gen/org/apache/lucene/queryParser/surround/parser"
+ outputDir="src/java/org/apache/lucene/queryParser/surround/parser"
/>
</target>
</project>