| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to you under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <project default="compile" basedir="../../../../../../.."> |
| |
| <!-- Set Properties --> |
| <!-- User settings --> |
| <property file="${user.home}/ant.properties"/> |
| <!-- Set property lib dir --> |
| <property name="properties.dir" value="tools/ant/properties"/> |
| <!-- Significant dirs --> |
| <property file="${properties.dir}/dirs.properties"/> |
| <!-- Compiler settings --> |
| <property file="${properties.dir}/defaultcompiler.properties"/> |
| <property file="${properties.dir}/${build.compiler}.properties"/> |
| <!-- Compile-time classpath properties files --> |
| <property file="${properties.dir}/extrapath.properties"/> |
| <property file="${properties.dir}/compilepath.properties"/> |
| |
| <property name="cur.dir" value="impl/sql"/> |
| |
| <!-- Targets --> |
| <target name="parser" > |
| <ant antfile="${src.dir}/build.xml" target="genParser"> |
| <property name="msg" value="Generating SQL parser..."/> |
| <property name="srcroot" value="engine"/> |
| <property name="directory" value="${derby.dir}/impl/sql/compile"/> |
| <property name="rmfiles" value="implparser_rm.files"/> |
| <property name="jjfile" value="sqlgrammar.jj"/> |
| <property name="chkfile" value="SQLParser.java"/> |
| <property name="constantsfile" value="SQLParserConstants"/> |
| </ant> |
| |
| <!-- |
| The following files were generated: |
| |
| CharStream.java |
| ParseException.java |
| SQLParser.java |
| SQLParserConstants.java |
| SQLParserTokenManager.java |
| Token.java |
| TokenMgrError.java |
| |
| 3 of those files are checked into the codeline: |
| |
| CharStream.java |
| ParseException.java |
| Token.java |
| |
| We don't want generated code to clash with the checked-in versions. So |
| we delete the conflicting classes here. |
| --> |
| <delete> |
| <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile"> |
| <include name="CharStream.java"/> |
| <include name="ParseException.java"/> |
| <include name="Token.java"/> |
| </fileset> |
| </delete> |
| |
| <!-- Reduce the visibility of these files from public to package. --> |
| <replaceregexp match="^public (class|interface)" replace="\1" flags="m"> |
| <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile"> |
| <include name="SQLParser.java"/> |
| <include name="SQLParserConstants.java"/> |
| <include name="SQLParserTokenManager.java"/> |
| <include name="TokenMgrError.java"/> |
| </fileset> |
| </replaceregexp> |
| |
| </target> |
| |
| <target name="compile" depends="parser"> |
| |
| <javac |
| source="${min.version}" |
| target="${min.version}" |
| nowarn="on" |
| debug="${debug}" |
| depend="${depend}" |
| deprecation="${deprecation}" |
| optimize="${optimize}" |
| proceed="${proceed}" |
| verbose="${verbose}" |
| srcdir="${derby.engine.src.dir}:${generated.src.dir}" |
| destdir="${out.dir}"> |
| <include name="${derby.dir}/${cur.dir}/**"/> |
| <compilerarg value="-Xlint:unchecked"/> |
| <compilerarg value="-Xlint:deprecation"/> |
| </javac> |
| |
| <copy file="${derby.engine.src.dir}/${derby.dir}/${cur.dir}/catalog/metadata_net.properties" tofile="${out.dir}/org/apache/derby/impl/sql/catalog/metadata_net.properties"/> |
| </target> |
| |
| </project> |
| |