summaryrefslogtreecommitdiffstats
path: root/make/build-gluegen.xml
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2004-04-07 20:52:41 +0000
committerKenneth Russel <[email protected]>2004-04-07 20:52:41 +0000
commit7c00238d2df867a2a8e32c4edb7347b8bb0cb584 (patch)
treea1c205ad7c3b6c20581bf58a06e0c5ad264b361b /make/build-gluegen.xml
parent0a7c6d77aab5b922f3225ed8ed6076f8ee984ab6 (diff)
Fixed Issue 70: JOGL build broken with Ant 1.6
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@91 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/build-gluegen.xml')
-rw-r--r--make/build-gluegen.xml51
1 files changed, 28 insertions, 23 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>