Skip to content

Instantly share code, notes, and snippets.

@abyx
Created March 24, 2012 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abyx/2182506 to your computer and use it in GitHub Desktop.
Save abyx/2182506 to your computer and use it in GitHub Desktop.
<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