aboutsummaryrefslogtreecommitdiffstats
path: root/make/build.xml
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2014-05-31 14:46:01 -0700
committerHarvey Harrison <[email protected]>2014-05-31 14:46:01 -0700
commit38e34f378a97f3653ad160e49677a005b6f7a32f (patch)
tree03d7f3c4c5eade0e5109a43d4b38a36766782461 /make/build.xml
parent0e54f57338e888e9835069776de32dcb47c54a17 (diff)
gluegen: update the target names for generating java code
Also move the antlr-wrapping targets to be near the one place they are used. Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'make/build.xml')
-rw-r--r--make/build.xml90
1 files changed, 45 insertions, 45 deletions
diff --git a/make/build.xml b/make/build.xml
index 1a88480..1308f18 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -157,36 +157,6 @@
</target>
<target name="init.debug" depends="set.debug, init"/>
- <!--
- - Using ANTLR generate the specified Java files.
- -
- - @param target the grammar file to process
- - @param output.dir the directory to write the generated files to. If
- - the directory does not exist, it will be created.
- -->
- <target name="generate.grammar">
- <!-- Generate the Java files -->
- <antlr target="${output.dir}/${target}" outputdirectory="${output.dir}">
- <classpath refid="antlr.classpath" />
- </antlr>
- </target>
-
- <!--
- - Using ANTLR generate the specified Java files with an overridden
- - grammar file.
- -
- - @param target the grammar file to process
- - @param glib the overridding grammar file
- - @param output.dir the directory to write the generated files to. If
- - the directory does not exist, it will be created.
- -->
- <target name="generate.c.grammar.glib">
- <!-- Generate the Java files -->
- <antlr target="${output.dir}/${target}" glib="${output.dir}/${glib}" outputdirectory="${output.dir}">
- <classpath refid="antlr.classpath" />
- </antlr>
- </target>
-
<property name="gluegen.root" value="../" />
<!-- Use GlueGen to generate the source code for the ElfHeader
@@ -649,6 +619,36 @@
</condition>
</target>
+ <!--
+ - Using ANTLR generate the specified Java files.
+ -
+ - @param target the grammar file to process
+ - @param output.dir the directory to write the generated files to. If
+ - the directory does not exist, it will be created.
+ -->
+ <target name="generate.java">
+ <!-- Generate the Java files -->
+ <antlr target="${output.dir}/${target}" outputdirectory="${output.dir}">
+ <classpath refid="antlr.classpath" />
+ </antlr>
+ </target>
+
+ <!--
+ - Using ANTLR generate the specified Java files with an overridden
+ - grammar file.
+ -
+ - @param target the grammar file to process
+ - @param override the overridding grammar file
+ - @param output.dir the directory to write the generated files to. If
+ - the directory does not exist, it will be created.
+ -->
+ <target name="generate.java.override">
+ <!-- Generate the Java files -->
+ <antlr target="${output.dir}/${target}" glib="${output.dir}/${override}" outputdirectory="${output.dir}">
+ <classpath refid="antlr.classpath" />
+ </antlr>
+ </target>
+
<target name="gluegen.build.javase">
<!-- Because ANTLR looks for importVocab files in the current
working directory, it likes to have all of its files,
@@ -669,32 +669,32 @@
</copy>
<!-- Generate the Java files from the C grammar using ANTLR. -->
- <antcall target="generate.grammar" inheritRefs="true">
+ <antcall target="generate.java" inheritRefs="true">
<param name="output.dir" value="${c.grammar.out.dir}" />
- <param name="target" value="StdCParser.g" />
+ <param name="target" value="StdCParser.g" />
</antcall>
- <antcall target="generate.c.grammar.glib" inheritRefs="true">
+ <antcall target="generate.java.override" inheritRefs="true">
<param name="output.dir" value="${c.grammar.out.dir}" />
- <param name="target" value="GnuCParser.g" />
- <param name="glib" value="StdCParser.g" />
+ <param name="target" value="GnuCParser.g" />
+ <param name="override" value="StdCParser.g" />
</antcall>
- <antcall target="generate.grammar" inheritRefs="true">
+ <antcall target="generate.java" inheritRefs="true">
<param name="output.dir" value="${c.grammar.out.dir}" />
- <param name="target" value="GnuCTreeParser.g" />
+ <param name="target" value="GnuCTreeParser.g" />
</antcall>
- <antcall target="generate.c.grammar.glib" inheritRefs="true">
+ <antcall target="generate.java.override" inheritRefs="true">
<param name="output.dir" value="${c.grammar.out.dir}" />
- <param name="target" value="GnuCEmitter.g" />
- <param name="glib" value="GnuCTreeParser.g" />
+ <param name="target" value="GnuCEmitter.g" />
+ <param name="override" value="GnuCTreeParser.g" />
</antcall>
- <antcall target="generate.c.grammar.glib" inheritRefs="true">
+ <antcall target="generate.java.override" inheritRefs="true">
<param name="output.dir" value="${c.grammar.out.dir}" />
- <param name="target" value="HeaderParser.g" />
- <param name="glib" value="GnuCTreeParser.g" />
+ <param name="target" value="HeaderParser.g" />
+ <param name="override" value="GnuCTreeParser.g" />
</antcall>
- <antcall target="generate.grammar" inheritRefs="true">
+ <antcall target="generate.java" inheritRefs="true">
<param name="output.dir" value="${j.grammar.out.dir}" />
- <param name="target" value="JavaParser.g" />
+ <param name="target" value="JavaParser.g" />
</antcall>
<!-- Build GlueGen using the generated Java files along with the