usr/src/java/build-common.xml
author David Powell <david.e.powell@oracle.com>
Thu, 11 Aug 2011 15:41:42 -0700
changeset 764 ebb25c1dac73
parent 748 abe2cd8b419a
child 797 a33daeba9b4c
permissions -rw-r--r--
18812 Support building with alternate java implementations
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
748
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    35
	<presetdef name="copy.remove.cddl">
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    36
	    <copy>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    37
		<filterchain>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    38
			<filterreader
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    39
			    classname="com.oracle.solaris.util.ant.RemoveCDDLFilterReader">
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    40
				
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    41
			    <classpath>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    42
				    <pathelement
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    43
					path="${ws.java}/ant/ant.jar"/>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    44
			    </classpath> 
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    45
			</filterreader>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    46
		</filterchain>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    47
	    </copy>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    48
	</presetdef>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
    49
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    50
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    51
	  Generic copy/filter-based file generation task.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    52
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    53
	<macrodef name="generate.filter">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    54
		<attribute name="pattern" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    55
		<attribute name="fromdir" default="." />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    56
		<attribute name="from" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    57
		<attribute name="to" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    58
		<element name="filters" implicit="yes" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    59
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    60
			<copy todir="${proj.gen}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    61
				<globmapper from="@{from}" to="@{to}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    62
				<fileset dir="@{fromdir}"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    63
				    includes="@{pattern}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    64
				<filterset begintoken="&lt;" endtoken="&gt;">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    65
				    <filters />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    66
				</filterset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    67
			</copy>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    68
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    69
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
    70
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    71
	<macrodef name="generate.adr">
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    72
		<attribute name="api" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    73
		<sequential>
764
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
    74
			<java fork="yes" classpath="${ws.java}/adr/adr.jar"
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
    75
			    classname="org.opensolaris.os.adr.adrgen.ADRGen">
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    76
				<arg value="-j" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    77
				<arg value="${proj.gen}" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    78
				<arg value="${ws.apis}/@{api}" />
764
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
    79
			</java>
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    80
		</sequential>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    81
	</macrodef>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    82
652
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    83
	<macrodef name="generate.adropt">
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    84
		<attribute name="api" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    85
		<sequential>
764
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
    86
			<java fork="yes" classpath="${ws.java}/adr/adr.jar"
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
    87
			    classname="org.opensolaris.os.adr.adrgen.ADRGen">
652
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    88
				<arg value="-N" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    89
				<arg value="-j" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    90
				<arg value="${proj.gen}" />
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    91
				<arg value="${ws.apis}/@{api}" />
764
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
    92
			</java>
652
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    93
		</sequential>
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    94
	</macrodef>
4f41b7727e42 17867 enforce optional type restrictions
David Powell <david.e.powell@oracle.com>
parents: 594
diff changeset
    95
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    96
	<macrodef name="generate.adrimpl">
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    97
		<attribute name="api" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
    98
		<sequential>
764
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
    99
			<java fork="yes" classpath="${ws.java}/adr/adr.jar"
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
   100
			    classname="org.opensolaris.os.adr.adrgen.ADRGen">
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   101
				<arg value="-j" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   102
				<arg value="${proj.gen}" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   103
				<arg value="-i" />
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   104
				<arg value="${ws.apis}/@{api}" />
764
ebb25c1dac73 18812 Support building with alternate java implementations
David Powell <david.e.powell@oracle.com>
parents: 748
diff changeset
   105
			</java>
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   106
		</sequential>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   107
	</macrodef>
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   108
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   109
	<target name="generate_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   110
	<target name="generate" depends="generate_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   111
		<mkdir dir="${proj.gen}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   112
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   113
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   114
	<target name="clean_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   115
	<target name="clean" depends="clean_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   116
		<delete dir="${proj.build}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   117
	</target>
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
	<target name="clobber_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   120
	<target name="clobber" depends="clean,clobber_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   121
		<delete file="${proj.jarfile}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   122
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   123
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   124
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   125
	  Default compile target body.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   126
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   127
	<presetdef name="javac.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   128
		<javac includeAntRuntime="no" sourcepathref="proj.srcroots"
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   129
		    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
   130
		    classpathref="classpath.javac">
748
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
   131
		    <src>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
   132
			<dirset dir=".">
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
   133
			    <include name="com"/>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
   134
			    <include name="org"/>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
   135
			</dirset>
abe2cd8b419a 18737 remove cddl from binary product
Stephen Talley <stephen.talley@oracle.com>
parents: 699
diff changeset
   136
		    </src>
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   137
		    <src location="build/gen" />
314
8decc90a3ec6 9416 more fully featured FMRI type (fix lint)
David Powell <David.Powell@sun.com>
parents: 284
diff changeset
   138
		    <compilerarg value="-Xlint" />
8decc90a3ec6 9416 more fully featured FMRI type (fix lint)
David Powell <David.Powell@sun.com>
parents: 284
diff changeset
   139
		    <compilerarg value="-Xlint:-serial" />
8decc90a3ec6 9416 more fully featured FMRI type (fix lint)
David Powell <David.Powell@sun.com>
parents: 284
diff changeset
   140
		</javac>
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   141
	</presetdef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   142
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   143
	<target name="compile_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   144
	<target name="compile" depends="generate,compile_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   145
		<mkdir dir="${proj.classes}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   146
		<javac.default />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   147
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   148
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   149
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   150
	  Default jar target body.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   151
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   152
	<presetdef name="jar.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   153
		<jar destfile="${proj.jarfile}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   154
			<fileset dir="${proj.classes}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   155
			<fileset dir=".">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   156
				<patternset id="pattern.resources">
391
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   157
					<!-- <include name="org/**/*.rng" /> -->
71abce159a62 13357 rad
David Powell <David.Powell@sun.com>
parents: 327
diff changeset
   158
					<include name="org/**/*.xsd" />
699
34ec90cc612c adrgen5 - documentation generator
devjani.ray@oracle.com <devjani.ray@oracle.com>
parents: 652
diff changeset
   159
					<include name="org/**/*.xsl" />
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   160
					<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
   161
					<include name="org/**/panel.policy" />
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   162
					<include name="org/**/help/**" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   163
					<include name="org/**/images/**" />
327
bb43a6fa6f0b 10096 time: new UI design and NTP support
Stephen Talley <stephen.talley@sun.com>
parents: 314
diff changeset
   164
					<exclude name="org/**/images/**/*.xcf" />
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   165
				</patternset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   166
			</fileset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   167
			<fileset dir="${proj.gen}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   168
				<patternset refid="pattern.resources" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   169
			</fileset>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   170
		</jar>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   171
	</presetdef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   172
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   173
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   174
	  A pathmapper that maps from a classpath in build-space to
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   175
	  install-space, mapping paths in the workspace to a single
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   176
	  directory and leaving absolute paths alone.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   177
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   178
	<macrodef name="map.targetjar">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   179
		<attribute name="targetdir" default="${abs.java}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   180
		<attribute name="pathsep" default=" " />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   181
		<attribute name="property" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   182
		<attribute name="pathref" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   183
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   184
			<pathconvert pathsep="@{pathsep}" property="@{property}"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   185
			    refid="@{pathref}">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   186
				<filtermapper>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   187
					<replaceregex pattern="^${ws.java}/.*/"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   188
					    replace="@{targetdir}/" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   189
				</filtermapper>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   190
			</pathconvert>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   191
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   192
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   193
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   194
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   195
	  Alternate jar target body, used for creating executables.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   196
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   197
	<macrodef name="jar.executable">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   198
		<attribute name="mainclass" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   199
		<attribute name="targetdir" default="${abs.java}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   200
		<element name="jar-elements" implicit="yes" optional="yes"/>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   201
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   202
			<map.targetjar targetdir="@{targetdir}"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   203
			    property="jarclasspath" pathref="classpath.jar" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   204
			<jar.default>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   205
			<manifest>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   206
				<attribute name="Main-Class"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   207
				    value="@{mainclass}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   208
				<attribute name="Class-Path"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   209
				    value="${jarclasspath}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   210
			</manifest>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   211
			<jar-elements />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   212
			</jar.default>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   213
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   214
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   215
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   216
	<target name="jar" depends="compile">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   217
		<jar.default />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   218
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   219
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   220
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   221
	  Default javadoc target body.
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
	<presetdef name="javadoc.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   224
		<javadoc noqualifier="all" sourcepathref="proj.srcroots"
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   225
		    destdir="${proj.javadoc}" classpathref="classpath.javac">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   226
			<packageset dir="." includes="org/" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   227
		</javadoc>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   228
	</presetdef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   229
594
d1172c8862df 17314 need way to build without building javadoc, revisited
Stephen Talley <stephen.talley@oracle.com>
parents: 591
diff changeset
   230
	<target name="javadoc" unless="env.ANT_SKIP_JAVADOC">
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   231
		<javadoc.default />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   232
	</target>
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
	  Default install target body.
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   236
	-->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   237
	<macrodef name="install.default">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   238
		<attribute name="targetdir" default="${proto.java}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   239
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   240
			<mkdir dir="@{targetdir}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   241
			<copy file="${proj.jarfile}" todir="@{targetdir}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   242
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   243
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   244
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   245
	<!--
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   246
	  Optionally used by a project's install_project to install
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   247
	  javadoc.  Currently copies from build/javadoc; in the future
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   248
	  it might make sense to build javadoc differently in, and
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   249
	  directly into, each location.
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
	<macrodef name="install.javadoc">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   252
		<sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   253
			<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
   254
				<fileset dir="${proj.javadoc}"
d1172c8862df 17314 need way to build without building javadoc, revisited
Stephen Talley <stephen.talley@oracle.com>
parents: 591
diff changeset
   255
				    erroronmissingdir="false"/>
0
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   256
			</copy>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   257
		</sequential>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   258
	</macrodef>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   259
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   260
	<target name="install_project" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   261
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   262
	<target name="install" depends="jar,install_project">
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   263
		<!-- Temporarily set targetdir -->
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   264
		<install.default targetdir="${proto.vpanels}" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   265
	</target>
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   266
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   267
	<target name="all" depends="jar,javadoc" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   268
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   269
	<target name="lint" />
62ac12e07fc0 Initial integration.
David Powell <David.Powell@sun.com>
parents:
diff changeset
   270
</project>