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 (115 lines) | stat: -rwxr-xr-x 3,975 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
<?xml version="1.0"?>
<project name="JDIC 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 distribution for the current platform.
  clean:            Remove the generated distribution (including files and directories).

-->

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

  <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>=== Build a JDIC distribution ===</echo>
    <echo>=== The distribution directory is: .${file.separator}${dist.dir}${file.separator} ===</echo> 
  </target>

  <!-- *** Build a JDIC distribution for the current platform -->
  <target name="buildall" depends="init"
          description="Build a JDIC distribution">
    <!-- Build a JDIC API distribution -->
    <ant dir="jdic" target="buildall"/>
    
    <!-- Build a JDIC Packager distribution -->
    <ant dir="packager" target="buildall"/>

    <!-- Copy JDIC API distribution files into the distribution directory -->
    <copy todir="${dist.dir}">
      <fileset dir="jdic/${dist.dir}"/>
    </copy>
    
    <!-- Unix Note: the executable permission of mozembed-<os>-gtk* 
         files are not retained using Ant Copy, add executable mode.
    -->
    <chmod dir="${dist.dir}" perm="+x" includes="*mozembed-*-gtk*" />

    <!-- Copy JDIC Packager distribution files -->
    <copy todir="${dist.dir}">
      <fileset dir="packager/${dist.dir}" casesensitive="false" >
        <include name="*.jar"/>
        <include name="*.dll"/>
        <include name="jnlp2*"/>
      </fileset>
    </copy>

    <!-- Unix Note: the executable permission of jnlp2rpm or jnlp2pkg 
         files are not retained using Ant Copy, add executable mode.
    -->
    <chmod dir="${dist.dir}" perm="+x" includes="jnlp2*" />

    <!-- Copy the documentation files -->
    <copy file="README.html" todir="${dist.dir}"/>
    <copy file="COPYING" todir="${dist.dir}"/>
    <copy file="ChangeLog" todir="${dist.dir}"/>
  </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>

    <!-- Clean the JDIC API distribution -->
    <ant dir="jdic" target="clean"/>
    
    <!-- Clean the JDIC Packager distribution -->
    <ant dir="packager" target="clean"/>
  </target>

</project>