view build-src/build-solaris-defs.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-solaris-defs" 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 common properties and macrodefs that are specific to the
        system being used and the various system installed tools on the
        systems. Such as Visual Studio, GNU make, Mac XCode, C/C++ compilers,
        etc.

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

        This file is imported by the build-defs.xml file.

    </description>

    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
    <!-- Only certain repositories trigger a need for native compilation tools. -->
    <condition property="jfx.build.needs.gcc.compiler">
        <or>
            <available file="${jfx.root.dir}/media" type="dir"/>
            <available file="${jfx.root.dir}/rt-closed" type="dir"/>
        </or>
    </condition>

    <condition property="jfx.build.needs.make.utility">
        <or>
            <available file="${jfx.root.dir}/media" type="dir"/>
            <available file="${jfx.root.dir}/rt-closed" type="dir"/>
        </or>
    </condition>

    <property name="gcc.utility" value="gcc"/>

    <condition property="make.utility" value="/usr/bin/gmake">
        <available file="/usr/bin/gmake" type="file"/>
    </condition>
    <condition property="make.utility" value="/usr/sfw/bin/gmake">
        <available file="/usr/sfw/bin/gmake" type="file"/>
    </condition>
    <condition property="make.utility" value="/opt/sfw/bin/gmake">
        <available file="/opt/sfw/bin/gmake" type="file"/>
    </condition>
    <condition property="make.utility" value="gnumake">
        <not>
            <isset property="make.utility"/>
        </not>
    </condition>

    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
    <!-- Macrodefs for system specific tools to be shared by everyone. -->

    <macrodef name="do-gcc">
        <!-- Does a GNU gcc compilation -->
        <attribute name="dir"/>
        <attribute name="options" default=""/>
        <sequential>
            <echo message="STARTING: DO-GCC dir @{dir}"/>
            <echo message="cd @{dir} ; ${gcc.utility} @{options}"/>
            <exec dir="@{dir}"
                  executable="${gcc.utility}"
                  failonerror="true">
                <arg line="@{options}"/>
            </exec>
            <echo message="FINISHED: DO-GCC dir @{dir}"/>
        </sequential>
    </macrodef>

    <macrodef name="do-make">
        <!-- Does a Makefile build -->
        <attribute name="dir"/>
        <attribute name="target"/>
        <attribute name="options" default=""/>
        <sequential>
            <echo message="STARTING: DO-MAKE dir @{dir}"/>
            <echo message="cd @{dir} ; ${make.utility} @{target}"/>
            <exec dir="@{dir}"
                  executable="${make.utility}"
                  failonerror="true">
                <env key="JAVA_HOME"     value="${platform.home}"/>
                <env key="JDK_HOME"      value="${platform.home}"/>
                <arg line="@{options}"/>
                <arg value="@{target}"/>
            </exec>
            <echo message="FINISHED: DO-MAKE dir @{dir}"/>
        </sequential>
    </macrodef>

    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    <target name="needs-gcc"
            if="jfx.build.needs.gcc.compiler"
            unless="jfx.skip.platform.checks">
        <do-gcc dir="." options="--version"/>
    </target>

    <target name="needs-make"
            if="jfx.build.needs.make.utility"
            unless="jfx.skip.platform.checks">
        <do-make dir="." target="-version"/>
    </target>

    <target name="-init-platform-defs"
            depends="needs-make,
                     needs-gcc">
    </target>

    <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

</project>