-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
170 lines (144 loc) · 5.62 KB
/
build.xml
File metadata and controls
170 lines (144 loc) · 5.62 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
<project name="rmi" default="build" basedir=".">
<description>
Build file for Ibis RMI implementation
</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" />
<target name="build"
description="Build with included IPL"
depends="clean,copy-included-ipl,compile,javadoc" />
<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="external" location="external" />
<property name="javadoc" location="javadoc" />
<property name="sources" location="sources" />
<!-- copy external dependancies to lib, including provided IPL -->
<target name="copy-included-ipl">
<mkdir dir="${lib}" />
<copy todir="${lib}">
<fileset dir="${external}/ipl" />
</copy>
</target>
<!-- copy external dependancies to lib, including IPL
specified by $IPL_HOME -->
<target name="copy-external-ipl">
<!-- Import environment properties -->
<property environment="env" />
<property name="ipl" location="${env.IPL_HOME}" />
<mkdir dir="${lib}" />
<copy todir="${lib}">
<fileset dir="${ipl}/lib" />
</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>
<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}"
debug="on"
includeantruntime="false"
classpathref="default.classpath">
<compilerarg value="-Xlint:unchecked" />
</javac>
<!-- Run Rmic on RegistryImpl -->
<java classname="ibis.rmi.impl.frontend.Rmic"
taskname="Rmic"
failonerror="true"
dir="${tmp}"
maxmemory="512m"
fork="true">
<arg line="-dir ibis.rmi.registry.impl.RegistryImpl" />
<classpath refid="default.classpath" />
</java>
<javac destdir="${tmp}"
debug="true"
srcdir="${tmp}"
includeantruntime="false"
includes="ibis/rmi/registry/impl/*.java">
<classpath refid="default.classpath" />
</javac>
<!-- Run Ibisc -->
<java classname="ibis.compile.Ibisc"
taskname="Ibisc"
failonerror="true"
dir="${tmp}"
maxmemory="512m"
fork="true">
<arg line="." />
<classpath refid="default.classpath" />
</java>
<!-- Create jar file -->
<jar destfile="${lib}/${dist-name}.jar"
basedir="${tmp}"
includes="**/*.class">
<manifest>
<attribute name="Ibisc-Component"
value="ibis.rmi.impl.frontend.Rmic" />
</manifest>
</jar>
<delete dir="${tmp}" />
</target>
<!-- Generate javadoc -->
<target name="javadoc" description="generate all javadocs">
<javadoc destdir="${javadoc}"
access="public"
classpathref="default.classpath"
packagenames="ibis.rmi,ibis.rmi.registry,ibis.rmi.server"
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>