aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/build-gluegen.xml51
-rw-r--r--make/build.xml31
2 files changed, 49 insertions, 33 deletions
diff --git a/make/build-gluegen.xml b/make/build-gluegen.xml
index a12f668ab..b9e522d3c 100644
--- a/make/build-gluegen.xml
+++ b/make/build-gluegen.xml
@@ -42,29 +42,42 @@
- Build GlueGen.
-->
<target name="build.gluegen" depends="declare">
+
+ <!-- Because ANTLR looks for importVocab files in the current
+ working directory, it likes to have all of its files,
+ including supergrammars, in one place, so copy all of the
+ grammars to the output directory up front so we don't put
+ temporary files into the source tree -->
+ <mkdir dir="${generated.java.from.grammar}" />
+ <copy todir="${generated.java.from.grammar}">
+ <fileset dir="${c.grammar}">
+ <include name="*.g" />
+ </fileset>
+ </copy>
+
<!-- Generate the Java files from the C grammar using ANTLR. -->
<antcall target="generate.c.grammar">
- <param name="target" value="${c.grammar}/StdCParser.g" />
- <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="target" value="StdCParser.g" />
</antcall>
<antcall target="generate.c.grammar.glib">
- <param name="target" value="${c.grammar}/GnuCParser.g" />
- <param name="glib" value="${c.grammar}/StdCParser.g" />
- <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="target" value="GnuCParser.g" />
+ <param name="glib" value="StdCParser.g" />
</antcall>
<antcall target="generate.c.grammar">
- <param name="target" value="${c.grammar}/GnuCTreeParser.g" />
- <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="target" value="GnuCTreeParser.g" />
</antcall>
<antcall target="generate.c.grammar.glib">
- <param name="target" value="${c.grammar}/GnuCEmitter.g" />
- <param name="glib" value="${c.grammar}/GnuCTreeParser.g" />
- <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="target" value="GnuCEmitter.g" />
+ <param name="glib" value="GnuCTreeParser.g" />
</antcall>
<antcall target="generate.c.grammar.glib">
- <param name="target" value="${c.grammar}/HeaderParser.g" />
- <param name="glib" value="${c.grammar}/GnuCTreeParser.g" />
- <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="output.dir" value="${generated.java.from.grammar}" />
+ <param name="target" value="HeaderParser.g" />
+ <param name="glib" value="GnuCTreeParser.g" />
</antcall>
<!-- Ensure that the output classes directory exists. -->
@@ -94,12 +107,8 @@
- the directory does not exist, it will be created.
-->
<target name="generate.c.grammar" depends="declare">
- <!-- Ensure that the output directory exists.
- - NOTE: this will ignore silently if the directory already exists. -->
- <mkdir dir="${output.dir}" />
-
<!-- Generate the Java files -->
- <antlr target="${target}" outputdirectory="${output.dir}">
+ <antlr target="${output.dir}/${target}" outputdirectory="${output.dir}">
<classpath refid="antlr.classpath" />
</antlr>
</target>
@@ -114,12 +123,8 @@
- the directory does not exist, it will be created.
-->
<target name="generate.c.grammar.glib" depends="declare">
- <!-- Ensure that the output directory exists.
- - NOTE: this will ignore silently if the directory already exists. -->
- <mkdir dir="${output.dir}" />
-
<!-- Generate the Java files -->
- <antlr target="${target}" glib="${glib}" outputdirectory="${output.dir}">
+ <antlr target="${output.dir}/${target}" glib="${output.dir}/${glib}" outputdirectory="${output.dir}">
<classpath refid="antlr.classpath" />
</antlr>
</target>
diff --git a/make/build.xml b/make/build.xml
index 59109924f..978ab1b9e 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -248,9 +248,7 @@
<property name="java.includes.dir.platform" value="${java.includes.dir.win32}" />
<property name="java.lib.dir.platform" value="${java.lib.dir.win32}" />
<property name="java.excludes.platform" value="${java.excludes.win32}" />
- <dirset id="stub.includes.fileset.platform" dir=".">
- <include name="${stub.includes.dir}/win32/**" />
- </dirset>
+ <property name="stub.includes.fileset.platform.params" value="${stub.includes.dir}/win32/**" />
<!-- Set Javadoc properties. -->
<property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.win32}" />
@@ -338,10 +336,7 @@
<!-- Set platform directories. -->
<property name="stub.includes.platform" value="${stub.includes.x11}" />
<property name="java.excludes.platform" value="${java.excludes.x11}" />
- <dirset id="stub.includes.fileset.platform" dir=".">
- <include name="${stub.includes.dir}/opengl/**" />
- <include name="${stub.includes.dir}/x11/**" />
- </dirset>
+ <property name="stub.includes.fileset.platform.params" value="${stub.includes.dir}/opengl/** ${stub.includes.dir}/x11/**" />
<!-- Set Javadoc properties. -->
<property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.x11}" />
@@ -392,6 +387,12 @@
</target>
<target name="declare.macosx" depends="init">
+ <echo message="*************************************" />
+ <echo message="* *" />
+ <echo message="* EXECUTING DECLARE.MACOSX *" />
+ <echo message="* *" />
+ <echo message="*************************************" />
+
<!-- Set platform configuration files. -->
<property name="gl.cfg" value="${config}/gl-macosx.cfg" />
<property name="gl.impl.cfg" value="${config}/gl-impl-macosx.cfg" />
@@ -406,9 +407,7 @@
<property name="java.includes.dir.platform" value="${java.includes.dir.macosx}" />
<property name="java.lib.dir.platform" value="${java.lib.dir.macosx}" />
<property name="java.excludes.platform" value="${java.excludes.macosx}" />
- <dirset id="stub.includes.fileset.platform" dir=".">
- <include name="${stub.includes.dir}/macosx/**" />
- </dirset>
+ <property name="stub.includes.fileset.platform.params" value="${stub.includes.dir}/macosx/**" />
<!-- Set Javadoc properties. -->
<property name="javadoc.dev.packagenames.platform" value="${javadoc.dev.packagenames.macosx}" />
@@ -527,6 +526,7 @@
- Java files -->
<!-- Generate GL interface class -->
+ <echo message="Generating GL interface class" />
<gluegen src="${stub.includes.common}/gl.c"
config="${gl.cfg}"
includeRefid="stub.includes.fileset.all"
@@ -535,6 +535,7 @@
</gluegen>
<!-- Generate GL implementation class -->
+ <echo message="Generating GL implementation class" />
<gluegen src="${stub.includes.common}/gl-impl.c"
config="${gl.impl.cfg}"
includeRefid="stub.includes.fileset.all"
@@ -543,6 +544,7 @@
</gluegen>
<!-- Generate WGL interface class -->
+ <echo message="Generating WGL interface class" />
<gluegen src="${stub.includes.common}/gl-impl.c"
config="${config}/gl-wgl-win32.cfg"
includeRefid="stub.includes.fileset.all"
@@ -551,6 +553,7 @@
</gluegen>
<!-- Generate GLX interface class -->
+ <echo message="Generating GLX interface class" />
<gluegen src="${stub.includes.common}/gl-impl.c"
config="${config}/gl-glx-x11.cfg"
includeRefid="stub.includes.fileset.all"
@@ -559,6 +562,7 @@
</gluegen>
<!-- Generate CGL interface class -->
+ <echo message="Generating CGL interface class" />
<gluegen src="${stub.includes.common}/gl-impl.c"
config="${config}/gl-cgl-macosx.cfg"
includeRefid="stub.includes.fileset.all"
@@ -570,6 +574,9 @@
<!-- NOTE: the "literalInclude" in this GlueGen call is simply to
- get around the fact that neither FileSet nor DirSet can
- handle different drives in an effective manner. -->
+ <echo message="Generating JAWT interface class" />
+ <echo message="java.home.dir=${java.home.dir}" />
+ <dirset id="stub.includes.fileset.platform" dir="." includes="${stub.includes.fileset.platform.params}" />
<gluegen src="${java.includes.dir.platform}/jawt_md.h"
config="${jawt.cfg}"
literalInclude="${java.includes.dir}"
@@ -579,6 +586,7 @@
</gluegen>
<!-- Generate WGL/GLX/CGL implementation class -->
+ <echo message="Generating WGL/GLX/CGL implementation class" />
<gluegen src="${stub.includes.platform}/window-system.c"
config="${window.cfg}"
includeRefid="stub.includes.fileset.platform"
@@ -587,6 +595,7 @@
</gluegen>
<!-- Generate StaticGLInfo class -->
+ <echo message="Generating StaticGLInfo class" />
<staticglgen package="net.java.games.jogl.impl"
headers="${gl.headers}"
outputdir="${src.generated.java}/net/java/games/jogl/impl">
@@ -594,6 +603,7 @@
</staticglgen>
<!-- Generate GLU interface class -->
+ <echo message="Generating GLU interface class" />
<gluegen src="${stub.includes.common}/glu.c"
config="${glu.cfg}"
includeRefid="stub.includes.fileset.all"
@@ -602,6 +612,7 @@
</gluegen>
<!-- Generate GLU implementation class -->
+ <echo message="Generating GLU implementation class" />
<gluegen src="${stub.includes.common}/glu-impl.c"
config="${glu.impl.cfg}"
includeRefid="stub.includes.fileset.all"