-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
60 lines (51 loc) · 1.81 KB
/
build.xml
File metadata and controls
60 lines (51 loc) · 1.81 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
58
59
60
<project name="Compiler" default="jar" basedir=".">
<property environment="env" />
<property name="base_package_dir" value="edu/mit/compilers" />
<property name="base_package_name" value="edu.mit.compilers" />
<!-- Manually generated java files -->
<property name="src" location="src" />
<!-- Target Dir for compile -->
<property name="classes" location="classes" />
<!-- Jar directory -->
<property name="dist" location="dist" />
<!-- Binaries for tools, etc. -->
<property name="bin" location="bin" />
<!-- Directory containing tests -->
<property name="tests" location="tests" />
<!-- Build up a path structure for a classpath
that includes the binaries (jars) in bin/ and
the existing classpath. Not used now,
because the jflex and cup task define their own cp,
but could come in handly later. -->
<path id="binaries">
<pathelement location="${bin}" />
<fileset dir="${bin}">
<include name="**/*.jar" />
<include name="**/*.zip" />
</fileset>
<pathelement path="${java.class.path}" />
<pathelement path="${classes}" />
</path>
<target name="init">
<mkdir dir="${classes}" />
<mkdir dir="${dist}" />
</target>
<target name="compile" depends="init">
<javac srcdir="${src}" destdir="${classes}"
debug="on" includeantruntime="false">
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="${dist}/Compiler.jar" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="${base_package_name}.Main" />
</manifest>
</jar>
</target>
<!-- to clean, delete everything in the autogen, classes, and dist
directory -->
<target name="clean">
<delete dir="${classes}" />
<delete dir="${dist}" />
</target>
</project>