forked from Whiley/WhileyCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·154 lines (143 loc) · 5.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
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
<project name="whiley" default="build-all">
<import file="config.xml"/>
<!-- ============================================== -->
<!-- Build Commands -->
<!-- ============================================== -->
<target name="build-all">
<subant failonerror="true" target="build">
<fileset dir="modules" includes="wybs/build.xml"/>
<fileset dir="modules" includes="wyrl/build.xml"/>
<fileset dir="modules" includes="wycs/build.xml"/>
<fileset dir="modules" includes="wyil/build.xml"/>
<fileset dir="modules" includes="wyc/build.xml"/>
<fileset dir="modules" includes="wyrt/build.xml"/>
<fileset dir="modules" includes="wyjc/build.xml"/>
<fileset dir="modules" includes="wycc/build.xml"/>
</subant>
</target>
<!-- ============================================== -->
<!-- Documenation -->
<!-- ============================================== -->
<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/wyrl/src">
<include name="wyautl/**"/>
<include name="wyrl/**"/>
<exclude name="wyrl/testing/**"/>
</packageset>
<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.*"/>
<group title="Whiley Rewrite Language (WYRL)" packages="wyrl:wyrl.*:wyautl.*"/>
</javadoc>
</target>
<!-- ============================================== -->
<!-- Distribution -->
<!-- ============================================== -->
<target name="distjars" depends="build-all">
<subant failonerror="false" target="dist">
<fileset dir="modules" includes="*/build.xml"/>
</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/wyrl"/>
<include name="bin/wy_common.bash"/>
<include name="lib/*-v${version}.jar"/>
<include name="lib/jasm-v*.jar"/>
</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="clean">
<subant failonerror="false" target="clean">
<fileset dir="modules" includes="*/build.xml"/>
</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>
</delete>
</target>
</project>