-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
executable file
·90 lines (74 loc) · 3.33 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<project name="wystd" default="build">
<!-- ================================================================== -->
<!-- Configuration -->
<!-- ================================================================== -->
<import file="config.xml"/>
<!-- ================================================================== -->
<!-- Setup -->
<!-- ================================================================== -->
<target name="setup">
<mkdir dir="${BIN_DIR}"/>
<mkdir dir="${WYIL_DIR}"/>
<mkdir dir="${WYAL_DIR}"/>
<mkdir dir="${CLASS_DIR}"/>
<mkdir dir="${JS_DIR}"/>
</target>
<!-- ================================================================== -->
<!-- Build WyIL -->
<!-- ================================================================== -->
<target name="compile-wyil" depends="setup">
<wyc whileydir="${WHILEY_DIR}" verbose="true"
wyildir="${WYIL_DIR}" wyaldir="${WYAL_DIR}" verify="${wyc.verification}" vcg="${wyc.vcg}"/>
</target>
<!-- ================================================================== -->
<!-- Build JVM -->
<!-- ================================================================== -->
<target name="compile-jvm" depends="compile-wyil">
<wyjc whileydir="${WHILEY_DIR}" verbose="true"
wyildir="${WYIL_DIR}" classdir="${CLASS_DIR}"/>
<javac includeantruntime="false" srcdir="${JAVA_DIR}"
destdir="${CLASS_DIR}" includes="**/*.java">
<classpath>
<path refid="wyjc.jar"/>
</classpath>
</javac>
</target>
<!-- ================================================================== -->
<!-- Build JS -->
<!-- ================================================================== -->
<target name="compile-js" depends="compile-wyil">
<wyjs whileydir="${WHILEY_DIR}" verbose="true"
wyildir="${WYIL_DIR}" jsdir="${JS_DIR}"/>
</target>
<!-- ================================================================== -->
<!-- Build -->
<!-- ================================================================== -->
<target name="build" depends="compile-wyil">
<jar destfile="${LIB_DIR}/wystd-v${version}.jar">
<fileset dir="${WYIL_DIR}" includes="*/**/*.wyil"/>
<fileset dir="${WYAL_DIR}" includes="*/**/*.wyal"/>
<fileset dir="${CLASS_DIR}" includes="*/**/*.class"/>
</jar>
<echo message="============================================="/>
<echo message="BUILT: lib/${ant.project.name}-v${version}.jar"/>
<echo message="============================================="/>
</target>
<!-- ================================================================== -->
<!-- Deploy Plugin -->
<!-- ================================================================== -->
<target name="plugin" depends="build">
<copy file="${LIB_DIR}/wystd-v${version}.jar" todir="${WHILEYHOME}/lib"/>
</target>
<!-- ================================================================== -->
<!-- Clean -->
<!-- ================================================================== -->
<target name="clean">
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="bin" includes="**/*"/>
<fileset dir="bin"/>
</delete>
<echo message="============================================="/>
<echo message="CLEANED: ${ant.project.name}"/>
<echo message="============================================="/>
</target>
</project>