usr/src/java/build-common.xml
author devjani.ray@oracle.com <devjani.ray@oracle.com>
Fri, 06 May 2011 14:55:38 -0400
changeset 699 34ec90cc612c
parent 652 4f41b7727e42
child 748 abe2cd8b419a
permissions -rw-r--r--
adrgen5 - documentation generator
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     1
<?xml version="1.0"?>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     2
<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     3
  CDDL HEADER START
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     4
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     5
  The contents of this file are subject to the terms of the
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     6
  Common Development and Distribution License (the "License").
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     7
  You may not use this file except in compliance with the License.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     8
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
     9
  You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    10
  or http://www.opensolaris.org/os/licensing.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    11
  See the License for the specific language governing permissions
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    12
  and limitations under the License.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    13
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    14
  When distributing Covered Code, include this CDDL HEADER in each
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    15
  file and include the License file at usr/src/OPENSOLARIS.LICENSE.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    16
  If applicable, add the following below this CDDL HEADER, with the
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    17
  fields enclosed by brackets "[]" replaced with your own identifying
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    18
  information: Portions Copyright [yyyy] [name of copyright owner]
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    19
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    20
  CDDL HEADER END
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    21
652
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    22
  Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    23
-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    24
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    25
<project name="commondef">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    26
	<import file="env-common.xml"/>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    27
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    28
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    29
	  Projects can redefine these paths to set the classpath for
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    30
	  javac, javadoc (uses classpath.javac), and jar tasks.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    31
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    32
	<path id="classpath.javac" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    33
	<path id="classpath.jar" refid="classpath.javac" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    34
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    35
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    36
	  Generic copy/filter-based file generation task.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    37
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    38
	<macrodef name="generate.filter">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    39
		<attribute name="pattern" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    40
		<attribute name="fromdir" default="." />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    41
		<attribute name="from" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    42
		<attribute name="to" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    43
		<element name="filters" implicit="yes" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    44
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    45
			<copy todir="${proj.gen}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    46
				<globmapper from="@{from}" to="@{to}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    47
				<fileset dir="@{fromdir}"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    48
				    includes="@{pattern}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    49
				<filterset begintoken="&lt;" endtoken="&gt;">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    50
				    <filters />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    51
				</filterset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    52
			</copy>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    53
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    54
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    55
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    56
	<macrodef name="generate.adr">
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    57
		<attribute name="api" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    58
		<sequential>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    59
			<exec executable="/usr/bin/java">
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    60
				<arg value="-classpath" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    61
				<arg value="${ws.java}/adr/adr.jar" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    62
				<arg value=
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    63
				    "org.opensolaris.os.adr.adrgen.ADRGen" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    64
				<arg value="-j" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    65
				<arg value="${proj.gen}" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    66
				<arg value="${ws.apis}/@{api}" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    67
			</exec>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    68
		</sequential>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    69
	</macrodef>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    70
652
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    71
	<macrodef name="generate.adropt">
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    72
		<attribute name="api" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    73
		<sequential>
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    74
			<exec executable="/usr/bin/java">
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    75
				<arg value="-classpath" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    76
				<arg value="${ws.java}/adr/adr.jar" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    77
				<arg value=
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    78
				    "org.opensolaris.os.adr.adrgen.ADRGen" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    79
				<arg value="-N" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    80
				<arg value="-j" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    81
				<arg value="${proj.gen}" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    82
				<arg value="${ws.apis}/@{api}" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    83
			</exec>
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    84
		</sequential>
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    85
	</macrodef>
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    86
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    87
	<macrodef name="generate.adrimpl">
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    88
		<attribute name="api" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    89
		<sequential>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    90
			<exec executable="/usr/bin/java">
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    91
				<arg value="-classpath" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    92
				<arg value="${ws.java}/adr/adr.jar" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    93
				<arg value=
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    94
				    "org.opensolaris.os.adr.adrgen.ADRGen" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    95
				<arg value="-j" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    96
				<arg value="${proj.gen}" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    97
				<arg value="-i" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    98
				<arg value="${ws.apis}/@{api}" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    99
			</exec>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   100
		</sequential>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   101
	</macrodef>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   102
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   103
	<target name="generate_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   104
	<target name="generate" depends="generate_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   105
		<mkdir dir="${proj.gen}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   106
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   107
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   108
	<target name="clean_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   109
	<target name="clean" depends="clean_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   110
		<delete dir="${proj.build}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   111
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   112
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   113
	<target name="clobber_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   114
	<target name="clobber" depends="clean,clobber_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   115
		<delete file="${proj.jarfile}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   116
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   117
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   118
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   119
	  Default compile target body.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   120
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   121
	<presetdef name="javac.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   122
		<javac includeAntRuntime="no" sourcepathref="proj.srcroots"
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   123
		    destdir="${proj.classes}" debug="on"
314
8decc90a3ec6 9416 more fully featured FMRI type (fix lint)
David Powell <David.Powell@sun.com>
parents: 284
diff changeset
   124
		    classpathref="classpath.javac">
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   125
		    <src location="org" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   126
		    <src location="build/gen" />
314
8decc90a3ec6 9416 more fully featured FMRI type (fix lint)
David Powell <David.Powell@sun.com>
parents: 284
diff changeset
   127
		    <compilerarg value="-Xlint" />
8decc90a3ec6 9416 more fully featured FMRI type (fix lint)
David Powell <David.Powell@sun.com>
parents: 284
diff changeset
   128
		    <compilerarg value="-Xlint:-serial" />
8decc90a3ec6 9416 more fully featured FMRI type (fix lint)
David Powell <David.Powell@sun.com>
parents: 284
diff changeset
   129
		</javac>
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   130
	</presetdef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   131
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   132
	<target name="compile_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   133
	<target name="compile" depends="generate,compile_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   134
		<mkdir dir="${proj.classes}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   135
		<javac.default />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   136
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   137
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   138
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   139
	  Default jar target body.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   140
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   141
	<presetdef name="jar.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   142
		<jar destfile="${proj.jarfile}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   143
			<fileset dir="${proj.classes}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   144
			<fileset dir=".">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   145
				<patternset id="pattern.resources">
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   146
					<!-- <include name="org/**/*.rng" /> -->
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   147
					<include name="org/**/*.xsd" />
699
34ec90cc612c adrgen5 - documentation generator
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents: 652
diff changeset
   148
					<include name="org/**/*.xsl" />
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   149
					<include name="org/**/*.properties" />
591
7c5752b99fd6 12473 panels should probably be run in a sandbox
Stephen Talley <stephen.talley@oracle.com>
parents: 391
diff changeset
   150
					<include name="org/**/panel.policy" />
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   151
					<include name="org/**/help/**" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   152
					<include name="org/**/images/**" />
327
bb43a6fa6f0b 10096 time: new UI design and NTP support
Stephen Talley <stephen.talley@sun.com>
parents: 314
diff changeset
   153
					<exclude name="org/**/images/**/*.xcf" />
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   154
				</patternset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   155
			</fileset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   156
			<fileset dir="${proj.gen}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   157
				<patternset refid="pattern.resources" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   158
			</fileset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   159
		</jar>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   160
	</presetdef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   161
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   162
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   163
	  A pathmapper that maps from a classpath in build-space to
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   164
	  install-space, mapping paths in the workspace to a single
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   165
	  directory and leaving absolute paths alone.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   166
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   167
	<macrodef name="map.targetjar">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   168
		<attribute name="targetdir" default="${abs.java}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   169
		<attribute name="pathsep" default=" " />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   170
		<attribute name="property" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   171
		<attribute name="pathref" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   172
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   173
			<pathconvert pathsep="@{pathsep}" property="@{property}"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   174
			    refid="@{pathref}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   175
				<filtermapper>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   176
					<replaceregex pattern="^${ws.java}/.*/"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   177
					    replace="@{targetdir}/" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   178
				</filtermapper>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   179
			</pathconvert>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   180
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   181
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   182
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   183
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   184
	  Alternate jar target body, used for creating executables.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   185
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   186
	<macrodef name="jar.executable">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   187
		<attribute name="mainclass" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   188
		<attribute name="targetdir" default="${abs.java}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   189
		<element name="jar-elements" implicit="yes" optional="yes"/>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   190
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   191
			<map.targetjar targetdir="@{targetdir}"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   192
			    property="jarclasspath" pathref="classpath.jar" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   193
			<jar.default>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   194
			<manifest>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   195
				<attribute name="Main-Class"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   196
				    value="@{mainclass}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   197
				<attribute name="Class-Path"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   198
				    value="${jarclasspath}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   199
			</manifest>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   200
			<jar-elements />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   201
			</jar.default>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   202
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   203
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   204
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   205
	<target name="jar" depends="compile">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   206
		<jar.default />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   207
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   208
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   209
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   210
	  Default javadoc target body.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   211
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   212
	<presetdef name="javadoc.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   213
		<javadoc noqualifier="all" sourcepathref="proj.srcroots"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   214
		    destdir="${proj.javadoc}" classpathref="classpath.javac">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   215
			<packageset dir="." includes="org/" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   216
		</javadoc>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   217
	</presetdef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   218
594
d1172c8862df 17314 need way to build without building javadoc, revisited
Stephen Talley <stephen.talley@oracle.com>
parents: 591
diff changeset
   219
	<target name="javadoc" unless="env.ANT_SKIP_JAVADOC">
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   220
		<javadoc.default />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   221
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   222
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   223
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   224
	  Default install target body.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   225
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   226
	<macrodef name="install.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   227
		<attribute name="targetdir" default="${proto.java}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   228
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   229
			<mkdir dir="@{targetdir}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   230
			<copy file="${proj.jarfile}" todir="@{targetdir}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   231
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   232
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   233
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   234
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   235
	  Optionally used by a project's install_project to install
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   236
	  javadoc.  Currently copies from build/javadoc; in the future
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   237
	  it might make sense to build javadoc differently in, and
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   238
	  directly into, each location.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   239
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   240
	<macrodef name="install.javadoc">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   241
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   242
			<copy todir="${proto.javadoc}">
594
d1172c8862df 17314 need way to build without building javadoc, revisited
Stephen Talley <stephen.talley@oracle.com>
parents: 591
diff changeset
   243
				<fileset dir="${proj.javadoc}"
d1172c8862df 17314 need way to build without building javadoc, revisited
Stephen Talley <stephen.talley@oracle.com>
parents: 591
diff changeset
   244
				    erroronmissingdir="false"/>
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   245
			</copy>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   246
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   247
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   248
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   249
	<target name="install_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   250
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   251
	<target name="install" depends="jar,install_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   252
		<!-- Temporarily set targetdir -->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   253
		<install.default targetdir="${proto.vpanels}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   254
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   255
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   256
	<target name="all" depends="jar,javadoc" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   257
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   258
	<target name="lint" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   259
</project>