-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
61 lines (58 loc) · 2.5 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- SCC Ant build file
@author Daniel Hillerström (dhil)
@description This file is a (mostly) generic ant build file for your SCC project.
You might have to change the value of the attribute "name" inside
the "project"-tag below. The value should the name of your project.
You can import this build file into Eclipse or IntelliJ.
In addition, you can use it directly from the commandline:
$ ant build
The above command will build your compiler. Ant will create
and output your compiler in directory called "bin".
After a successful build you can run your compiler by typing
$ java -cp bin Main
To clean "bin" simply type
$ ant clean
on the commandline.
-->
<!-- Replace the value of the attribute "name" with the name of YOUR project. -->
<project basedir="." default="build" name="comp520-coursework-w2023">
<!-- You do not need to touch anything below this comment -->
<property name="src" location="src/java"/>
<property name="bin" location="bin"/>
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="17"/>
<property name="source" value="17"/>
<target name="init">
<tstamp/>
<mkdir dir="${bin}"/>
<copy includeemptydirs="false" todir="${bin}">
<fileset dir="${src}">
<exclude name="**/*.launch"/>
<exclude name="**/*.java"/>
<exclude name="**/*.class"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${bin}"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-subprojects,build-project" name="build"/>
<target name="build-subprojects"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" excludes="test/**" debuglevel="${debuglevel}" destdir="bin" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<compilerarg value="--enable-preview" />
<compilerarg value="-Xlint:unchecked" />
</javac>
</target>
<target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
<target name="Main">
<java classname="Main" failonerror="true" fork="yes" classpath="${bin}">
<arg line="-parser tests/simple.c tests/simple.out"/>
</java>
</target>
</project>