This repository has been archived by the owner on Aug 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
196 lines (153 loc) · 6.5 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
<?xml version="1.0"?>
<!-- ======================================================================
Jan 4, 2006 2:12:16 PM
JNotify
Builds jnotify library
omry
====================================================================== -->
<project name="JNotify" default="all">
<description>
Builds jnotify library
</description>
<!-- =================================
target: all
================================= -->
<target name="all" depends="setup,clean,build" description="--> Builds jnotify library">
</target>
<!-- - - - - - - - - - - - - - - - - -
target: clean
- - - - - - - - - - - - - - - - - -->
<target name="clean" depends="setup,clean_linux,clean_macosx,clean_win32">
</target>
<!-- - - - - - - - - - - - - - - - - -
target: clean_linux
- - - - - - - - - - - - - - - - - -->
<target name="clean_linux" depends="setup">
<delete failonerror="false" dir="${BUILD_DIR}" />
<ant antfile="native_build.xml" target="clean">
<property name="platform" value="linux"/>
</ant>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: clean_macosx
- - - - - - - - - - - - - - - - - -->
<target name="clean_macosx" depends="setup">
<ant antfile="native_build.xml" target="clean">
<property name="platform" value="macosx"/>
</ant>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: clean_win32
- - - - - - - - - - - - - - - - - -->
<target name="clean_win32" depends="setup">
<ant antfile="native_build.xml" target="clean">
<property name="platform" value="win32"/>
</ant>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: build_native_linux
- - - - - - - - - - - - - - - - - -->
<target name="build_native_linux" depends="setup">
<ant antfile="native_build.xml" target="build">
<property name="platform" value="linux"/>
<property name="output" value="${BUILD_DIR}/output"/>
<property name="version" value="${VERSION}"/>
</ant>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: build_native_macosx
- - - - - - - - - - - - - - - - - -->
<target name="build_native_macosx" depends="setup">
<ant antfile="native_build.xml" target="build">
<property name="platform" value="macosx"/>
<property name="output" value="${BUILD_DIR}/output"/>
<property name="version" value="${VERSION}"/>
</ant>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: build_native_win32
- - - - - - - - - - - - - - - - - -->
<target name="build_native_win32" depends="setup">
<ant antfile="native_build.xml" target="build">
<property name="platform" value="win32"/>
<property name="output" value="${BUILD_DIR}/output"/>
<property name="version" value="${VERSION}"/>
</ant>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: build_java
- - - - - - - - - - - - - - - - - -->
<target name="build_java" depends="setup">
<mkdir dir="${BUILD_DIR}/bin"/>
<mkdir dir="${BUILD_DIR}/output"/>
<mkdir dir="${BUILD_DIR}/dist"/>
<javac source="1.5" target="1.5" srcdir="src" destdir="${BUILD_DIR}/bin" debug="${DEBUG}" debuglevel="${DEBUG_LEVEL}" />
<jar destfile="${BUILD_DIR}/output/jnotify-${VERSION}.jar" basedir="${BUILD_DIR}/bin" update="true" duplicate="fail">
<manifest>
<attribute name="Built-By" value="${user.name}" />
</manifest>
</jar>
<concat destfile="${BUILD_DIR}/output/CHANGELOG" append="true" fixlastline="true">
<filelist dir="." files="CHANGELOG"/>
</concat>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: copy_res
- - - - - - - - - - - - - - - - - -->
<target name="pack" depends="setup">
<zip destfile="${BUILD_DIR}/output/jnotify-${VERSION}-src.zip" update="true"
basedir="src"
/>
<copy todir="${BUILD_DIR}/output/" verbose="true" failonerror="true">
<fileset dir="." excludes="${bin.excludes}" includes="${bin.includes}" />
</copy>
<zip destfile="${BUILD_DIR}/dist/jnotify-lib-${VERSION}.zip">
<fileset dir="${BUILD_DIR}/output"/>
</zip>
<!-- Packs a tar.gz for debian tools (windows not included) -->
<tar destfile="${BUILD_DIR}/dist/libjnotify-${VERSION}.tar.gz" compression="gzip">
<tarfileset dir="."
prefix="libjnotify-${VERSION}/jnotify"
preserveLeadingSlashes="true">
<include name="*"/>
<include name="doc/**"/>
<include name="src/**"/>
</tarfileset>
<tarfileset dir="../jnotify_linux"
prefix="jnotify-lib-${VERSION}/jnotify_linux"
preserveLeadingSlashes="true">
<include name="*"/>
<include name="Debug/makefile"/>
<include name="Debug/*.mk"/>
<include name="Release/makefile"/>
<include name="Release/*.mk"/>
</tarfileset>
</tar>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: build
- - - - - - - - - - - - - - - - - -->
<target name="build" depends="setup">
<antcall target="build_java"></antcall>
<antcall target="build_native_linux"></antcall>
<antcall target="build_native_macosx"></antcall>
<antcall target="build_native_win32"></antcall>
<antcall target="pack"></antcall>
</target>
<target name="build_deb" depends="setup">
<antcall target="build_java"></antcall>
<antcall target="build_native_linux"></antcall>
<copy todir="${BUILD_DIR}/output/" verbose="true" failonerror="true">
<fileset dir="." excludes="${bin.excludes}" includes="${bin.includes}" />
</copy>
<!-- get rid of the src zip, we don't need it here -->
<delete file="${BUILD_DIR}/output/jnotify-native-linux-${VERSION}-src.zip"/>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: setup
- - - - - - - - - - - - - - - - - -->
<target name="setup">
<property name="BUILD_DIR" value="build"/>
<loadproperties srcfile="build.properties" />
</target>
</project>