-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
115 lines (100 loc) · 3.92 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
<project name="silbido" default="dist" basedir=".">
<description>
This and script will build the silbido release files.
</description>
<!-- set global properties for this build -->
<property name="silbido.version" value="1.1"/>
<property name="silbido.version.suffix" value="-beta1"/>
<property name="build" location="build"/>
<property name="build.package" location="${build}/package"/>
<property name="build.package.java" location="${build}/package/java"/>
<property name="build.package.matlab" location="${build}/package/matlab"/>
<property name="build.package.docs" location="${build}/package/docs"/>
<property name="build.jar" location="${build}/jar"/>
<property name="build.jar.name" value="${build.jar}/silbido-classes-${silbido.version}${silbido.version.suffix}.jar"/>
<property name="dist" location="dist"/>
<property name="java.src" location="src/java/src"/>
<property name="java.build" location="${build}/java"/>
<property name="java.build.classes" location="${build}/java"/>
<property name="java.lib" location="src/java/lib"/>
<property name="matlab.src" location="src/matlab"/>
<!-- The class path used for compilation -->
<path id="silbido-classpath">
<fileset dir="${java.lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="buildJar" depends="compile" description="Builds the silbido jar file." >
<jar destfile="${build.jar.name}"
basedir="${java.build.classes}"
includes="**/*.class"
/>
</target>
<target name="compile" depends="" description="Compiles the silbido java classes.">
<mkdir dir="${build}"/>
<mkdir dir="${build.jar}"/>
<mkdir dir="${java.build}"/>
<mkdir dir="${java.build.classes}"/>
<javac srcdir="${java.src}" destdir="${java.build.classes}" includeantruntime="false" target="1.6" source="1.6">
<classpath refid="silbido-classpath"/>
</javac>
<copy todir="${build.jar}">
<fileset dir="${java.lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${build.jar}">
<include name="**/*.jar"/>
</fileset>
</copy>
</target>
<target name="package" depends="buildJar" description="Creates the package to be zipped." >
<mkdir dir="${build.package}"/>
<mkdir dir="${build.package.java}"/>
<mkdir dir="${build.package.java}/src"/>
<mkdir dir="${build.package.matlab}"/>
<mkdir dir="${build.package.docs}"/>
<copy todir="${build.package.java}">
<fileset dir="${java.lib}">
<include name="**/*.jar"/>
<exclude name="**/*-sources.jar"/>
</fileset>
<fileset dir="${build.jar}">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy todir="${build.package.java}/src">
<fileset dir="${java.src}">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${build.package.matlab}">
<fileset dir="${matlab.src}">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="${build.package}">
<fileset dir="${basedir}">
<include name="silbido_init.m"/>
</fileset>
</copy>
<copy todir="${build.package.docs}">
<fileset dir="${basedir}/docs">
<include name="**/*"/>
<exclude name="src"/>
<exclude name="src/**/*"/>
</fileset>
</copy>
</target>
<target name="dist" depends="package" description="Generates the distribution" >
<!--tstamp>
<format property="VERSION_DATE" pattern="MM-dd-yyy" locale="en,US"/>
</tstamp-->
<mkdir dir="${dist}"/>
<zip destfile="${dist}/silbido-${silbido.version}${silbido.version.suffix}.zip" basedir="${build.package}" />
<tar destfile="${dist}/silbido-${silbido.version}${silbido.version.suffix}.tgz" basedir="${build.package}" compression="gzip" />
</target>
<target name="clean" description="clean up" >
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>