7011272: langtools build.xml should provide a patch target

Fri, 14 Jan 2011 13:59:18 -0800

author
ksrini
date
Fri, 14 Jan 2011 13:59:18 -0800
changeset 825
19f9b6548c70
parent 824
0a509c765657
child 826
5cf6c432ef2f

7011272: langtools build.xml should provide a patch target
Reviewed-by: jonathan, jjh

make/build.xml file | annotate | diff | comparison | revisions
     1.1 --- a/make/build.xml	Fri Jan 14 11:55:53 2011 -0800
     1.2 +++ b/make/build.xml	Fri Jan 14 13:59:18 2011 -0800
     1.3 @@ -352,6 +352,45 @@
     1.4          </java>
     1.5      </target>
     1.6  
     1.7 +    <!-- a patching facility to speed up incorporating the langtools' classfiles
     1.8 +         into a jdk of your choice. Either target.java.home or patch.jdk can be
     1.9 +         set on the command line; setting target.java.home has the advantage of
    1.10 +         patching the jdk used for jtreg and other tests.
    1.11 +    -->
    1.12 +    <target name="patch" depends="build-all-classes">
    1.13 +        <condition property="patch.jdk" value="${target.java.home}">
    1.14 +            <available file="${target.java.home}" type="dir"/>
    1.15 +        </condition>
    1.16 +        <fail message="patch.jdk or target.java.home is not set, please set target.java.home, or patch.jdk for an alternate jdk image to patch">
    1.17 +            <condition>
    1.18 +                <not>
    1.19 +                    <isset property="patch.jdk"/>
    1.20 +                </not>
    1.21 +            </condition>
    1.22 +        </fail>
    1.23 +        <property name="patch.tools.jar" location="${patch.jdk}/lib/tools.jar"/>
    1.24 +        <property name="patch.rt.jar" location="${patch.jdk}/jre/lib/rt.jar"/>
    1.25 +        <fail message="patch.jdk or target.java.home must point to a valid jdk image: missing tools.jar">
    1.26 +            <condition>
    1.27 +                <not>
    1.28 +                    <available file="${patch.tools.jar}" type="file"/>
    1.29 +                </not>
    1.30 +            </condition>
    1.31 +        </fail>
    1.32 +        <fail message="patch.jdk or target.java.home must point to a valid jdk image: missing rt.jar">
    1.33 +            <condition>
    1.34 +                <not>
    1.35 +                    <available file="${patch.rt.jar}" type="file"/>
    1.36 +                </not>
    1.37 +            </condition>
    1.38 +        </fail>
    1.39 +        <zip zipfile="${patch.tools.jar}" update="true">
    1.40 +            <zipfileset dir="${build.classes.dir}" includes="com/**"/>
    1.41 +        </zip>
    1.42 +        <zip zipfile="${patch.rt.jar}" update="true">
    1.43 +            <zipfileset dir="${build.classes.dir}" includes="javax/**"/>
    1.44 +        </zip>
    1.45 +    </target>
    1.46  
    1.47      <!--
    1.48      **** Debugging/diagnostic targets.

mercurial