view build-defs.xml @ 111:325f73f13556

Merge from main OpenJDK repository
date Mon, 05 Oct 2009 22:35:45 -0700
parents 534e23823a1b
children 16b2f7fb5513
line wrap: on
line source
<?xml version="1.0"?>
 Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.

 This code is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License version 2 only, as
 published by the Free Software Foundation.  Sun designates this
 particular file as subject to the "Classpath" exception as provided
 by Sun in the LICENSE file that accompanied this code.

 This code 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 General Public License
 version 2 for more details (a copy is included in the LICENSE file that
 accompanied this code).

 You should have received a copy of the GNU General Public License version
 2 along with this work; if not, write to the Free Software Foundation,
 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
 CA 95054 USA or visit if you need additional information or
 have any questions.

<project name="jaxp_defs" default="all" basedir=".">

    <!-- Specific build properties. -->
    <property file=""/>

    <!-- Where generated xml files will stay. -->
    <property name="xml.gen.dir" value="${build.dir}/xml_generated"/>
    <property name="xml.template" value="build-drop-template.xml"/>

    <!--  ############### -->
    <!--  Begin Macrodefs -->

    <!-- Copies template file, replaces @DROP@ pattern, and imports it. -->
    <macrodef name="drop-import">
        <attribute name="name"/>
            <property name="xml.gen.@{name}" value="${xml.gen.dir}/build-drop-@{name}.xml"/>
            <mkdir dir="${xml.gen.dir}"/>
            <copy file="${xml.template}" tofile="${xml.gen.@{name}}"/>
            <replace file="${xml.gen.@{name}}" token="@DROP@" value="@{name}"/>
            <import file="${xml.gen.@{name}}"/>

    <!--  End of Macrodefs -->
    <!--  ############### -->

    <!-- Create xml file and import it for these drops. -->
    <drop-import name="jaxp_src"/>
    <!-- <drop-import name="jaxp_tests"/> -->

    <!-- Special build area preparation. -->
    <target name="-drop-build-prep" depends="init, -init-src-dirs">
        <mkdir dir="${build.classes.dir}"/>
        <copy todir="${build.classes.dir}">
            <fileset dir="${primary.src.dir}"
        <replaceregexp match="#(.*)$" replace="#" flags="gm">
            <fileset dir="${build.classes.dir}" includes="**/*.properties"/>

    <!-- Try to get drop sources, set property use.orig.src.dir if no drops. -->
    <target name="-set-props"
        <condition property="use.orig.src.dir">
                <available file="${orig.src.dir}" type="dir"/>
                        <available file="${jaxp_src.src.dir}" type="dir"/>

    <!-- Set up source to use orig.src.dir, if use.orig.src.dir defined. -->
    <target name="-use-orig" depends="-set-props" if="use.orig.src.dir">
        <property name="primary.src.dir" value="${orig.src.dir}"/>
        <path id="">
            <pathelement path="${primary.src.dir}"/>

    <!-- Set up source to use drop.dir, if use.orig.src.dir not defined. -->
    <target name="-use-drop" depends="-set-props" unless="use.orig.src.dir">
        <property name="primary.src.dir" value="${jaxp_src.src.dir}"/>
        <path id="">
            <pathelement path="${primary.src.dir}"/>

    <!-- Source directory selection. -->
    <target name="-init-src-dirs"
	    depends="init, -use-orig, -use-drop">
        <echo message="Using primary.src.dir=${primary.src.dir}"/>
        <pathconvert property="" refid=""/>
        <echo message="Using${}"/>

    <!-- Create orig -->
    <target name="-orig-src-zip" depends="init, -set-props" if="use.orig.src.dir">
        <zip file="${}" basedir="${primary.src.dir}"/>

    <!-- Create drop -->
    <target name="-drop-src-zip" depends="init, -set-props" unless="use.orig.src.dir">
        <zip file="${}" basedir="${primary.src.dir}"/>

    <!-- Create -->
    <target name="-dist-src-zip" depends="init, -orig-src-zip, -drop-src-zip">