This patch correct the problem of having to copy the whole source tree
to ant.build.
Copying the whole source would make the development more difficlt,
especially with tools like Emacs which would go directly to the
compilation error. In the case of copying the source tree, the
compilation error point to the copy instead of the original.
David LI
DigitalSesame
Index: build.xml
===================================================================
RCS file: /home/topware/cvsroot/Tools/Lucene/Attic/build.xml,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 build.xml
--- build.xml 2001/07/02 18:46:25 1.1.2.6
+++ build.xml 2001/07/02 19:24:47
@@ -142,25 +142,23 @@
<!-- Compiles the source directory -->
<!-- ================================================================== -->
<target name="compile" depends="init,javacc_check" if="javacc.present">
- <copy todir="${build.src}">
- <fileset dir="${src.dir}">
- <include name="com/**/*.java"/>
- <include name="com/**/*.jj"/>
- </fileset>
- </copy>
+
+ <mkdir dir="${build.src}/com/lucene/analysis/standard"/>
<javacc target="${src.dir}/com/lucene/analysis/standard/StandardTokenizer.jj"
javacchome="${javacc.zip.dir}"
outputdirectory="${build.src}/com/lucene/analysis/standard"/>
+ <delete file="${build.src}/com/lucene/analysis/standard/ParseException.java"/>
+
+ <mkdir dir="${build.src}/com/lucene/queryParser"/>
<javacc target="${src.dir}/com/lucene/queryParser/QueryParser.jj"
javacchome="${javacc.zip.dir}"
outputdirectory="${build.src}/com/lucene/queryParser"/>
- <javac srcdir="${build.src}"
- includes="**/*.java"
+ <javac srcdir="${src.dir}:${build.src}"
+ includes="com/**/*.java"
destdir="${build.classes}"
- debug="${debug}">
- <classpath refid="classpath"/>
- </javac>
+ debug="${debug}"
+ classpathref="classpath"/>
</target>
<!-- ================================================================== -->