From 7a6181992739af1bcc3460210f77aa14b6dafcea Mon Sep 17 00:00:00 2001
From: Mark Taylor <m.b.taylor@bristol.ac.uk>
Date: Tue, 19 May 2015 12:41:14 +0100
Subject: [PATCH] fix ADQL build file to permit cross-compilation

You can now set the adql.bootclasspath system property to use
an alternative bootclasspath, for instance that for a different
JRE than that used by the compiler.

For instance, this cross-compiles to java 1.5:

   ant -Dant.build.javac.target=1.5
       -Dadql.bootclasspath=/usr/java/jdk1.5.0_22/jre/lib/rt.jar
       -f buildADQL.xml
       buildLib

Note the java used by ant has to be at least java 6 because of the
@Override source constructs on methods inherited from interfaces
(only methods from abstract or non-abstract classes can be annotated
with @Override in java 5).
---
 buildADQL.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildADQL.xml b/buildADQL.xml
index 9d87dab..26de09d 100644
--- a/buildADQL.xml
+++ b/buildADQL.xml
@@ -87,7 +87,7 @@
 	
 	<target name="compileLib" depends="clean,junitValidation" description="Build all the classes of the ADQL library. This target is particularly usefull because it lets highlighting missing dependencies.">
 		<mkdir dir="${compileDir}" />
-		<javac destdir="${compileDir}" srcdir="${srcDir}" includes="${includesList}" includeantruntime="false" encoding="utf8">
+		<javac destdir="${compileDir}" srcdir="${srcDir}" includes="${includesList}" includeantruntime="false" encoding="utf8" bootclasspath="${adql.bootclasspath}">
 			<classpath refid="adql.classpath" />
 		</javac>
 	</target>
-- 
GitLab