Skip to content

Instantly share code, notes, and snippets.

Created January 14, 2013 12:31
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 anonymous/4529740 to your computer and use it in GitHub Desktop.
Save anonymous/4529740 to your computer and use it in GitHub Desktop.
ant build script
<?xml version="1.0" encoding="UTF-8"?>
<project name="nqp-jvm" basedir="." default="build">
<property name="src" location="src" />
<property name="build.dir" location="bin" />
<property name="dist" location="dist" />
<path id="project.classpath">
<fileset dir="3rdparty">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init-with-nqp" depends="clean">
<exec executable="nqp">
<arg line="--target=pir --output=JASTNodes.pir" />
<arg path="lib/JAST/Nodes.nqp" />
</exec>
<exec executable="parrot">
<arg line="-o JASTNodes.pbc" />
<arg path="JASTNodes.pir" />
</exec>
<exec executable="nqp">
<arg line="--target=pir --output=QASTJASTCompiler.pir" />
<arg path="lib/QAST/JASTCompiler.nqp" />
</exec>
<exec executable="parrot">
<arg line="-o QASTJASTCompiler.pbc" />
<arg path="QASTJASTCompiler.pir" />
</exec>
<exec executable="nqp">
<arg line="--target=pir --output=herlper.pir" />
<arg path="t/helper.nqp" />
</exec>
<exec executable="parrot">
<arg line="-o helper.pbc" />
<arg path="helper.pir" />
</exec>
</target>
<target name="build" depends="init-with-nqp">
<javac classpathref="project.classpath">
<include name="**/*.java" srcdir="${src.dir}" destdir="${build.dir}" />
</javac>
</target>
<target name="package" depends="build">
<mkdir dir="${dist}" />
<jar jarfile="${dist}/${ant.project.name}.jar" basedir="${build.dir}" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${dist}" />
<delete>
<include name="**/*.pir" />
<include name="**/*.pbc" />
</delete>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment