File: build.xml

package info (click to toggle)
libjdic-java 0.9.5-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,024 kB
  • ctags: 2,427
  • sloc: java: 8,655; xml: 3,837; cpp: 3,437; ansic: 677; sh: 318; makefile: 214
file content (594 lines) | stat: -rwxr-xr-x 22,850 bytes parent folder | download | duplicates (2)
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
<?xml version="1.0"?>
<project name="JDIC API source code building script" default="showtargets" basedir=".">

<!--
This is the master build script for use with the Jakarta Ant build tool
to build the source code of JDIC project.

For Ant, see http://jakarta.apache.org/ant/index.html

Top-level target:
  buildall:         Build a JDIC API distribution for the current platform.
                    Which will run one of below targets:
    buildwin32:     on Windows to build a Windows distribuition.
    buildlinux:     on Linux to build a Linux distribuition.
    buildsolaris:   on Solaris to build a Solaris distribuition.
    buildfreebsd:   on FreeBSD to build a FreeBSD distribuition.
    buildmac_os_x:  on Mac OS X to build a Mac OS X distribuition.
  buildtray:        Build the Tray Icon API (package org.jdesktop.jdic.tray)
                    binary for the current platform.
  clean:            Remove the generated distribution (including files and directories).

-->

  <!-- the top-level package names -->
  <property name="pkg.jdic.name"      value="org.jdesktop.jdic" />
  <property name="pkg.desktop.name"   value="${pkg.jdic.name}.desktop" />
  <property name="pkg.filetypes.name" value="${pkg.jdic.name}.filetypes" />
  <property name="pkg.browser.name"   value="${pkg.jdic.name}.browser" />
  <property name="pkg.tray.name"      value="${pkg.jdic.name}.tray" />

  <!-- the path of source directory -->
  <property name="src.dir"           value="src" />
  <property name="share.classes.dir" value="${src.dir}/share/classes" />
  <property name="unix.classes.dir"  value="${src.dir}/unix/classes" />
  <property name="win32.classes.dir" value="${src.dir}/win32/classes" />
  <property name="mac.classes.dir"   value="${src.dir}/mac_os_x/classes" />

  <!-- the path of file defmailer.properties defining the default mailer
       location on Linux/Solaris/FreeBSD -->
  <property name="unix.classes.defmailer.dir"
            value="${src.dir}/unix/classes/org/jdesktop/jdic/desktop/internal/impl/" />

  <property name="unix.native.dir"         value="${src.dir}/unix/native" />
  <property name="unix.native.jni.dir"     value="${unix.native.dir}/jni" />
  <property name="unix.native.mozilla.dir" value="${unix.native.dir}/mozilla" />

  <property name="win32.native.dir"         value="${src.dir}/win32/native" />
  <property name="win32.native.jni.dir"     value="${win32.native.dir}/jni" />
  <property name="win32.native.ie.dir"      value="${win32.native.dir}/ie" />
  <property name="win32.native.mozilla.dir" value="${win32.native.dir}/mozilla" />

  <property name="mac.native.dir"         value="${src.dir}/mac_os_x/native" />
  <property name="mac.native.jni.dir"     value="${mac.native.dir}/jni" />

  <!-- the distribution version and release of this build -->
  <!-- which is only used in javadoc target -->
  <property name="version" value="0.9" />
  <property name="release" value="4" />

  <!-- the generated jar file name -->
  <property name="jar.file" value="jdic.jar" />

  <property name="toDebug" value="off"/>

  <target name="showtargets" description="default target showing all available targets">
    <echo>The top-level targets are:</echo>
    <echo> buildall:  Build a JDIC API distribution for the current platform</echo>
    <echo>            (Windows, Linux, Solaris, FreeBSD or Mac OS X).</echo>
    <echo> buildtray: Build the Tray Icon API binary for the current platform</echo>
    <echo>            (Windows, Linux or Solaris).</echo>
    <echo> clean:     Remove the generated distribution.</echo>
    <echo></echo>
    <echo>The generated distribution is put under *dist* directory.</echo>
  </target>

  <!--
    - SHARED TARGETS FOR WIN32/UNIX DISTRIBUTIONS
    -->
  <target name="init" description="the init target">
    <!-- Create the time stamp -->
    <tstamp/>

    <!-- Set platform-dependent distribution directory -->
    <!-- ${file.separator} is "\" on Windows, and "/" on Unix -->
    <condition property="dist.dir" value="dist${file.separator}windows">
      <os family="windows" />
    </condition>

    <condition property="dist.dir" value="dist/linux">
      <os name="linux"/>
    </condition>

    <condition property="dist.dir" value="dist/solaris_sparc">
      <os name="sunos" arch="sparc"/>
    </condition>

    <condition property="dist.dir" value="dist/solaris_x86">
      <os name="sunos" arch="x86"/>
    </condition>

    <condition property="dist.dir" value="dist/freebsd">
      <os name="freebsd"/>
    </condition>

    <condition property="dist.dir" value="dist/mac_os_x">
      <os name="Mac OS X"/>
    </condition>

    <!-- Create the distribution directory -->
    <mkdir dir="${dist.dir}" />

    <echo>++++++++++++++++++++++++++++++++++++++++++++++++++++</echo>
    <echo>+ JDIC API build version ${version} release ${release}</echo>
    <echo>+ The distribution directory is: .${file.separator}${dist.dir}${file.separator}</echo>
    <echo>++++++++++++++++++++++++++++++++++++++++++++++++++++</echo>
  </target>

  <!-- *** Top-level target *** -->
  <!-- *** Clean the distribution directory *** -->
  <target name="clean" depends="init"
          description="clean up the built directory and files">
    <delete includeEmptyDirs="true" failonerror="false">
      <fileset dir="${dist.dir}"/>
    </delete>
  </target>


  <!-- *** Top-level target *** -->
  <!-- *** Build a JDIC API distribution for the current platform *** -->
  <target name="buildall"
          description="build a distribution for the current platform.">
    <!-- Set the platform-dependent buildall target -->
    <condition property="platform.target" value="buildwin32">
      <os family="windows" />
    </condition>

    <condition property="platform.target" value="buildlinux">
      <os name="linux"/>
    </condition>

    <condition property="platform.target" value="buildsolaris">
      <os name="sunos"/>
    </condition>

    <condition property="platform.target" value="buildfreebsd">
      <os name="freebsd"/>
    </condition>

    <condition property="platform.target" value="buildmac_os_x">
      <os name="Mac OS X" />
    </condition>

    <antcall target="${platform.target}" />

    <!-- build demo applications into .class files -->
    <antcall target="builddemo" />
  </target>

  <!-- *** javadoc *** -->
  <!-- disable author and version tags output -->
  <target name="javadoc" depends="init"
          description="generate javadoc into ${dist.dir}/javadoc" >
    <javadoc packagenames="${pkg.desktop.name}, ${pkg.filetypes.name}, ${pkg.browser.name}, ${pkg.tray.name}"
             sourcepath="${share.classes.dir}"
             destdir="${dist.dir}/javadoc"
             author="false"
             version="false"
             use="true"
             Windowtitle="JDIC API V${version} Release ${release}"
             Header="JDIC API V${version} Release ${release}">
             <docTitle><![CDATA[JDIC (JDesktop Integration Components)
               <br> API Specification, Version ${version} Release ${release}]]></docTitle>
             <bottom><![CDATA[<font size="-1">For more information and documentation on JDIC,
               see <a href="https://jdic.dev.java.net">JDIC website</a>. <p>That documentation
               contains more detailed, developer-targeted descriptions, with conceptual
               overviews, working code examples, license terms and bug report information.
               <p>Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. Use is
               subject to <a href=
               "https://jdic.dev.java.net/source/browse/jdic/src/COPYING">license terms</a>.
               </font>]]></bottom>
    </javadoc>
  </target>

  <!--
    - WIN32 DISTRIBUTION
    -->
  <target name="buildwin32" depends="buildwin32jar, javadoc, buildwin32jni, buildwin32embed"
          description="build java and native source code for Win32 platform" >
  </target>

  <!-- *** Build Win32 jar file *** -->
  <target name="buildwin32jar" depends="init"
          description="build the classes and jar file." >
    <!-- generate class files that will run on VMs in JDK 1.4 and later -->
    <javac debug="${toDebug}" srcdir="${share.classes.dir}:${win32.classes.dir}"
           destdir="${dist.dir}"
           classpath="${dist.dir}"
           target="1.4"
           source="1.4"
    />

    <jar destfile="${dist.dir}/${jar.file}" update="false">
         <fileset dir="${dist.dir}" includes="org/**/*.class"/>
    </jar>

    <!-- remove the generated "org" directory -->
    <delete includeEmptyDirs="true" failonerror="false">
      <fileset dir="${dist.dir}/org"/>
    </delete>
  </target>

  <!-- *** Build Win32 native JNI code *** -->
  <target name="buildwin32jni" depends="init"
          description="build native jni libraries." >
    <!-- build jdic.dll -->
    <exec dir="${win32.native.jni.dir}" executable="nmake"
      failonerror="yes" >
      <arg line="/f jdic.mak CFG='jdic - Win32 Release'"/>
    </exec>

    <!-- build tray.dll containing the Tray Icon native code -->
    <exec dir="${win32.native.jni.dir}" executable="nmake"
      failonerror="yes" >
      <arg line="/f jdic.mak CFG='jdic - Win32 Tray'"/>
    </exec>

    <!-- copy generated .dll file -->
    <copy file="${win32.native.jni.dir}/Release/jdic.dll" todir="${dist.dir}" />
    <copy file="${win32.native.jni.dir}/Release/tray.dll" todir="${dist.dir}" />
  </target>

  <!-- *** Build Win32 native embeded browser code *** -->
  <target name="buildwin32embed" depends="init">
    <!-- clean the previous build -->
    <exec dir="${win32.native.ie.dir}" executable="nmake" failonerror="yes">
      <arg line="/f IeEmbed.mak CLEAN"/>
    </exec>

    <exec dir="${win32.native.mozilla.dir}" executable="nmake" failonerror="yes">
      <arg line="/f MozEmbed.mak CLEAN"/>
    </exec>

    <exec dir="${win32.native.ie.dir}" executable="nmake" failonerror="yes">
      <arg line="/f IeEmbed.mak CFG='IeEmbed - Win32 Release'"/>
    </exec>

    <exec dir="${win32.native.mozilla.dir}" executable="nmake" failonerror="yes">
      <arg line="/f MozEmbed.mak CFG='MozEmbed - Win32 Release'"/>
    </exec>

    <!-- copy the embeded IE and Mozilla executable -->
    <copy file="${win32.native.ie.dir}/Release/IeEmbed.exe" todir="${dist.dir}" />
    <copy file="${win32.native.mozilla.dir}/Release/MozEmbed.exe" todir="${dist.dir}" />
  </target>

  <!--
    - LINUX DISTRIBUTION
    -->
  <target name="buildlinux" depends="buildunixjar, javadoc, buildunixjni, buildunixembed"
          description="build java and native source code for Linux platform" >
  </target>

  <!--
    - SOLARIS DISTRIBUTION
    -->
  <!-- This target is the same with buildlinux. -->
  <target name="buildsolaris" depends="buildlinux"
          description="build java and native source code for Solaris platform" >
  </target>

  <!--
    - FREEBSD DISTRIBUTION
    -->
  <!-- This target is the same with buildlinux. -->
  <target name="buildfreebsd" depends="buildunixjar, javadoc, buildbsdjni, buildbsdembed"
          description="build java and native source code for FreeBSD platform" >
  </target>

  <!--
    - SHARED TARGETS FOR UNIX DISTRIBUTIONS
    -->
  <!-- *** Build Unix jar file *** -->
  <target name="buildunixjar" depends="init"
          description="build the classes and jar file." >
    <javac debug="${toDebug}" srcdir="${share.classes.dir}:${unix.classes.dir}"
           destdir="${dist.dir}"
           classpath="${dist.dir}"
           target="1.4"
           source="1.4"
    />

    <jar destfile="${dist.dir}/${jar.file}" update="false">
         <fileset dir="${dist.dir}" includes="org/**/*.class"/>
         <fileset dir="${unix.classes.dir}" includes="org/**/*.png" />
    </jar>

    <!-- remove the generated "org" directory -->
    <delete includeEmptyDirs="true" failonerror="false">
      <fileset dir="${dist.dir}/org"/>
    </delete>

    <!-- !!! As an additional operation, copy defmailer.properties file
         defining the default mailer location to the same location !!! -->
    <copy file="${unix.classes.defmailer.dir}/defmailer.properties"
          todir="${dist.dir}" />
  </target>

  <!-- *** Build BSD native JNI code *** -->
  <target name="buildbsdjni" depends="init"
          description="build native jni libraries." >
    <exec dir="${unix.native.jni.dir}" executable="gmake" failonerror="yes" />

    <!-- copy generated .so file -->
    <copy file="${unix.native.jni.dir}/libjdic.so" todir="${dist.dir}" />
    <copy file="${unix.native.jni.dir}/libtray.so" todir="${dist.dir}" />
  </target>

  <!-- *** Build BSD native embeded browser code *** -->
  <target name="buildbsdembed" depends="init">
    <!-- clean the previous build -->
    <exec dir="${unix.native.mozilla.dir}" executable="gmake" failonerror="yes">
      <arg line="clean"/>
    </exec>

    <exec dir="${unix.native.mozilla.dir}" executable="gmake" failonerror="yes" />

    <!-- copy the embeded Mozilla executable -->
    <antcall target="-copymozembed" />
  </target>

  <!-- *** Build Unix native JNI code *** -->
  <target name="buildunixjni" depends="init"
          description="build native jni libraries." >
    <exec dir="${unix.native.jni.dir}" executable="make" failonerror="yes" />

    <!-- copy generated .so file -->
    <copy file="${unix.native.jni.dir}/libjdic.so" todir="${dist.dir}" />
    <copy file="${unix.native.jni.dir}/libtray.so" todir="${dist.dir}" />
  </target>

  <!-- *** Build Unix native embeded browser code *** -->
  <target name="buildunixembed" depends="init">
    <!-- clean the previous build -->
    <exec dir="${unix.native.mozilla.dir}" executable="make" failonerror="yes">
      <arg line="clean"/>
    </exec>

    <exec dir="${unix.native.mozilla.dir}" executable="make" failonerror="yes" />

    <!-- copy the embeded Mozilla executable -->
    <antcall target="-copymozembed" />
  </target>

  <!--
    - Targets name beginning with a hyphen can be used to name targets
    - that should not be called directly from the command line.
    -->
  <target name="-copymozembed" depends="init" >
    <copy todir="${dist.dir}">
      <fileset dir="${unix.native.mozilla.dir}" includes="*mozembed-*-gtk*"/>
    </copy>
    <chmod dir="${dist.dir}" perm="+x" includes="*mozembed-*-gtk*" />
  </target>

  <!--
    - MAC OS X DISTRIBUTION
    -->
  <target name="buildmac_os_x" depends="buildmacjar, javadoc, buildmacjni"
          description="build java and native source code for Mac OS X" >
  </target>

  <!-- *** Build Mac jar file *** -->
  <target name="buildmacjar" depends="init"
          description="build the classes and jar file." >
    <javac debug="${toDebug}" srcdir="${share.classes.dir}:${mac.classes.dir}"
           destdir="${dist.dir}"
           classpath="${dist.dir}"
           target="1.4"
           source="1.4"
    />

    <jar destfile="${dist.dir}/${jar.file}" update="false">
         <fileset dir="${dist.dir}" includes="org/**/*.class"/>
    </jar>
  </target>

  <!-- *** Build Mac native JNI code *** -->
  <target name="buildmacjni" depends="init"
          description="build native jni libraries." >
    <exec dir="${mac.native.jni.dir}" executable="make" failonerror="yes" />

    <!-- copy generated .jnilib file -->
    <copy file="${mac.native.jni.dir}/libjdic.jnilib" todir="${dist.dir}" />
  </target>

  <!-- *** Build demo applications into .class files *** -->
  <target name="builddemo" depends="init"
    description="build demo classes">
    <!-- the path of demo directory -->
    <property name="demo.dir"               value="demo" />
    <property name="demo.browser.dir"       value="${demo.dir}/Browser" />
    <property name="demo.filechooser.dir"   value="${demo.dir}/FileChooser" />
    <property name="demo.fileexplorer.dir"  value="${demo.dir}/FileExplorer" />
    <property name="demo.filetypes.dir"     value="${demo.dir}/FileTypes" />
    <property name="demo.simplebrowser.dir" value="${demo.dir}/SimpleBrowser" />
    <property name="demo.tray.dir"          value="${demo.dir}/Tray" />

    <!-- remove the ".class" files to rebuild the demo apps -->
    <delete failonerror="false">
      <fileset dir="${demo.dir}" includes="**/*.class"/>
    </delete>

    <!-- TO BE DONE: below tasks should be combined to one task -->
    <javac debug="${toDebug}" srcdir="${demo.browser.dir}"
           destdir="${demo.browser.dir}"
           classpath="${dist.dir}/${jar.file}"
           target="1.4"
           source="1.4"
    />
    <javac debug="${toDebug}" srcdir="${demo.filechooser.dir}"
           destdir="${demo.filechooser.dir}"
           classpath="${dist.dir}/${jar.file}"
           target="1.4"
           source="1.4"
    />
    <javac debug="${toDebug}" srcdir="${demo.fileexplorer.dir}"
           destdir="${demo.fileexplorer.dir}"
           classpath="${dist.dir}/${jar.file}"
           target="1.4"
           source="1.4"
    />
    <javac debug="${toDebug}" srcdir="${demo.filetypes.dir}"
           destdir="${demo.filetypes.dir}"
           classpath="${dist.dir}/${jar.file}"
           target="1.4"
           source="1.4"
    />
    <javac debug="${toDebug}" srcdir="${demo.simplebrowser.dir}"
           destdir="${demo.simplebrowser.dir}"
           classpath="${dist.dir}/${jar.file}"
           target="1.4"
           source="1.4"
    />
    <javac debug="${toDebug}" srcdir="${demo.tray.dir}"
           destdir="${demo.tray.dir}"
           classpath="${dist.dir}/${jar.file}"
           target="1.4"
           source="1.4"
    />

    <!-- Copy demo apps to a "demo" directory under the distribution directory -->
    <!-- NOTE: specifies only the *necessary* demo files to avoid copying
         unnecessary files. -->
    <mkdir dir="${dist.dir}/demo" />
    <copy todir="${dist.dir}/demo">
      <fileset dir="${demo.dir}"
           casesensitive="false"
           includes="README,
               Browser/*.java, Browser/*.class, Browser/images/**/,
               FileChooser/*.java, FileChooser/*.class, FileChooser/images/**,
               FileExplorer/*.java, FileExplorer/*.class, FileExplorer/images/**,
               FileTypes/*.java, FileTypes/*.class, FileTypes/images/**,
               SimpleBrowser/*.java, SimpleBrowser/*.class, SimpleBrowser/images/**,
               Tray/*.java, Tray/*.class, Tray/images/**" >
      </fileset>
    </copy>
  </target>

  <!-- ******************************************* -->
  <!-- ******************************************* -->
  <!-- ******************************************* -->
  <!-- *********** Build Tray Icon API *********** -->
  <!-- ***** package org.jdesktop.jdic.tray ****** -->
  <!-- ******************************************* -->
  <!-- ******************************************* -->
  <!-- ******************************************* -->
  <property name="pkg.tray.dir"      value="org/jdesktop/jdic/tray" />

  <!-- the path of source directory -->
  <property name="share.classes.tray.dir" value="${share.classes.dir}/${pkg.tray.dir}" />
  <property name="win32.classes.tray.dir" value="${win32.classes.dir}/${pkg.tray.dir}" />
  <property name="unix.classes.tray.dir"  value="${unix.classes.dir}/${pkg.tray.dir}" />

  <!-- *** Top-level target *** -->
  <!-- *** Build a Tray Icon API binary for the current platform *** -->
  <!-- *** First clean the distribution directory *** -->
  <target name="buildtray" depends="clean"
          description="build a distribution for the current platform.">
    <!-- Set the platform-dependent buildall target -->
    <condition property="platform.target" value="buildwin32_tray">
      <os family="windows" />
    </condition>

    <condition property="platform.target" value="buildlinux_tray">
      <os name="linux"/>
    </condition>

    <condition property="platform.target" value="buildsolaris_tray">
      <os name="sunos"/>
    </condition>

    <antcall target="${platform.target}" />
  </target>

  <!--
    - WIN32 DISTRIBUTION
    -->
  <target name="buildwin32_tray" depends="buildwin32jar_tray, buildwin32jni_tray"
          description="build java and native source code for Win32 platform" >
  </target>

  <!-- *** Build Win32 jar file *** -->
  <target name="buildwin32jar_tray" depends="init"
          description="build the classes and jar file." >
    <javac debug="${toDebug}" srcdir="${share.classes.tray.dir}:${win32.classes.tray.dir}"
           destdir="${dist.dir}"
           classpath="${dist.dir}"
           target="1.4"
           source="1.4"
    />

    <jar destfile="${dist.dir}/${jar.file}" update="false">
         <fileset dir="${dist.dir}" includes="org/**/*.class"/>
    </jar>

    <!-- remove the generated "org" directory -->
    <delete includeEmptyDirs="true" failonerror="false">
      <fileset dir="${dist.dir}/org"/>
    </delete>
  </target>

  <!-- *** Build Win32 native JNI code *** -->
  <target name="buildwin32jni_tray" depends="init"
          description="build native jni libraries." >

    <exec dir="${win32.native.jni.dir}" executable="nmake"
      failonerror="yes" >
      <arg line="/f jdic.mak CFG='jdic - Win32 Tray'"/>
    </exec>

    <!-- copy generated .dll file -->
    <copy file="${win32.native.jni.dir}/Release/tray.dll" todir="${dist.dir}" />
  </target>

  <!--
    - LINUX DISTRIBUTION
    -->
  <target name="buildlinux_tray" depends="buildunixjar_tray, buildunixjni_tray"
          description="build java and native source code for Linux platform" >
  </target>

  <!--
    - SOLARIS DISTRIBUTION
    -->
  <!-- This target is the same with buildlinux_tray -->
  <target name="buildsolaris_tray" depends="buildlinux_tray"
          description="build java and native source code for Solaris platform" >
  </target>

  <!--
    - SHARED TARGETS FOR LINUX/SOLARIS DISTRIBUTIONS
    -->
  <!-- *** Build Unix jar file *** -->
  <target name="buildunixjar_tray" depends="init"
          description="build the classes and jar file." >
    <javac debug="${toDebug}" srcdir="${share.classes.dir}:${unix.classes.dir}"
           destdir="${dist.dir}"
           classpath="${dist.dir}"
           target="1.4"
           source="1.4"
    />

    <jar destfile="${dist.dir}/${jar.file}" update="false">
         <fileset dir="${dist.dir}" includes="org/**/*.class"/>
    </jar>

    <!-- remove the generated "org" directory -->
    <delete includeEmptyDirs="true" failonerror="false">
      <fileset dir="${dist.dir}/org"/>
    </delete>
  </target>

  <!-- *** Build Unix native JNI code *** -->
  <target name="buildunixjni_tray" depends="init"
          description="build native jni libraries." >
    <exec dir="${unix.native.jni.dir}" executable="make" failonerror="yes" >
      <arg line="tray"/>
    </exec>

    <!-- copy generated .so file -->
    <copy file="${unix.native.jni.dir}/libtray.so" todir="${dist.dir}" />
  </target>

</project>