-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
65 lines (50 loc) · 1.64 KB
/
build.xml
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
58
59
60
61
62
63
64
65
<project name="MiniJava" basedir="." default="main">
<property name="src.dir" value="src"/>
<property name="lib.dir" value="lib"/>
<property name="mjcSrc.dir" value="${src.dir}/mjc/"/>
<property name="build.dir" value="build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<property name="main-class" value="mjc.JVMMain"/>
<target name="clean">
<delete dir="${build.dir}"/>
<delete file="mjc.jar"/>
<delete dir="${src.dir}/mjc/"/>
</target>
<target name="createFolder">
<mkdir dir="${mjcSrc.dir}"/>
</target>
<target name="grammar" depends="clean,createFolder">
<javacc
target="${src.dir}/javacc/minijava1.0.jj"
outputdirectory="${mjcSrc.dir}"
javacchome="${lib.dir}"
debugparser="false" />
</target>
<target name="compile" depends="grammar">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${src.dir}" destdir="${classes.dir}"/>
</target>
<target name="jar" depends="compile">
<jar destfile="mjc.jar" basedir="${classes.dir}">
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java jar="${jar.dir}/${ant.project.name}.jar" fork="true"/>
</target>
<target name="clean-build" depends="clean,jar"/>
<target name="test">
<exec executable="/bin/sh">
<arg value="./komp14-testsuite/run.sh"/>
</exec>
</target>
<target name="submit" depends="clean">
<exec executable="/bin/sh">
<arg value="./runtigrissubmit.sh"/>
</exec>
</target>
<target name="clean-test" depends="clean-build,test"/>
<target name="main" depends="jar,test"/>
</project>