forked from CharlesZ-Chen/ReadChecker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
50 lines (42 loc) · 1.84 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
<project name="ReadChecker" basedir="." default="build-checker">
<property name="checker-framework" value="${basedir}/../checker-framework"/>
<property name="jsr308-langtools" value="${basedir}/../jsr308-langtools"/>
<property name="checker.bin" value="${basedir}/bin"/>
<property name="checker.src" value="${basedir}/src"/>
<property name="build.deps" value="${basedir}/build-deps"/>
<!-- <symlink link="${dir.top}/foo" resource="${dir.top}/subdir/bar.foo"/> -->
<target name="prep">
<mkdir dir="${checker.bin}"/>
<mkdir dir="${build.deps}"/>
<symlink link="${build.deps}/framework.jar" resource="${checker-framework}/framework/dist/framework.jar" overwrite="true"/>
<symlink link="${build.deps}/javac.jar" resource="${jsr308-langtools}/dist/lib/javac.jar" overwrite="true"/>
</target>
<target name="build-checker" depends="prep">
<pathconvert pathsep=":" property="build.classpath">
<path>
<fileset dir="${build.deps}">
<include name="*.jar"/>
</fileset>
</path>
</pathconvert>
<pathconvert pathsep=" " property="src.checker">
<path>
<fileset dir="${checker.src}">
<include name="**/*.java"/>
</fileset>
</path>
</pathconvert>
<java fork="true"
failonerror="true"
classpath="${build.classpath}"
classname="com.sun.tools.javac.Main">
<jvmarg line="-Xbootclasspath/p:${javac.lib}"/>
<arg value="-g"/>
<!-- To not get a warning about bootstrap classpath -->
<arg value="-Xlint:-options"/>
<arg line="-sourcepath ${checker.src}"/>
<arg line="-d ${checker.bin}"/>
<arg line="${src.checker}"/>
</java>
</target>
</project>