xref: /trunk/main/xmerge/java/xmerge/src/main/java/org/openoffice/xmerge/util/registry/build.xml (revision fb60cf8910e0804448d3318ffd78f75bb7989c47)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
21 ***********************************************************-->
22
23
24<project name="xmrg_jooxu_registry" default="main" basedir=".">
25
26    <!-- ================================================================= -->
27    <!-- settings                                                          -->
28    <!-- ================================================================= -->
29
30    <!-- project prefix, used for targets and build.lst  -->
31    <property name="prj.prefix" value="xmrg"/>
32
33    <!-- name of this sub target used in recursive builds -->
34    <property name="target" value="xmrg_jooxu_registry"/>
35
36    <!-- relative path to project directory -->
37    <property name="prj" value="../../../../../.."/>
38
39    <!-- start of java source code package structure -->
40    <property name="java.dir" value="${prj}/java"/>
41
42    <!-- path component for current java package -->
43    <property name="package" value="org/openoffice/xmerge/util/registry"/>
44
45    <!-- define how to handle CLASSPATH environment -->
46    <property name="build.sysclasspath" value="ignore"/>
47
48    <!-- classpath settings for javac tasks -->
49    <path id="classpath">
50        <pathelement location="${build.class}"/>
51    </path>
52
53    <!-- set whether we want to compile with or without deprecation -->
54    <property name="deprecation" value="on"/>
55
56    <!-- ================================================================= -->
57    <!--  solar build environment targets                                  -->
58    <!-- ================================================================= -->
59
60    <target name="build_dir" unless="build.dir">
61        <property name="build.dir" value="${out}"/>
62    </target>
63
64    <target name="solar" depends="build_dir" if="solar.update">
65        <property name="solar.properties"
66                  value="${solar.bin}/solar.properties"/>
67    </target>
68
69    <target name="init" depends="solar">
70        <property name="build.compiler" value="modern"/>
71        <property file="${solar.properties}"/>
72        <property file="${build.dir}/class/solar.properties"/>
73    </target>
74
75    <target name="info">
76        <echo message="--------------------"/>
77        <echo message="${target}"/>
78        <echo message="--------------------"/>
79    </target>
80
81
82    <!-- ================================================================= -->
83    <!-- custom targets                                                    -->
84    <!-- ================================================================= -->
85
86    <!-- the main target, called in recursive builds -->
87    <target name="main" depends="info,prepare,compile"/>
88
89    <!-- prepare output directories -->
90    <target name="prepare" depends="init" if="build.class">
91        <mkdir dir="${build.dir}"/>
92        <mkdir dir="${build.class}"/>
93    </target>
94
95    <!-- compile java sources in ${package} -->
96    <target name="compile" depends="prepare" if="build.class">
97        <javac srcdir="${java.dir}"
98               destdir="${build.class}"
99               debug="${debug}"
100               deprecation="${deprecation}"
101               optimize="${optimize}">
102            <classpath refid="classpath"/>
103            <include name="${package}/ConverterInfo.java"/>
104            <include name="${package}/ConverterInfoMgr.java"/>
105            <include name="${package}/ConverterInfoReader.java"/>
106            <include name="${package}/RegistryException.java"/>
107            <include name="${package}/UnoBridgeConverterInfo.java"/>
108        </javac>
109    </target>
110
111    <!-- clean up -->
112    <target name="clean" depends="prepare">
113        <delete includeEmptyDirs="true">
114            <fileset dir="${build.class}">
115                <patternset>
116                    <include name="${package}/*.class"/>
117                </patternset>
118            </fileset>
119        </delete>
120    </target>
121
122</project>
123