Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 57 lines (50 sloc) 1.945 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
<project name="mjc" default="dist" basedir=".">
    <property name="javacc.home" value="lib" />
    <property name="src" value="src" />
    <property name="build" value="build" />
    <property name="dist" value="dist" />
    <property name="manifest" value="${build}/MANIFEST.MF" />
    <path id="classpath">
        <pathelement location="lib/jasmin.jar" />
    </path>

    <target name="setup">
        <mkdir dir="${build}" />
        <mkdir dir="${build}/src" />
        <mkdir dir="${build}/src/se" />
        <mkdir dir="${build}/src/se/helino" />
        <mkdir dir="${build}/src/se/helino/mjc" />
        <mkdir dir="${build}/src/se/helino/mjc/parser" />
        <mkdir dir="${build}/lib" />
        <mkdir dir="${build}/classes" />
        <mkdir dir="${dist}" />
    </target>

    <target name="javacc" depends="setup">
        <copy file="${src}/se/helino/mjc/parser/MJParser.jj"
              todir="${build}/src" />
        <javacc target="${build}/src/MJParser.jj"
                outputdirectory="${build}/src/se/helino/mjc/parser"
                javacchome="${javacc.home}" />
    </target>

    <target name="compile" depends="javacc">
        <javac srcdir="${src};${build}/src" destdir="${build}/classes"
               classpathref="classpath"
               includeantruntime="false"/>
    </target>

    <target name="manifest" depends="setup">
        <manifest file="${manifest}">
            <attribute name="Main-Class" value="se.helino.mjc.Main"/>
            <attribute name="Class-Path" value="." />
        </manifest>
    </target>

    <target name="dist" depends="compile, manifest">
        <jar jarfile="${dist}/mjc.jar"
            manifest="${manifest}">
            <fileset dir="${build}/classes" />
            <zipfileset src="lib/jasmin.jar" />
        </jar>
    </target>

    <target name="clean">
        <delete dir="${build}" />
        <delete dir="${dist}" />
    </target>

</project>
Something went wrong with that request. Please try again.