summaryrefslogtreecommitdiff
path: root/l10ntools/java/l10nconv/build.xml
blob: 6902227e5122218cb17f37ea66debeb75a532243 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!--

  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

  Copyright 2008 by Sun Microsystems, Inc.

  OpenOffice.org - a multi-platform office productivity suite

  $RCSfile: build.xml,v $

  $Revision: 1.4 $

  This file is part of OpenOffice.org.

  OpenOffice.org is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License version 3
  only, as published by the Free Software Foundation.

  OpenOffice.org is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License version 3 for more details
  (a copy is included in the LICENSE file that accompanied this code).

  You should have received a copy of the GNU Lesser General Public License
  version 3 along with OpenOffice.org.  If not, see
  <http://www.openoffice.org/license.html>
  for a copy of the LGPLv3 License.

-->
<project name="l10nconv" default="main" basedir=".">

    <!-- ================================================================= -->
    <!-- settings                                                          -->
    <!-- ================================================================= -->

    <!-- name of this sub target used in recursive builds -->
    <property name="target" value="l10nconv"/>

    <!-- name of jar file created, without .jar extension -->
    <property name="jarname" value="converter"/>

    <!-- relative path to project directory -->
    <property name="prj" value="."/>

    <!-- build output directory -->
    <property name="out" value="build"/>

    <!-- build directories -->
    <property name="build.dir" value="${out}"/>
    <property name="build.class" value="${build.dir}/class/converter"/>
    <property name="build.misc" value="${build.dir}/misc/converter"/>

    <!-- start of java source code package structure -->
    <property name="java.dir" value="java"/>

    <!-- define how to handle CLASSPATH environment -->
    <property name="build.sysclasspath" value="ignore"/>

    <!-- classpath settings for compile and javadoc tasks -->
    <path id="classpath">
        <pathelement location="."/>
        <pathelement location="${build.class}"/>
    </path>

    <!-- name to display in documentation -->
    <property name="docname" value="l10n converter"/>

    <!-- set "modern" java compiler -->
    <property name="build.compiler" value="modern"/>

    <!-- set wether we want to compile with debug information -->
    <property name="debug" value="on"/>

    <!-- set wether we want to compile with optimisation -->
    <property name="optimize" value="off"/>

    <!-- set wether we want to compile with or without deprecation -->
    <property name="deprecation" value="on"/>

    <target name="info">
        <echo message="--------------------"/>
        <echo message="${target}"/>
        <echo message="--------------------"/>
    </target>

    <!-- ================================================================= -->
    <!-- custom targets                                                    -->
    <!-- ================================================================= -->

    <!-- the main target, called in recursive builds -->
    <target name="main" depends="info,prepare,compile,jar,javadoc,zipdoc"/>

    <!-- prepare output directories -->
    <target name="prepare">
        <mkdir dir="${build.dir}"/>
        <mkdir dir="${build.dir}/doc"/>
        <mkdir dir="${build.dir}/doc/javadoc"/>
        <mkdir dir="${build.class}"/>
        <mkdir dir="${build.misc}"/>
    </target>


    <target name="res" depends="prepare">
        <copy todir="${build.class}">
             <fileset dir="${java.dir}">
                 <include name="**/*.properties"/>
                 <include name="**/*.css"/>
                 <include name="**/*.dtd"/>
                 <include name="**/*.form"/>
                 <include name="**/*.gif "/>
                 <include name="**/*.htm"/>
                 <include name="**/*.html"/>
                 <include name="**/*.js"/>
                 <include name="**/*.mod"/>
                 <include name="**/*.sql"/>
                 <include name="**/*.xml"/>
                 <include name="**/*.xsl"/>
                 <include name="**/*.map"/>

             </fileset>
        </copy>
    </target>


    <target name="compile" depends="prepare,res">
    <javac destdir="${build.class}"
           debug="${debug}"
               deprecation="${deprication}"
           optimize="${optimize}"
           classpathref="classpath">
            <src path="${java.dir}"/>
        <include name="**/*.java"/>
    </javac>
    </target>

    <!-- check if javadoc is up to date -->
    <target name="javadoc_check" depends="prepare" if="build.dir">
    <uptodate property="javadocBuild.notRequired" value="true"
            targetfile="${build.dir}/doc/converter_javadoc.zip">
        <srcfiles dir="${java.dir}" includes="**/*.java"/>
    </uptodate>
    </target>

    <!-- generate java documentation -->
    <target name="javadoc" depends="prepare,javadoc_check,compile"
         unless="javadocBuild.notRequired"
         if="build.dir">

        <javadoc destdir="${build.dir}/doc/javadoc"
                 verbose="false"
                 author="false"
                 nodeprecated="true"
                 nodeprecatedlist="true"
                 use="true"
                 Doctitle="${docname}"
                 windowtitle="${docname}"
                 classpathref="classpath">

            <packageset dir="${java.dir}" defaultexcludes="yes">
                <include name="com/**"/>
            </packageset>

            <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api"
                  packagelistLoc="${common.doc}/jdk1.4.2"/>
            <link offline="true"
                  href="http://java.sun.com/products/servlet/2.3/javadoc"
                  packagelistLoc="${common.doc}/servlet2.3"/>
            <link offline="true"
                  href="http://logging.apache.org/log4j/docs/api"
                  packagelistLoc="${common.doc}/log4j-1.2.8"/>
            <link offline="true"
                  href="http://java.sun.com/products/javabeans/glasgow/javadocs"
                  packagelistLoc="${common.doc}/jaf-1.0.2"/>
            <link offline="true"
                  href="http://java.sun.com/products/javamail/javadocs"
                  packagelistLoc="${common.doc}/javamail-1.3.1"/>
            <link offline="true"
                  href="http://ws.apache.org/soap/docs"
                  packagelistLoc="${common.doc}/soap-2.3.1"/>

            <bottom>&lt;i&gt;Copyright &amp;#169; 2004 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA&lt;/i&gt;</bottom>
            <header>${docname}</header>

       </javadoc>
    </target>

    <!-- zip documentation and store in build/misc -->
    <target name="zipdoc" depends="javadoc" if="build.dir" unless="javadocBuild.notRequired">
    <zip zipfile="${build.dir}/doc/converter_javadoc.zip"
      basedir="${build.dir}/doc/javadoc"
      update="true"/>
    </target>

    <!-- clean up -->
    <target name="clean" depends="prepare">
        <delete includeEmptyDirs="true">
            <fileset dir="${build.class}">
                <patternset>
                    <include name="${package}/**/*.class"/>
                </patternset>
            </fileset>
        </delete>
    </target>

    <!-- create jar file -->
    <target name="jar" depends="prepare,compile" if="build.class">
        <jar jarfile="${build.class}/${jarname}.jar"
             basedir="${build.class}"
             manifest="${jarname}.MF">
                 <include name="**/*.class"/>
                 <include name="**/*.properties"/>
                 <include name="**/*.css"/>
                 <include name="**/*.dtd"/>
                 <include name="**/*.form"/>
                 <include name="**/*.gif "/>
                 <include name="**/*.htm"/>
                 <include name="**/*.html"/>
                 <include name="**/*.js"/>
                 <include name="**/*.mod"/>
                 <include name="**/*.sql"/>
                 <include name="**/*.xml"/>
                 <include name="**/*.xsl"/>
                 <include name="**/*.map"/>
        </jar>
    </target>

    <target name="test" depends="prepare">
    </target>

</project>