-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
171 lines (144 loc) · 5.67 KB
/
build.xml
File metadata and controls
171 lines (144 loc) · 5.67 KB
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
<project name="satin" default="build" basedir=".">
<description>
Build file for Satin
</description>
<property name="version" value="-2.2" />
<property name="dist-name" value="${ant.project.name}${version}" />
<property name="sources-filename" value="${ant.project.name}${version}-sources" />
<property name="external" location="external" />
<property name="javagat" value="${external}/javagat"/>
<property name="ipl" value="${external}/ipl"/>
<target name="build"
description="Build Satin"
depends="clean,copy-included-ipl,compile" />
<target name="build-external-ipl"
description="Build with external IPL"
depends="clean,copy-external-ipl,compile,javadoc" />
<property name="src" location="src" />
<property name="tmp" location="tmp" />
<property name="lib" location="lib" />
<property name="javadoc" location="javadoc" />
<property name="sources" location="sources" />
<!-- Copy dependancies to lib -->
<target name="copy-included-ipl">
<mkdir dir="${lib}" />
<copy todir="${lib}">
<fileset dir="${ipl}" />
</copy>
<copy todir="${lib}">
<fileset dir="${javagat}" />
</copy>
</target>
<!-- copy external dependancies to lib, including IPL
specified by $IPL_HOME -->
<target name="copy-external-ipl">
<mkdir dir="${lib}" />
<!-- Import environment properties -->
<property environment="env" />
<property name="ibis" location="${env.IPL_HOME}" />
<copy todir="${lib}">
<fileset dir="${ibis}/lib" />
</copy>
<copy todir="${lib}">
<fileset dir="${javagat}" />
</copy>
</target>
<!-- Compile -->
<target name="compile">
<mkdir dir="${tmp}" />
<mkdir dir="${lib}" />
<!-- copy jars in external directory to lib -->
<copy todir="${lib}">
<fileset dir="${external}" includes="*.jar" />
</copy>
<!-- classpath -->
<path id="default.classpath">
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>
<pathelement path="${tmp}" />
</path>
<!-- Compile the java code from ${src} into ${tmp} -->
<javac srcdir="${src}"
destdir="${tmp}"
includeantruntime="false"
debug="on"
classpathref="default.classpath">
<compilerarg value="-Xlint:unchecked" />
</javac>
<!-- Run Ibisc -->
<java classname="ibis.compile.Ibisc"
taskname="Ibisc"
failonerror="true"
dir="${tmp}"
maxmemory="512m"
fork="true">
<arg line=". -keep" />
<classpath refid="default.classpath" />
</java>
<!-- Extract ibis.io.Serializable, so that applications don't need ibis-io-2.3.3.jar to compile. -->
<unjar src="${lib}/ibis-io-2.3.3.jar" dest="${tmp}">
<patternset>
<include name="**/Serializable.class"/>
</patternset>
</unjar>
<!-- Create jar file -->
<jar destfile="lib/${dist-name}.jar">
<fileset dir="${tmp}" includes="**/*.class" />
<fileset dir="." includes="LICENSE.txt" />
<manifest>
<attribute name="Ibisc-Component"
value="ibis.satin.impl.rewriter.Satinc,ibis.satin.impl.syncrewriter.SyncAdviser,ibis.satin.impl.syncrewriter.SyncRewriter" />
</manifest>
</jar>
<delete dir="${tmp}" />
</target>
<!-- Generate javadoc -->
<target name="javadoc" description="generate all javadocs">
<javadoc destdir="${javadoc}"
access="public"
classpathref="default.classpath"
packagenames="*"
sourcepath="${src}"
windowtitle="Ibis ${ant.project.name} Documentation"
doctitle="Ibis ${ant.project.name} Documentation"
bottom="The Ibis project">
<link href="http://download.oracle.com/javase/1.5.0/docs/api/" />
</javadoc>
</target>
<target name="docs" description="Create manuals">
<ant dir="docs" inheritAll="false" />
</target>
<!-- Clean up everything -->
<target name="clean" description="Clean up">
<delete dir="${tmp}" />
<delete dir="${lib}" />
<delete dir="${javadoc}" />
<delete dir="${sources}" />
<ant dir="examples" inheritAll="false" target="clean" />
<ant dir="docs" inheritAll="false" target="clean" />
</target>
<target name="dist" depends="build,docs">
<ant dir="examples" inheritAll="false" />
<delete file="${dist-name}.zip" />
<delete dir="${sources}" />
<mkdir dir="${sources}" />
<zip destfile="${sources}/${sources-filename}.zip">
<zipfileset dir="src"
includes="**/*.java"
prefix="${sources-filename}" />
<zipfileset dir="."
includes="LICENSE.txt"
prefix="${sources-filename}" />
</zip>
<zip destfile="${dist-name}.zip">
<zipfileset dir="."
prefix="${dist-name}"
includes="javadoc/**,docs/*.pdf,lib/**,notices/**,sources/**,BUGS.txt,LICENSE.txt,HISTORY.txt,README.txt,INSTALL.txt,ibis.properties.example,log4j.properties,smartsockets.properties.example,examples/**,benchmarks/**"/>
<zipfileset dir="."
prefix="${dist-name}"
filemode="755"
includes="scripts/**" />
</zip>
</target>
</project>