view build-src/build-cache.xml @ 4:5a537ec76c6e

RT-18421: Build files in openjfx/2.1/master have the wrong copyright Reviewed by: jgiles
author kcr
date Fri, 13 Jan 2012 15:52:47 -0800
parents 8d968b638b49
children
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?>
<project name="build-cache" basedir=".">

<!--
/*
 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * 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.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */
-->

    <description>

        Defines targets to create cached areas for sdk and xmldocs.

        *** Sub-repositories should NOT import this file. ***

        This file is imported by the build.xml file only.

    </description>

    <!-- Populate both caches -->
<!--
    <target name="update-cache"
            depends="-check-hudson,
                     update-cached-sdk,
                     update-cached-xmldocs">
    </target>
-->

    <target name="update-cache"
            depends="-check-hudson,
                     update-cached-sdk">
    </target>

    <!-- Populate the caches/sdk directory. -->
    <target name="update-cached-sdk"
            depends="clean-cached-sdk"
            if="hudson.jfx.host.available">
        <do-get-previous-bundle name="sdk"
            url="${hudson.jfx.sdk.url}" dir="${jfx.cached.sdk.dir}"/>
    </target>
    

   <!-- Populate the caches/xmldocs directory. -->
    <target name="update-cached-xmldocs"
            depends="clean-cached-xmldocs"
            if="hudson.jfx.host.available">
        <do-get-previous-bundle name="xmldocs"
            url="${hudson.jfx.xmldocs.url}" dir="${jfx.cached.xmldocs.dir}"/>
    </target>

    <!-- Clean out any caches/sdk files. -->
    <target name="clean-cached-sdk">
        <delete dir="${jfx.cached.sdk.dir}"/>
    </target>

    <!-- Clean out any caches/xmldocs files. -->
    <target name="clean-cached-xmldocs">
        <delete dir="${jfx.cached.xmldocs.dir}"/>
    </target>

    <!-- Set cached.sdk.needed if we need caches/sdk. -->
    <condition property="cached.sdk.needed">
        <and>
            <not>
                <isset property="jfx.full.forest"/>
            </not>
            <not>
                <available file="${jfx.cached.sdk.dir}/${jfx.sdk.location.of.jfxmedia.jar}" type="file"/>
            </not>
        </and>
    </condition>

    <!-- Set cached.xmldocs.needed if we need caches/xmldocs. -->
    <condition property="cached.xmldocs.needed">
        <and>
            <not>
                <isset property="jfx.full.forest"/>
            </not>
            <not>
                <available file="${jfx.cached.xmldocs.dir}" type="dir"/>
            </not>
        </and>
    </condition>

    <!-- See if hudson available. -->
    <target name="-check-hudson">
        <condition property="hudson.jfx.host.available">
            <and>
                <not>
                    <isset property="jfx.open.only"/>
                </not>
                <isreachable host="${hudson.jfx.host}" timeout="10"/>
            </and>
        </condition>
    </target>

    <!-- Populate both caches if needed -->
    <target name="update-cache-if-needed"
            depends="update-cached-sdk-if-needed,
                     update-cached-xmldocs-if-needed">
    </target>

    <!-- Update caches/sdk if needed (partial build and not existing). -->
    <target name="update-cached-sdk-if-needed"
            depends="-check-hudson"
            if="cached.sdk.needed">
        <antcall target="update-cached-sdk"/>
    </target>

     <!-- Update caches/xmldocs if needed (partial build and not existing). -->
    <target name="update-cached-xmldocs-if-needed"
            depends="-check-hudson"
            if="cached.xmldocs.needed">
        <antcall target="update-cached-xmldocs"/>
    </target>

</project>