Skip to content

Instantly share code, notes, and snippets.

@abyx
Created Mar 24, 2012
Embed
What would you like to do?
<target name="compile" depends="compile-grammar">
<javac srcdir="${src}" destdir="${build}">
<classpath refid="classpath.base"/>
</javac>
</target>
<target name="compile-grammar" depends="-check_grammar_needs_compile"
if="grammarBuildRequired">
<java classname="org.antlr.Tool" failonerror="true">
<arg value="${grammar-file}"/>
<classpath refid="classpath.antlr"/>
</java>
</target>
<target name="-check_grammar_needs_compile">
<uptodate property="grammarBuildRequired" targetfile="${grammar-file}"
srcfile="${grammar-java-file}"/>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment