comparison build.xml @ 786:f7df78989ac5

Generate MonetVersion.java rather than MonetDriver.java MonetDriver.java also contains code, MonetVersion only the generated values.
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Fri, 30 Jun 2023 11:55:48 +0200 (22 months ago)
parents e00866975421
children 6c2aa6fb034e
comparison
equal deleted inserted replaced
785:e00866975421 786:f7df78989ac5
240 <compilerarg line="${javac.flags}" /> 240 <compilerarg line="${javac.flags}" />
241 </javac> 241 </javac>
242 </target> 242 </target>
243 243
244 <!-- 244 <!--
245 This generates MonetDriver.java from its ".java.in" equivalent. 245 This generates MonetVersion.java from its ".java.in" equivalent.
246 It's required for importing the driver version properties. 246 It's required for importing the driver version properties.
247 --> 247 -->
248 <target name="driver" depends="prepare" unless="uptodate.drivers"> 248 <target name="driver" depends="prepare" unless="uptodate.drivers">
249 <tstamp> 249 <tstamp>
250 <format property="TODAY" pattern="yyyyMMdd" /> 250 <format property="TODAY" pattern="yyyyMMdd" />
260 <fail unless="JDBC_MAJOR" message="'JDBC_MAJOR' undefined. Please follow the directions in build.properties."/> 260 <fail unless="JDBC_MAJOR" message="'JDBC_MAJOR' undefined. Please follow the directions in build.properties."/>
261 <fail unless="JDBC_MINOR" message="'JDBC_MINOR' undefined. Please follow the directions in build.properties."/> 261 <fail unless="JDBC_MINOR" message="'JDBC_MINOR' undefined. Please follow the directions in build.properties."/>
262 <fail unless="JDBC_VER_SUFFIX" message="'JDBC_VER_SUFFIX' undefined. Please follow the directions in build.properties."/> 262 <fail unless="JDBC_VER_SUFFIX" message="'JDBC_VER_SUFFIX' undefined. Please follow the directions in build.properties."/>
263 263
264 <!-- now copy and filter the file --> 264 <!-- now copy and filter the file -->
265 <copy file="${srcdir}/${jdbc-package}/MonetDriver.java.in" 265 <copy file="${srcdir}/${jdbc-package}/MonetVersion.java.in"
266 overwrite="true" 266 overwrite="true"
267 tofile="${srcdir}/${jdbc-package}/MonetDriver.java" 267 tofile="${srcdir}/${jdbc-package}/MonetVersion.java"
268 filtering="yes" /> 268 filtering="yes" />
269 269
270 <echo message="Configured build for the ${JDBC_MAJOR}.${JDBC_MINOR} (${JDBC_VER_SUFFIX}) edition driver" /> 270 <echo message="Configured build for the ${JDBC_MAJOR}.${JDBC_MINOR} (${JDBC_VER_SUFFIX}) edition driver" />
271 </target> 271 </target>
272 272
310 <include name="${mcl-package}/**/*.java" /> 310 <include name="${mcl-package}/**/*.java" />
311 </srcfiles> 311 </srcfiles>
312 </uptodate> 312 </uptodate>
313 <condition property="uptodate.drivers"> 313 <condition property="uptodate.drivers">
314 <and> 314 <and>
315 <uptodate targetfile="${builddir}/src/${jdbc-package}/MonetDriver.java"> 315 <uptodate targetfile="${builddir}/src/${jdbc-package}/MonetVersion.java">
316 <srcfiles dir="${srcdir}"> 316 <srcfiles dir="${srcdir}">
317 <include name="build.properties" /> 317 <include name="build.properties" />
318 <include name="build.local.properties" /> 318 <include name="build.local.properties" />
319 <include name="${jdbc-package}/MonetDriver.java.in" /> 319 <include name="${jdbc-package}/MonetVersion.java.in" />
320 <include name="${jdbc-package}/**/*.java" /> 320 <include name="${jdbc-package}/**/*.java" />
321 </srcfiles> 321 </srcfiles>
322 </uptodate> 322 </uptodate>
323 </and> 323 </and>
324 </condition> 324 </condition>