-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_old.xml
53 lines (47 loc) · 2.19 KB
/
build_old.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
<project name="MiniJava" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="src" location="${basedir}/src"/>
<property name="cup" location="${src}/cup"/>
<property name="jflex" location="${src}/jflex"/>
<property name="build" location="${basedir}/build"/>
<property name="tools" location="${basedir}/tools"/>
<taskdef name="jflex" classname="jflex.anttask.JFlexTask" classpath="${tools}/JFlex.jar" />
<taskdef name="cup" classname="java_cup.anttask.CUPTask" classpath="${tools}/java-cup-11b.jar" />
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="generate">
<jflex file="${jflex}/Scanner.jflex" destdir="${src}" />
<cup srcfile="${cup}/Parser.cup" destdir="${src}"
parser="Parser" interface="true" locations="false" />
</target>
<target name="compile" depends="init,generate"
description="compile the source">
<!-- Compile the Java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" debug="true">
<classpath>
<fileset dir="${tools}" includes="*.jar"/>
</classpath>
</javac>
</target>
<target name="dist" depends="compile"
description="generate the distribution">
<jar jarfile="mjavac.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="Main"/>
<attribute name="Class-Path" value="${tools}/java-cup-11b-runtime.jar ${tools}/java-cup-11b.jar ${tools}/jakarta.xml.bind-api-2.3.3.jar ${tools}/jaxb-impl-2.3.3.jar ${tools}/jakarta.activation-api-1.2.2.jar ${tools}/jaxb-jxc-2.3.3.jar"/>
</manifest>
</jar>
</target>
<target name="clean"
description="clean up">
<delete dir="${build}"/>
<delete file="${src}/Lexer.java"/>
<delete file="${src}/Parser.java"/>
<delete file="${src}/sym.java"/>
<delete file="mjavac.jar"/>
</target>
</project>