Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 117 lines (104 sloc) 4.117 kb
<?xml version="1.0"?>
<project name="erjang" default="all">
<property name="erjang.version" value="0.1" />
<path id="erjang.classpath">
<pathelement location="target/classes/" />
<pathelement location="lib/js.jar" />
<pathelement location="lib/kilim-0.6-krab.jar" />
<pathelement location="lib/OtpErlang.jar" />
<pathelement location="lib/junit.jar" />
<pathelement location="lib/clojure-slim.jar" />
<pathelement location="lib/antlr-3.2.jar" />
<pathelement path="${java.class.path}" />
</path>
<path id="erjang.testwovenclasspath">
<pathelement location="target/classes/" />
<pathelement location="target/test-classes/" />
<pathelement location="lib/kilim-0.6-krab.jar" />
<pathelement location="lib/OtpErlang.jar" />
<pathelement location="lib/clojure-slim.jar" />
<pathelement location="lib/junit.jar" />
<pathelement location="lib/antlr-3.2.jar" />
<pathelement path="${java.class.path}" />
</path>
<target name="all" depends="clean,weave,jar" />
<target name="test" depends="all,testwoven" />
<target name="gen-interpreter">
<echo message="generating interpreter code" />
<exec dir="src/main/java/erjang/beam/interpreter" executable="perl" input="src/main/java/erjang/beam/interpreter/ops.spec" failonerror="yes">
<arg value="-W"/>
<arg value="gen_interpreter.pl"/>
</exec>
</target>
<target name="compile" depends="gen-interpreter">
<mkdir dir="target" />
<mkdir dir="target/classes" />
<mkdir dir="target/test-classes" />
<mkdir dir="target/test-beam" />
<mkdir dir="target/compiled" />
<echo message="Compiling src ===================" />
<javac debug="true" srcdir="src/main/java" destdir="target/classes" classpathref="erjang.classpath" deprecation="on" debuglevel="lines,vars,source"/>
</target>
<target name="testcompile" depends="compile">
<echo message="Compiling test ===================" />
<javac debug="true" srcdir="src/test/java" destdir="target/test-classes" classpathref="erjang.classpath" debuglevel="lines,vars,source"/>
</target>
<target name="weave" depends="testcompile">
<echo message="Weaving files ===================" />
<java classname="kilim.tools.Weaver" fork="yes">
<classpath refid="erjang.classpath" />
<assertions>
<enable />
</assertions>
<arg value="-d" />
<arg value="./target/classes" />
<arg line="./target/classes" />
</java>
<echo message="Weaving test classes ==============" />
<java classname="kilim.tools.Weaver" fork="yes">
<classpath refid="erjang.testwovenclasspath" />
<assertions>
<enable />
</assertions>
<arg value="-d" />
<arg value="./target/test-classes" />
<arg line="./target/test-classes" />
</java>
</target>
<target name="clean">
<echo message="deleting files" />
<delete>
<fileset defaultexcludes="no" dir="." includes="*~,#*,foo,bar,x,y" />
</delete>
<delete dir="./target" />
<delete dir="./.erj" />
</target>
<!-- This runs those tests depend on generated classes in testclasses-->
<target name="testwoven">
<echo message="Testing Tasks ======================" />
<java classname="junit.textui.TestRunner" fork="yes">
<classpath refid="erjang.testwovenclasspath" />
<assertions>
<enable />
</assertions>
<arg value="erjang.AllTests" />
</java>
</target>
<target name="jar" description="generate the distribution" depends="clean,weave">
<copy file="LICENSE" todir="classes/erjang" />
<copy file="NOTICE" todir="classes/erjang" />
<copy file="erjang_logo4.png" todir="classes/erjang" />
<jar jarfile="erjang-${erjang.version}.jar" basedir="target/classes">
<zipgroupfileset dir="lib" includes="*.jar">
<exclude name="junit.jar" />
<exclude name="asm-all-2.2.3.jar" />
</zipgroupfileset>
<exclude name="erjang/test/**" />
<exclude name="erjang/examples/**" />
<exclude name="erjang/bench/**" />
<manifest>
<attribute name="Main-Class" value="erjang.Main" />
</manifest>
</jar>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.