-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
236 lines (222 loc) · 7.19 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<project name="whiley" default="build-all">
<import file="config.xml"/>
<!-- ============================================== -->
<!-- Configuration -->
<!-- ============================================== -->
<!-- The set of build files in the order they should be built. -->
<filelist id="module.build.files" dir="modules">
<file name="wybs/build.xml"/>
<file name="wycs/build.xml"/>
<file name="wyil/build.xml"/>
<file name="wyc/build.xml"/>
<file name="wyrt/build.xml"/>
<file name="wyjc/build.xml"/>
<!--wyopcl-->
<file name="wyopcl/build.xml"/>
<!--wyboogie-->
<file name="wyboogie/build.xml"/>
</filelist>
<!-- ============================================== -->
<!-- Build Commands -->
<!-- ============================================== -->
<target name="build-all">
<subant failonerror="true" target="build">
<filelist refid="module.build.files"/>
</subant>
</target>
<!-- ============================================== -->
<!-- Documentation -->
<!-- ============================================== -->
<target name="doc">
<javadoc
destdir="docs/api"
author="true"
version="true"
use="true"
windowtitle="Whiley Compiler API">
<doctitle>
<![CDATA[<h1>The Whiley Compiler (v${version})</h1>]]></doctitle>
<bottom>
<![CDATA[<i>Copyright © 2011 David J. Pearce. All Rights Reserved.</i>]]></bottom>
<packageset dir="modules/wybs/src">
<include name="wyfs/**"/>
<include name="wybs/**"/>
<include name="wycc/**"/>
</packageset>
<packageset dir="modules/wycs/src">
<include name="wycs/**"/>
<exclude name="wycs/testing/**"/>
</packageset>
<packageset dir="modules/wyil/src">
<include name="wyil/**"/>
<include name="wyautl_old/**"/>
<exclude name="wyil/testing/**"/>
</packageset>
<packageset dir="modules/wyc/src">
<include name="wyc/**"/>
<exclude name="wyc/testing/**"/>
</packageset>
<packageset dir="modules/wyjc/src">
<include name="wyjc/**"/>
<include name="wyjvm/**"/>
<exclude name="wyjc/testing/**"/>
</packageset>
<!--
<packageset dir="modules/wycc/src">
<include name="wycc/**"/>
<exclude name="wycc/testing/**"/>
</packageset>
-->
<group title="Whiley Build System (WYBS)" packages="wybs:wyfs.*:wybs.*:wycc.*"/>
<group title="Whiley Compiler (WYC)" packages="wyc:wyc.*"/>
<group title="Whiley Intermediate Language (WYIL)" packages="wyil:wyil.*"/>
<group title="Whiley-2-Java Compiler (WYJC)" packages="wyjc:wyjc.*:wyjvm.*"/>
<!--<group title="Whiley-2-C Compiler (WYCC)" packages="wycc:wycc.*"/>-->
<group title="Whiley Constraint Solver (WYCS)" packages="wycs:wycs.*"/>
<!-- wyopcl -->
<group title="Whiley-2-OpenCL (WyOpCL)" packages="wyopcl:wyopcl.*" />
</javadoc>
</target>
<!-- ============================================== -->
<!-- Distribution -->
<!-- ============================================== -->
<target name="distjars" depends="build-all">
<subant failonerror="false" target="dist">
<filelist refid="module.build.files"/>
</subant>
</target>
<target name="distsrc" depends="build-all">
<mkdir dir="wdk-v${version}"/>
<copy todir="wdk-v${version}">
<fileset dir=".">
<include name="LICENSE"/>
<include name="README"/>
<include name="CONTRIBUTORS"/>
<include name="build.xml"/>
<include name="config.xml"/>
<include name="modules/**/*.java"/>
<include name="modules/**/*.whiley"/>
<include name="modules/**/*.wyrl"/>
<include name="modules/**/*.wycs"/>
<include name="modules/**/*.xml"/>
<include name="examples/**/*.whiley"/>
<include name="tests/**/*.whiley"/>
<include name="tests/**/*.sysout"/>
<include name="bin/wyilc"/>
<include name="bin/wyc"/>
<include name="bin/wyjc"/>
<include name="bin/wyj"/>
<include name="bin/wycc"/>
<include name="bin/wycs"/>
<include name="bin/wy_common.bash"/>
<include name="lib/*-v${version}.jar"/>
<include name="lib/wyrl-v*.jar"/>
<include name="lib/jasm-v*.jar"/>
<include name="lib/maven-ant-tasks*.jar"/>
<!-- wyopcl -->
<include name="bin/wyopcl" />
<!-- wyboogie -->
<include name="bin/wyboogie"/>
</fileset>
</copy>
<tar destfile="dist/wdk-src-v${version}.tar" longfile="gnu">
<tarfileset dir="." includes="wdk-v${version}/**/*"/>
<tarfileset dir="." filemode="755">
<include name="wdk-v${version}/bin/*"/>
</tarfileset>
</tar>
<gzip destfile="dist/wdk-src-v${version}.tgz" src="dist/wdk-src-v${version}.tar"/>
<delete file="dist/wdk-src-v${version}.tar"/>
<delete dir="wdk-v${version}"/>
<echo message="============================================="/>
<echo message="BUILT: dist/wdk-src-v${version}.tgz"/>
<echo message="============================================="/>
</target>
<target name="dist" depends="distsrc,distjars">
</target>
<!-- ============================================== -->
<!-- Misc Commands -->
<!-- ============================================== -->
<target name="test-all" depends="build-all">
<subant failonerror="true" target="test">
<filelist refid="module.build.files"/>
</subant>
</target>
<target name="clean">
<subant failonerror="false" target="clean">
<filelist refid="module.build.files"/>
</subant>
<delete includeEmptyDirs="true" failonerror="false">
<fileset file="*~"/>
<fileset dir="dist"/>
<fileset dir="docs"/>
<fileset dir="tests">
<include name="**/*.class"/>
<include name="**/*.wyil"/>
<include name="**/*.o"/>
</fileset>
<!--wyopcl-->
<fileset dir="build" />
<fileset dir="report" />
</delete>
</target>
<!-- ============================================== -->
<!-- Special Commands for Whiley2OpenCL project -->
<!-- ============================================== -->
<!--Test code generator with test cases -->
<target name="test-code" depends="clean, build-all">
<subant failonerror="true" target="test-code">
<filelist>
<!--wyopcl-->
<file name="modules/wyopcl/build.xml"/>
</filelist>
</subant>
</target>
<!--Test bound analysis with test cases -->
<target name="test-bound" depends="clean, build-all">
<subant failonerror="true" target="test-bound">
<filelist>
<!--wyopcl-->
<file name="modules/wyopcl/build.xml"/>
</filelist>
</subant>
</target>
<!--Test copy analysis with test cases -->
<target name="test-copy" depends="clean, build-all">
<subant failonerror="true" target="test-copy">
<filelist>
<!--wyopcl-->
<file name="modules/wyopcl/build.xml"/>
</filelist>
</subant>
</target>
<!--Test pattern matching with test cases -->
<target name="test-pattern" depends="clean, build-all">
<subant failonerror="true" target="test-pattern">
<filelist>
<!--wyopcl-->
<file name="modules/wyopcl/build.xml"/>
</filelist>
</subant>
</target>
<!--Test deallocation and copy analysis along with code generator -->
<target name="test-modelchecking" depends="clean, build-all">
<subant failonerror="true" target="test-modelchecking">
<filelist>
<!--wyopcl-->
<file name="modules/wyopcl/build.xml"/>
</filelist>
</subant>
</target>
<!-- ============================================== -->
<!-- Special Commands for Whiley2Boogie project -->
<!-- ============================================== -->
<!--Test the Boogie code generator with test cases -->
<target name="test-boogie" depends="clean, build-all">
<subant failonerror="true" target="test-boogie">
<filelist>
<file name="modules/wyboogie/build.xml"/>
</filelist>
</subant>
</target>
</project>