build.xml 5.0 KB
Newer Older
D
duke 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2002-2007 Sun Microsystems, Inc.  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.

 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 www.sun.com if you need additional information or
 have any questions.
  
-->

<!-- 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
     http://ant.apache.org/ -->

<!-- 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="app.name" value="sa"/>
  <property name="dist.jar" value="${app.name}.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}"/>
  </target>


<!-- 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}"/>
  </target>


<!-- 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" 
           destdir="${classes}"
           debug="on" deprecation="on"
           source="1.4">
      <classpath refid="javac.classpath" />
    </javac>

    <rmic classname="sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer"
	  base="${classes}"/>
  </target>

  <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" />
    </copy>

    <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>
107 108 109 110 111 112 113 114 115 116 117 118
    <copy todir="${classes}/toolbarButtonGraphics/development/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/development/" includes="*.gif" />
    </copy>
    <copy todir="${classes}/toolbarButtonGraphics/general/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/general/" includes="*.gif" />
    </copy>
    <copy todir="${classes}/toolbarButtonGraphics/navigation/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/navigation/" includes="*.gif" />
    </copy>
    <copy todir="${classes}/toolbarButtonGraphics/text/">
      <fileset dir="../src/share/classes/images/toolbarButtonGraphics/text/" includes="*.gif" />
    </copy>
D
duke 已提交
119 120 121 122 123 124 125 126

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

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

</project>