3879
|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
|
|
4 |
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
5 |
|
|
6 |
This code is free software; you can redistribute it and/or modify it
|
|
7 |
under the terms of the GNU General Public License version 2 only, as
|
|
8 |
published by the Free Software Foundation. Sun designates this
|
|
9 |
particular file as subject to the "Classpath" exception as provided
|
|
10 |
by Sun in the LICENSE file that accompanied this code.
|
|
11 |
|
|
12 |
This code is distributed in the hope that it will be useful, but WITHOUT
|
|
13 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
14 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
15 |
version 2 for more details (a copy is included in the LICENSE file that
|
|
16 |
accompanied this code).
|
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License version
|
|
19 |
2 along with this work; if not, write to the Free Software Foundation,
|
|
20 |
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
21 |
|
|
22 |
Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
23 |
CA 95054 USA or visit www.sun.com if you need additional information or
|
|
24 |
have any questions.
|
|
25 |
-->
|
|
26 |
|
|
27 |
<project name="jaxp_defs" default="all" basedir=".">
|
|
28 |
|
|
29 |
<!-- Specific build properties. -->
|
|
30 |
<property file="jaxp.properties"/>
|
|
31 |
|
|
32 |
<!-- Where generated xml files will stay. -->
|
|
33 |
<property name="xml.gen.dir" value="${build.dir}/xml_generated"/>
|
|
34 |
<property name="xml.template" value="build-drop-template.xml"/>
|
|
35 |
|
|
36 |
<!-- ############### -->
|
|
37 |
<!-- Begin Macrodefs -->
|
|
38 |
|
|
39 |
<!-- Copies template file, replaces @DROP@ pattern, and imports it. -->
|
|
40 |
<macrodef name="drop-import">
|
|
41 |
<attribute name="name"/>
|
|
42 |
<sequential>
|
|
43 |
<property name="xml.gen.@{name}" value="${xml.gen.dir}/build-drop-@{name}.xml"/>
|
|
44 |
<mkdir dir="${xml.gen.dir}"/>
|
|
45 |
<copy file="${xml.template}" tofile="${xml.gen.@{name}}"/>
|
|
46 |
<replace file="${xml.gen.@{name}}" token="@DROP@" value="@{name}"/>
|
|
47 |
<import file="${xml.gen.@{name}}"/>
|
|
48 |
</sequential>
|
|
49 |
</macrodef>
|
|
50 |
|
|
51 |
<!-- End of Macrodefs -->
|
|
52 |
<!-- ############### -->
|
|
53 |
|
|
54 |
<!-- Create xml file and import it for these drops. -->
|
|
55 |
<drop-import name="jaxp_src"/>
|
|
56 |
<!-- <drop-import name="jaxp_tests"/> -->
|
|
57 |
|
|
58 |
|
|
59 |
<!-- Special build area preparation. -->
|
|
60 |
<target name="-drop-build-prep" depends="init, -init-src-dirs">
|
|
61 |
</target>
|
|
62 |
|
|
63 |
<!-- Try to get drop sources, set property use.orig.src.dir if no drops. -->
|
|
64 |
<target name="-set-props"
|
|
65 |
depends="init,
|
|
66 |
jaxp_src-update">
|
|
67 |
<condition property="use.orig.src.dir">
|
|
68 |
<and>
|
|
69 |
<available file="${orig.src.dir}" type="dir"/>
|
|
70 |
<not>
|
|
71 |
<and>
|
|
72 |
<available file="${jaxp_src.src.dir}" type="dir"/>
|
|
73 |
</and>
|
|
74 |
</not>
|
|
75 |
</and>
|
|
76 |
</condition>
|
|
77 |
</target>
|
|
78 |
|
|
79 |
<!-- Set up source to use orig.src.dir, if use.orig.src.dir defined. -->
|
|
80 |
<target name="-use-orig" depends="-set-props" if="use.orig.src.dir">
|
|
81 |
<property name="primary.src.dir" value="${orig.src.dir}"/>
|
|
82 |
<path id="src.dir.id">
|
|
83 |
<pathelement path="${primary.src.dir}"/>
|
|
84 |
</path>
|
|
85 |
</target>
|
|
86 |
|
|
87 |
<!-- Set up source to use drop.dir, if use.orig.src.dir not defined. -->
|
|
88 |
<target name="-use-drop" depends="-set-props" unless="use.orig.src.dir">
|
|
89 |
<property name="primary.src.dir" value="${jaxp_src.src.dir}"/>
|
|
90 |
<path id="src.dir.id">
|
|
91 |
<pathelement path="${primary.src.dir}"/>
|
|
92 |
</path>
|
|
93 |
</target>
|
|
94 |
|
|
95 |
<!-- Source directory selection. -->
|
|
96 |
<target name="-init-src-dirs"
|
|
97 |
depends="init, -use-orig, -use-drop">
|
|
98 |
<echo message="Using primary.src.dir=${primary.src.dir}"/>
|
|
99 |
<pathconvert property="src.list.id" refid="src.dir.id"/>
|
|
100 |
<echo message="Using src.dir.id=${src.list.id}"/>
|
|
101 |
</target>
|
|
102 |
|
|
103 |
<!-- Create orig src.zip. -->
|
|
104 |
<target name="-orig-src-zip" depends="init, -set-props" if="use.orig.src.dir">
|
|
105 |
<zip file="${dist.src.zip}" basedir="${primary.src.dir}"/>
|
|
106 |
</target>
|
|
107 |
|
|
108 |
<!-- Create drop src.zip. -->
|
|
109 |
<target name="-drop-src-zip" depends="init, -set-props" unless="use.orig.src.dir">
|
|
110 |
<zip file="${dist.src.zip}" basedir="${primary.src.dir}"/>
|
|
111 |
</target>
|
|
112 |
|
|
113 |
<!-- Create src.zip. -->
|
|
114 |
<target name="-dist-src-zip" depends="init, -orig-src-zip, -drop-src-zip">
|
|
115 |
</target>
|
|
116 |
|
|
117 |
</project>
|