view hotspot/agent/make/build.xml @ 29159:7fed45c53518

8074072: Race condition in build since JDK-8072842 can cause failed builds on Solaris Reviewed-by: ihse
author erikj
date Mon, 02 Mar 2015 14:18:01 +0100
parents 5eb97f366a6a
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8"?>
 Copyright (c) 2002, 2008, Oracle and/or its affiliates. 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.

 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 if you need additional information or have any

<!-- This is an Ant project file. Ant is a build tool like make or gnumake which is not
     dependent on the underlying OS shell. For more information on Ant, please see -->

<!-- A "project" describes a set of targets that may be requested
     when Ant is executed.  The "default" attribute defines the
     target which is executed if no specific target is requested,
     and the "basedir" attribute defines the current working directory
     from which Ant executes the requested task.  This is normally
     set to the current working directory.

<project name="HotSpot Serviceability Agent" default="all" basedir=".">

  <!-- Property Definitions -->

  <property name="" value="sa"/>
  <property name="dist.jar" value="${}.jar"/>
  <property name="classes"  value="../build/classes"/>

<!-- The "prepare" target is used to construct the deployment home
     directory structure (if necessary), and to copy in static files
     as required.  In the example below, Ant is instructed to create
     the deployment directory, copy the contents of the "web/" source
     hierarchy, and set up the WEB-INF subdirectory appropriately.

  <target name="prepare">
    <mkdir dir="${classes}"/>

<!-- The "clean" target removes the deployment home directory structure,
     so that the next time the "compile" target is requested, it will need
     to compile everything from scratch.

  <target name="clean">
     <delete dir="${classes}"/>

<!-- The "compile" target is used to compile (or recompile) the Java classes
     that make up this web application.  The recommended source code directory
     structure makes this very easy because the <javac> task automatically
     works its way down a source code hierarchy and compiles any class that
     has not yet been compiled, or where the source file is newer than the
     class file.

     Feel free to adjust the compilation option parameters (debug,
     optimize, and deprecation) to suit your requirements.  It is also
     possible to base them on properties, so that you can adjust this
     behavior at runtime.

     The "compile" task depends on the "prepare" task, so the deployment
     home directory structure will be created if needed the first time.

  <target name="compile" depends="prepare" description="Compiles the sources">
    <javac srcdir="../src/share/classes" 
           debug="on" deprecation="on"
      <classpath refid="javac.classpath" />

    <rmic classname="sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer"

  <target name="deploy" depends="compile" description="Creates a deployment bundle">
    <delete file="${classes}/${dist.jar}" />
    <copy todir="${classes}/sun/jvm/hotspot/utilities/soql/">
      <fileset dir="../src/share/classes/sun/jvm/hotspot/utilities/soql" includes="*.js" />

    <mkdir dir="${classes}/sun/jvm/hotspot/ui/resources" />
    <copy todir="${classes}/sun/jvm/hotspot/ui/resources">
      <fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" />
    <copy todir="${classes}/toolbarButtonGraphics/development/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/development/" includes="*.gif" />
    <copy todir="${classes}/toolbarButtonGraphics/general/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/general/" includes="*.gif" />
    <copy todir="${classes}/toolbarButtonGraphics/navigation/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/navigation/" includes="*.gif" />
    <copy todir="${classes}/toolbarButtonGraphics/text/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/text/" includes="*.gif" />

    <jar jarfile="${classes}/${dist.jar}"

  <target name="all" depends="deploy" description="Builds sources and deployment jar"/>