agent/make/build.xml

Tue, 08 Aug 2017 15:57:29 +0800

author
aoqi
date
Tue, 08 Aug 2017 15:57:29 +0800
changeset 6876
710a3c8b516e
parent 1907
c18cbe5936b8
parent 0
f90c822e73f8
permissions
-rw-r--r--

merge

aoqi@0 1 <?xml version="1.0" encoding="UTF-8"?>
aoqi@0 2 <!--
aoqi@0 3 Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
aoqi@0 4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 5
aoqi@0 6 This code is free software; you can redistribute it and/or modify it
aoqi@0 7 under the terms of the GNU General Public License version 2 only, as
aoqi@0 8 published by the Free Software Foundation.
aoqi@0 9
aoqi@0 10 This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 13 version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 14 accompanied this code).
aoqi@0 15
aoqi@0 16 You should have received a copy of the GNU General Public License version
aoqi@0 17 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 19
aoqi@0 20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 21 or visit www.oracle.com if you need additional information or have any
aoqi@0 22 questions.
aoqi@0 23
aoqi@0 24 -->
aoqi@0 25
aoqi@0 26 <!-- This is an Ant project file. Ant is a build tool like make or gnumake which is not
aoqi@0 27 dependent on the underlying OS shell. For more information on Ant, please see
aoqi@0 28 http://ant.apache.org/ -->
aoqi@0 29
aoqi@0 30 <!-- A "project" describes a set of targets that may be requested
aoqi@0 31 when Ant is executed. The "default" attribute defines the
aoqi@0 32 target which is executed if no specific target is requested,
aoqi@0 33 and the "basedir" attribute defines the current working directory
aoqi@0 34 from which Ant executes the requested task. This is normally
aoqi@0 35 set to the current working directory.
aoqi@0 36 -->
aoqi@0 37
aoqi@0 38
aoqi@0 39 <project name="HotSpot Serviceability Agent" default="all" basedir=".">
aoqi@0 40
aoqi@0 41 <!-- Property Definitions -->
aoqi@0 42
aoqi@0 43 <property name="app.name" value="sa"/>
aoqi@0 44 <property name="dist.jar" value="${app.name}.jar"/>
aoqi@0 45 <property name="classes" value="../build/classes"/>
aoqi@0 46
aoqi@0 47 <!-- The "prepare" target is used to construct the deployment home
aoqi@0 48 directory structure (if necessary), and to copy in static files
aoqi@0 49 as required. In the example below, Ant is instructed to create
aoqi@0 50 the deployment directory, copy the contents of the "web/" source
aoqi@0 51 hierarchy, and set up the WEB-INF subdirectory appropriately.
aoqi@0 52 -->
aoqi@0 53
aoqi@0 54 <target name="prepare">
aoqi@0 55 <mkdir dir="${classes}"/>
aoqi@0 56 </target>
aoqi@0 57
aoqi@0 58
aoqi@0 59 <!-- The "clean" target removes the deployment home directory structure,
aoqi@0 60 so that the next time the "compile" target is requested, it will need
aoqi@0 61 to compile everything from scratch.
aoqi@0 62 -->
aoqi@0 63
aoqi@0 64 <target name="clean">
aoqi@0 65 <delete dir="${classes}"/>
aoqi@0 66 </target>
aoqi@0 67
aoqi@0 68
aoqi@0 69 <!-- The "compile" target is used to compile (or recompile) the Java classes
aoqi@0 70 that make up this web application. The recommended source code directory
aoqi@0 71 structure makes this very easy because the <javac> task automatically
aoqi@0 72 works its way down a source code hierarchy and compiles any class that
aoqi@0 73 has not yet been compiled, or where the source file is newer than the
aoqi@0 74 class file.
aoqi@0 75
aoqi@0 76 Feel free to adjust the compilation option parameters (debug,
aoqi@0 77 optimize, and deprecation) to suit your requirements. It is also
aoqi@0 78 possible to base them on properties, so that you can adjust this
aoqi@0 79 behavior at runtime.
aoqi@0 80
aoqi@0 81 The "compile" task depends on the "prepare" task, so the deployment
aoqi@0 82 home directory structure will be created if needed the first time.
aoqi@0 83 -->
aoqi@0 84
aoqi@0 85 <target name="compile" depends="prepare" description="Compiles the sources">
aoqi@0 86 <javac srcdir="../src/share/classes"
aoqi@0 87 destdir="${classes}"
aoqi@0 88 debug="on" deprecation="on"
aoqi@0 89 source="1.4">
aoqi@0 90 <classpath refid="javac.classpath" />
aoqi@0 91 </javac>
aoqi@0 92
aoqi@0 93 <rmic classname="sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer"
aoqi@0 94 base="${classes}"/>
aoqi@0 95 </target>
aoqi@0 96
aoqi@0 97 <target name="deploy" depends="compile" description="Creates a deployment bundle">
aoqi@0 98 <delete file="${classes}/${dist.jar}" />
aoqi@0 99 <copy todir="${classes}/sun/jvm/hotspot/utilities/soql/">
aoqi@0 100 <fileset dir="../src/share/classes/sun/jvm/hotspot/utilities/soql" includes="*.js" />
aoqi@0 101 </copy>
aoqi@0 102
aoqi@0 103 <mkdir dir="${classes}/sun/jvm/hotspot/ui/resources" />
aoqi@0 104 <copy todir="${classes}/sun/jvm/hotspot/ui/resources">
aoqi@0 105 <fileset dir="../src/share/classes/sun/jvm/hotspot/ui/resources" includes="*.png" />
aoqi@0 106 </copy>
aoqi@0 107 <copy todir="${classes}/toolbarButtonGraphics/development/">
aoqi@0 108 <fileset dir="../src/share/classes/images/toolbarButtonGraphics/development/" includes="*.gif" />
aoqi@0 109 </copy>
aoqi@0 110 <copy todir="${classes}/toolbarButtonGraphics/general/">
aoqi@0 111 <fileset dir="../src/share/classes/images/toolbarButtonGraphics/general/" includes="*.gif" />
aoqi@0 112 </copy>
aoqi@0 113 <copy todir="${classes}/toolbarButtonGraphics/navigation/">
aoqi@0 114 <fileset dir="../src/share/classes/images/toolbarButtonGraphics/navigation/" includes="*.gif" />
aoqi@0 115 </copy>
aoqi@0 116 <copy todir="${classes}/toolbarButtonGraphics/text/">
aoqi@0 117 <fileset dir="../src/share/classes/images/toolbarButtonGraphics/text/" includes="*.gif" />
aoqi@0 118 </copy>
aoqi@0 119
aoqi@0 120 <jar jarfile="${classes}/${dist.jar}"
aoqi@0 121 basedir="${classes}"/>
aoqi@0 122 </target>
aoqi@0 123
aoqi@0 124 <target name="all" depends="deploy" description="Builds sources and deployment jar"/>
aoqi@0 125
aoqi@0 126 </project>

mercurial