Skip to content
Snippets Groups Projects
Commit 72c4ec54 authored by Erik Joelsson's avatar Erik Joelsson
Browse files

8187444: Forest Consolidation: Make build work

parent 3789983e
Branches
Tags
No related merge requests found
Showing with 377 additions and 1756 deletions
...@@ -8,3 +8,6 @@ nbproject/private/ ...@@ -8,3 +8,6 @@ nbproject/private/
\.DS_Store \.DS_Store
\.metadata/ \.metadata/
\.recommenders/ \.recommenders/
test/nashorn/script/external
test/nashorn/lib
NashornProfile.txt
...@@ -4,7 +4,7 @@ Welcome to OpenJDK! ...@@ -4,7 +4,7 @@ Welcome to OpenJDK!
For information about building OpenJDK, including how to fully retrieve all For information about building OpenJDK, including how to fully retrieve all
source code, please see either of these: source code, please see either of these:
* common/doc/building.html (html version) * doc/building.html (html version)
* common/doc/building.md (markdown version) * doc/building.md (markdown version)
See http://openjdk.java.net/ for more information about OpenJDK. See http://openjdk.java.net/ for more information about OpenJDK.
...@@ -32,7 +32,7 @@ usage() { ...@@ -32,7 +32,7 @@ usage() {
SCRIPT_DIR=`dirname $0` SCRIPT_DIR=`dirname $0`
PWD=`pwd` PWD=`pwd`
cd $SCRIPT_DIR; SCRIPT_DIR=`pwd` cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
cd ../../; TOP=`pwd`; cd $PWD cd ../; TOP=`pwd`; cd $PWD
IDEA_OUTPUT=$TOP/.idea IDEA_OUTPUT=$TOP/.idea
VERBOSE="false" VERBOSE="false"
...@@ -70,8 +70,10 @@ IDEA_MAKE="$TOP/make/idea" ...@@ -70,8 +70,10 @@ IDEA_MAKE="$TOP/make/idea"
IDEA_TEMPLATE="$IDEA_MAKE/template" IDEA_TEMPLATE="$IDEA_MAKE/template"
IML_TEMPLATE="$IDEA_TEMPLATE/jdk.iml" IML_TEMPLATE="$IDEA_TEMPLATE/jdk.iml"
ANT_TEMPLATE="$IDEA_TEMPLATE/ant.xml" ANT_TEMPLATE="$IDEA_TEMPLATE/ant.xml"
MISC_TEMPLATE="$IDEA_TEMPLATE/misc.xml"
IDEA_IML="$IDEA_OUTPUT/jdk.iml" IDEA_IML="$IDEA_OUTPUT/jdk.iml"
IDEA_ANT="$IDEA_OUTPUT/ant.xml" IDEA_ANT="$IDEA_OUTPUT/ant.xml"
IDEA_MISC="$IDEA_OUTPUT/misc.xml"
if [ "$VERBOSE" = "true" ] ; then if [ "$VERBOSE" = "true" ] ; then
echo "output dir: $IDEA_OUTPUT" echo "output dir: $IDEA_OUTPUT"
...@@ -120,7 +122,6 @@ addSourceFolder() { ...@@ -120,7 +122,6 @@ addSourceFolder() {
} }
### Generate project iml ### Generate project iml
RELATIVE_BUILD_DIR="`dirname $SPEC | sed -e s@"$TOP/\(.*$\)"@"\1"@`"
rm -f $IDEA_IML rm -f $IDEA_IML
while IFS= read -r line while IFS= read -r line
do do
...@@ -131,9 +132,6 @@ do ...@@ -131,9 +132,6 @@ do
addSourceFolder $root addSourceFolder $root
done done
fi fi
elif echo "$line" | egrep "^ .* <excludeFolder.*####" > /dev/null ; then
ul="`echo "$line" | sed -e s@"\(.*/\)####\(.*\)"@"\1$RELATIVE_BUILD_DIR\2"@`"
printf "%s\n" "$ul" >> $IDEA_IML
else else
printf "%s\n" "$line" >> $IDEA_IML printf "%s\n" "$line" >> $IDEA_IML
fi fi
...@@ -155,14 +153,6 @@ addBuildDir() { ...@@ -155,14 +153,6 @@ addBuildDir() {
printf "%s\n" "$mn" >> $IDEA_ANT printf "%s\n" "$mn" >> $IDEA_ANT
} }
JTREG_HOME=" <property name=\"jtreg.home\" value=\"####\" />"
addJtregHome() {
DIR=`dirname $SPEC`
mn="`echo "$JTREG_HOME" | sed -e s@"\(.*\)####\(.*\)"@"\1$JT_HOME\2"@`"
printf "%s\n" "$mn" >> $IDEA_ANT
}
### Generate ant.xml ### Generate ant.xml
rm -f $IDEA_ANT rm -f $IDEA_ANT
...@@ -170,8 +160,6 @@ while IFS= read -r line ...@@ -170,8 +160,6 @@ while IFS= read -r line
do do
if echo "$line" | egrep "^ .* <property name=\"module.name\"" > /dev/null ; then if echo "$line" | egrep "^ .* <property name=\"module.name\"" > /dev/null ; then
addModuleName addModuleName
elif echo "$line" | egrep "^ .* <property name=\"jtreg.home\"" > /dev/null ; then
addJtregHome
elif echo "$line" | egrep "^ .* <property name=\"build.target.dir\"" > /dev/null ; then elif echo "$line" | egrep "^ .* <property name=\"build.target.dir\"" > /dev/null ; then
addBuildDir addBuildDir
else else
...@@ -179,6 +167,38 @@ do ...@@ -179,6 +167,38 @@ do
fi fi
done < "$ANT_TEMPLATE" done < "$ANT_TEMPLATE"
### Generate misc.xml
rm -f $IDEA_MISC
JTREG_HOME=" <path>####</path>"
IMAGES_DIR=" <jre alt=\"true\" value=\"####\" />"
addImagesDir() {
DIR=`dirname $SPEC`/images/jdk
mn="`echo "$IMAGES_DIR" | sed -e s@"\(.*\)####\(.*\)"@"\1$DIR\2"@`"
printf "%s\n" "$mn" >> $IDEA_MISC
}
addJtregHome() {
DIR=`dirname $SPEC`
mn="`echo "$JTREG_HOME" | sed -e s@"\(.*\)####\(.*\)"@"\1$JT_HOME\2"@`"
printf "%s\n" "$mn" >> $IDEA_MISC
}
rm -f $MISC_ANT
while IFS= read -r line
do
if echo "$line" | egrep "^ .*<path>jtreg_home</path>" > /dev/null ; then
addJtregHome
elif echo "$line" | egrep "^ .*<jre alt=\"true\" value=\"images_jdk\"" > /dev/null ; then
addImagesDir
else
printf "%s\n" "$line" >> $IDEA_MISC
fi
done < "$MISC_TEMPLATE"
### Compile the custom Logger ### Compile the custom Logger
CLASSES=$IDEA_OUTPUT/classes CLASSES=$IDEA_OUTPUT/classes
......
...@@ -42,7 +42,7 @@ setup_url() { ...@@ -42,7 +42,7 @@ setup_url() {
jib_revision="2.0-SNAPSHOT" jib_revision="2.0-SNAPSHOT"
jib_ext="jib.sh.gz" jib_ext="jib.sh.gz"
closed_script="${mydir}/../../closed/conf/jib-install.conf" closed_script="${mydir}/../../../closed/conf/jib-install.conf"
if [ -f "${closed_script}" ]; then if [ -f "${closed_script}" ]; then
source "${closed_script}" source "${closed_script}"
fi fi
......
This diff is collapsed.
#!/bin/sh #!/bin/bash
# #
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
# Script for updating a patch file as per the shuffled/unshuffled source location. # Script for updating a patch file as per the shuffled/unshuffled source location.
usage() { usage() {
echo "Usage: $0 [-h|--help] [-v|--verbose] <repo> <input_patch> <output_patch>" echo "Usage: $0 [-h|--help] [-v|--verbose] [-to9|-to10] [-r <repo>] <input_patch> <output_patch>"
echo "where:" echo "where:"
echo " <repo> is one of: corba, jaxp, jaxws, jdk, langtools, nashorn" echo " -to9 create patches appropriate for a JDK 9 source tree"
echo " [Note: patches from other repos do not need updating]" echo " When going to 9, the output patches will be suffixed with the"
echo " repo name"
echo " -to10 create patches appropriate for a JDK 10 source tree"
echo " -r <repo> specify repo for source patch, set to 'top' for top repo"
echo " <input_patch> is the input patch file, that needs shuffling/unshuffling" echo " <input_patch> is the input patch file, that needs shuffling/unshuffling"
echo " <output_patch> is the updated patch file " echo " <output_patch> is the updated patch file "
echo " " echo " "
...@@ -55,6 +58,19 @@ do ...@@ -55,6 +58,19 @@ do
vflag="true" vflag="true"
;; ;;
-r)
repo="$2"
shift
;;
-to9)
shuffle_to=9
;;
-to10)
shuffle_to=10
;;
-*) # bad option -*) # bad option
usage usage
;; ;;
...@@ -67,15 +83,15 @@ do ...@@ -67,15 +83,15 @@ do
done done
# Make sure we have the right number of arguments # Make sure we have the right number of arguments
if [ ! $# -eq 3 ] ; then if [ ! $# -eq 2 ] ; then
echo "ERROR: Invalid number of arguments." >&2 echo "ERROR: Invalid number of arguments." >&2
usage usage
fi fi
# Check the given repo # Check the given repo
repos="corba jaxp jaxws jdk langtools nashorn" repos="top corba jaxp jaxws jdk langtools nashorn hotspot"
repo="$1"
found="false" found="false"
if [ -n "$repo" ]; then
for r in $repos ; do for r in $repos ; do
if [ $repo = "$r" ] ; then if [ $repo = "$r" ] ; then
found="true" found="true"
...@@ -86,9 +102,21 @@ if [ $found = "false" ] ; then ...@@ -86,9 +102,21 @@ if [ $found = "false" ] ; then
echo "ERROR: Unknown repo: $repo. Should be one of [$repos]." >&2 echo "ERROR: Unknown repo: $repo. Should be one of [$repos]." >&2
usage usage
fi fi
fi
if [ "$shuffle_to" != "9" -a "$shuffle_to" != "10" ]; then
echo "ERROR: Must pick either -to9 or -to10"
exit 1
fi
# When going to 10, a repo must be specified for the source patch
if [ "$shuffle_to" = "10" -a -z "$repo" ]; then
echo "ERROR: Must specify src repo for JDK 9 patch"
exit 1
fi
# Check given input/output files # Check given input/output files
input="$2" input="$1"
if [ "x$input" = "x-" ] ; then if [ "x$input" = "x-" ] ; then
input="/dev/stdin" input="/dev/stdin"
fi fi
...@@ -98,17 +126,25 @@ if [ ! -f $input -a "x$input" != "x/dev/stdin" ] ; then ...@@ -98,17 +126,25 @@ if [ ! -f $input -a "x$input" != "x/dev/stdin" ] ; then
exit 1 exit 1
fi fi
output="$3" output="$2"
if [ "x$output" = "x-" ] ; then if [ "x$output" = "x-" ] ; then
output="/dev/stdout" output="/dev/stdout"
fi fi
base_output="$output"
if [ "$shuffle_to" = "10" ]; then
if [ -f $output -a "x$output" != "x/dev/stdout" ] ; then if [ -f $output -a "x$output" != "x/dev/stdout" ] ; then
echo "ERROR: Output patch already exists: $output" >&2 echo "ERROR: Output patch already exists: $output" >&2
exit 1 exit 1
fi fi
else
what="" ## shuffle or unshuffle for r in $repos; do
if [ -f "$output.$r" ]; then
echo "ERROR: Output patch already exists: $output.$r" >&2
exit 1
fi
done
fi
verbose() { verbose() {
if [ ${vflag} = "true" ] ; then if [ ${vflag} = "true" ] ; then
...@@ -135,30 +171,17 @@ unshuffle() { ...@@ -135,30 +171,17 @@ unshuffle() {
fi fi
verbose "Extracted path: \"$path\"" verbose "Extracted path: \"$path\""
# Only source can be shuffled, or unshuffled
if ! echo "$path" | egrep '^src/.*' > /dev/null ; then
verbose "Not a src path, skipping."
echo "$line" >> $output
return
fi
# Shuffle or unshuffle?
if [ "${what}" = "" ] ; then
if echo "$path" | egrep '^src/java\..*|^src/jdk\..*' > /dev/null ; then
what="unshuffle"
else
what="shuffle"
fi
verbose "Shuffle or unshuffle: $what"
fi
# Find the most specific matches in the shuffle list # Find the most specific matches in the shuffle list
matches= matches=
if [ -n "$repo" -a "$repo" != "top" ]; then
matchpath="$repo"/"$path"/x matchpath="$repo"/"$path"/x
else
matchpath="$path"/x
fi
while [ "$matchpath" != "" ] ; do while [ "$matchpath" != "" ] ; do
matchpath="`echo $matchpath | sed s@'\(.*\)/.*$'@'\1'@`" matchpath="`echo $matchpath | sed s@'\(.*\)/.*$'@'\1'@`"
if [ "${what}" = "shuffle" ] ; then if [ "$shuffle_to" = "10" ] ; then
pattern=": $matchpath$" pattern=": $matchpath$"
else else
pattern="^$matchpath :" pattern="^$matchpath :"
...@@ -177,12 +200,24 @@ unshuffle() { ...@@ -177,12 +200,24 @@ unshuffle() {
# Rewrite the line, if we have a match # Rewrite the line, if we have a match
if ! [ "x${matches}" = "x" ] ; then if ! [ "x${matches}" = "x" ] ; then
shuffled="`echo "$matches" | sed -e s@' : .*'@@g -e s@'^[a-z]*\/'@@`" shuffled="${matches%% : *}"
unshuffled="`echo "$matches" | sed -e s@'.* : '@@g -e s@'^[a-z]*\/'@@`" unshuffled="${matches#* : }"
if [ "${what}" = "shuffle" ] ; then patch_suffix_9=""
for r in $repos; do
if [ "$unshuffled" != "${unshuffled#$r}" ]; then
unshuffled="${unshuffled#$r\/}"
patch_suffix_9=".$r"
fi
done
verbose "shuffled: $shuffled"
verbose "unshuffled: $unshuffled"
verbose "patch_suffix_9: $patch_suffix_9"
if [ "$shuffle_to" = "10" ] ; then
newline="`echo "$line" | sed -e s@"$unshuffled"@"$shuffled"@g`" newline="`echo "$line" | sed -e s@"$unshuffled"@"$shuffled"@g`"
else else
newline="`echo "$line" | sed -e s@"$shuffled"@"$unshuffled"@g`" newline="`echo "$line" | sed -e s@"$shuffled"@"$unshuffled"@g`"
output=$base_output$patch_suffix_9
verbose "Writing to $output"
fi fi
verbose "Rewriting to \"$newline\"" verbose "Rewriting to \"$newline\""
echo "$newline" >> $output echo "$newline" >> $output
......
...@@ -32,4 +32,4 @@ this_script_dir=`cd $this_script_dir > /dev/null && pwd` ...@@ -32,4 +32,4 @@ this_script_dir=`cd $this_script_dir > /dev/null && pwd`
# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c. # Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
# This trick is needed to get autoconf to co-operate properly. # This trick is needed to get autoconf to co-operate properly.
# The ${-:+-$-} construction passes on bash options. # The ${-:+-$-} construction passes on bash options.
bash ${-:+-$-} -c ". $this_script_dir/common/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@" bash ${-:+-$-} -c ". $this_script_dir/make/autoconf/configure" $this_script_dir/configure CHECKME $this_script_dir "$@"
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Building OpenJDK</title> <title>Building OpenJDK</title>
<style type="text/css">code{white-space: pre;}</style> <style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" href="../../jdk/make/data/docs-resources/resources/jdk-default.css"> <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]--> <![endif]-->
...@@ -22,9 +22,6 @@ ...@@ -22,9 +22,6 @@
<li><a href="#introduction">Introduction</a></li> <li><a href="#introduction">Introduction</a></li>
<li><a href="#getting-the-source-code">Getting the Source Code</a><ul> <li><a href="#getting-the-source-code">Getting the Source Code</a><ul>
<li><a href="#special-considerations">Special Considerations</a></li> <li><a href="#special-considerations">Special Considerations</a></li>
<li><a href="#using-get_source.sh">Using get_source.sh</a></li>
<li><a href="#using-hgforest.sh">Using hgforest.sh</a></li>
<li><a href="#using-the-trees-extension">Using the Trees Extension</a></li>
</ul></li> </ul></li>
<li><a href="#build-hardware-requirements">Build Hardware Requirements</a><ul> <li><a href="#build-hardware-requirements">Build Hardware Requirements</a><ul>
<li><a href="#building-on-x86">Building on x86</a></li> <li><a href="#building-on-x86">Building on x86</a></li>
...@@ -119,7 +116,7 @@ ...@@ -119,7 +116,7 @@
<p>If you are eager to try out building OpenJDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level OpenJDK repository that you want to build.</p> <p>If you are eager to try out building OpenJDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level OpenJDK repository that you want to build.</p>
<ol type="1"> <ol type="1">
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br /> <li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
<code>bash get_source.sh</code></p></li> <code>hg clone http://hg.openjdk.java.net/jdk10/master</code></p></li>
<li><p><a href="#running-configure">Run configure</a>:<br /> <li><p><a href="#running-configure">Run configure</a>:<br />
<code>bash configure</code></p> <code>bash configure</code></p>
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li> <p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
...@@ -135,8 +132,7 @@ ...@@ -135,8 +132,7 @@
<p>OpenJDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p> <p>OpenJDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p>
<p>If you just want to use OpenJDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt OpenJDK.</p> <p>If you just want to use OpenJDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt OpenJDK.</p>
<h2 id="getting-the-source-code">Getting the Source Code</h2> <h2 id="getting-the-source-code">Getting the Source Code</h2>
<p>OpenJDK uses <a href="http://www.mercurial-scm.org">Mercurial</a> for source control. The source code is contained not in a single Mercurial repository, but in a tree (&quot;forest&quot;) of interrelated repositories. You will need to check out all of the repositories to be able to build OpenJDK. To assist you in dealing with this somewhat unusual arrangement, there are multiple tools available, which are explained below.</p> <p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="http://hg.openjdk.java.net/">OpenJDK Mercurial server</a> you can see a list of all available forests. If you want to build an older version, e.g. JDK 8, it is recommended that you get the <code>jdk8u</code> forest, which contains incremental updates, instead of the <code>jdk8</code> forest, which was frozen at JDK 8 GA.</p>
<p>In any case, make sure you are getting the correct version. At the <a href="http://hg.openjdk.java.net/">OpenJDK Mercurial server</a> you can see a list of all available forests. If you want to build an older version, e.g. JDK 8, it is recommended that you get the <code>jdk8u</code> forest, which contains incremental updates, instead of the <code>jdk8</code> forest, which was frozen at JDK 8 GA.</p>
<p>If you are new to Mercurial, a good place to start is the <a href="http://www.mercurial-scm.org/guide">Mercurial Beginner's Guide</a>. The rest of this document assumes a working knowledge of Mercurial.</p> <p>If you are new to Mercurial, a good place to start is the <a href="http://www.mercurial-scm.org/guide">Mercurial Beginner's Guide</a>. The rest of this document assumes a working knowledge of Mercurial.</p>
<h3 id="special-considerations">Special Considerations</h3> <h3 id="special-considerations">Special Considerations</h3>
<p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p> <p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p>
...@@ -152,45 +148,6 @@ ...@@ -152,45 +148,6 @@
</ul> </ul>
<p>Failure to follow this procedure might result in hard-to-debug build problems.</p></li> <p>Failure to follow this procedure might result in hard-to-debug build problems.</p></li>
</ul> </ul>
<h3 id="using-get_source.sh">Using get_source.sh</h3>
<p>The simplest way to get the entire forest is probably to clone the top-level repository and then run the <code>get_source.sh</code> script, like this:</p>
<pre><code>hg clone http://hg.openjdk.java.net/jdk9/jdk9
cd jdk9
bash get_source.sh</code></pre>
<p>The first time this is run, it will clone all the sub-repositories. Any subsequent execution of the script will update all sub-repositories to the latest revision.</p>
<h3 id="using-hgforest.sh">Using hgforest.sh</h3>
<p>The <code>hgforest.sh</code> script is more expressive than <code>get_source.sh</code>. It takes any number of arguments, and runs <code>hg</code> with those arguments on each sub-repository in the forest. The <code>get_source.sh</code> script is basically a simple wrapper that runs either <code>hgforest.sh clone</code> or <code>hgforest.sh pull -u</code>.</p>
<ul>
<li><p>Cloning the forest:</p>
<pre><code>hg clone http://hg.openjdk.java.net/jdk9/jdk9
cd jdk9
bash common/bin/hgforest.sh clone</code></pre></li>
<li><p>Pulling and updating the forest:</p>
<pre><code>bash common/bin/hgforest.sh pull -u</code></pre></li>
<li><p>Merging over the entire forest:</p>
<pre><code>bash common/bin/hgforest.sh merge</code></pre></li>
</ul>
<h3 id="using-the-trees-extension">Using the Trees Extension</h3>
<p>The trees extension is a Mercurial add-on that helps you deal with the forest. More information is available on the <a href="http://openjdk.java.net/projects/code-tools/trees">Code Tools trees page</a>.</p>
<h4 id="installing-the-extension">Installing the Extension</h4>
<p>Install the extension by cloning <code>http://hg.openjdk.java.net/code-tools/trees</code> and updating your <code>.hgrc</code> file. Here's one way to do this:</p>
<pre><code>cd ~
mkdir hg-ext
cd hg-ext
hg clone http://hg.openjdk.java.net/code-tools/trees
cat &lt;&lt; EOT &gt;&gt; ~/.hgrc
[extensions]
trees=~/hg-ext/trees/trees.py
EOT</code></pre>
<h4 id="initializing-the-tree">Initializing the Tree</h4>
<p>The trees extension needs to know the structure of the forest. If you have already cloned the entire forest using another method, you can initialize the forest like this:</p>
<pre><code>hg tconf --set --walk --depth</code></pre>
<p>Or you can clone the entire forest at once, if you substitute <code>clone</code> with <code>tclone</code> when cloning the top-level repository, e.g. like this:</p>
<pre><code>hg tclone http://hg.openjdk.java.net/jdk9/jdk9</code></pre>
<p>In this case, the forest will be properly initialized from the start.</p>
<h4 id="other-operations">Other Operations</h4>
<p>The trees extensions supplement many common operations with a trees version by prefixing a <code>t</code> to the normal Mercurial command, e.g. <code>tcommit</code>, <code>tstatus</code> or <code>tmerge</code>. For instance, to update the entire forest:</p>
<pre><code>hg tpull -u</code></pre>
<h2 id="build-hardware-requirements">Build Hardware Requirements</h2> <h2 id="build-hardware-requirements">Build Hardware Requirements</h2>
<p>OpenJDK is a massive project, and require machines ranging from decent to powerful to be able to build in a reasonable amount of time, or to be able to complete a build at all.</p> <p>OpenJDK is a massive project, and require machines ranging from decent to powerful to be able to build in a reasonable amount of time, or to be able to complete a build at all.</p>
<p>We <em>strongly</em> recommend usage of an SSD disk for the build, since disk speed is one of the limiting factors for build performance.</p> <p>We <em>strongly</em> recommend usage of an SSD disk for the build, since disk speed is one of the limiting factors for build performance.</p>
...@@ -327,8 +284,7 @@ EOT</code></pre> ...@@ -327,8 +284,7 @@ EOT</code></pre>
</tbody> </tbody>
</table> </table>
<h3 id="gcc">gcc</h3> <h3 id="gcc">gcc</h3>
<p>The minimum accepted version of gcc is 4.3. Older versions will not be accepted by <code>configure</code>.</p> <p>The minimum accepted version of gcc is 4.7. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
<p>However, gcc 4.3 is quite old and OpenJDK is not regularly tested on this version, so it is recommended to use a more modern gcc.</p>
<p>OpenJDK 9 includes patches that should allow gcc 6 to compile, but this should be considered experimental.</p> <p>OpenJDK 9 includes patches that should allow gcc 6 to compile, but this should be considered experimental.</p>
<p>In general, any version between these two should be usable.</p> <p>In general, any version between these two should be usable.</p>
<h3 id="clang">clang</h3> <h3 id="clang">clang</h3>
......
...@@ -7,7 +7,7 @@ the time. They assume that you have installed Mercurial (and Cygwin if running ...@@ -7,7 +7,7 @@ the time. They assume that you have installed Mercurial (and Cygwin if running
on Windows) and cloned the top-level OpenJDK repository that you want to build. on Windows) and cloned the top-level OpenJDK repository that you want to build.
1. [Get the complete source code](#getting-the-source-code): \ 1. [Get the complete source code](#getting-the-source-code): \
`bash get_source.sh` `hg clone http://hg.openjdk.java.net/jdk10/master`
2. [Run configure](#running-configure): \ 2. [Run configure](#running-configure): \
`bash configure` `bash configure`
...@@ -44,18 +44,12 @@ OpenJDK. ...@@ -44,18 +44,12 @@ OpenJDK.
## Getting the Source Code ## Getting the Source Code
OpenJDK uses [Mercurial](http://www.mercurial-scm.org) for source control. The Make sure you are getting the correct version. As of JDK 10, the source is no
source code is contained not in a single Mercurial repository, but in a tree longer split into separate repositories so you only need to clone one single
("forest") of interrelated repositories. You will need to check out all of the repository. At the [OpenJDK Mercurial server](http://hg.openjdk.java.net/) you
repositories to be able to build OpenJDK. To assist you in dealing with this can see a list of all available forests. If you want to build an older version,
somewhat unusual arrangement, there are multiple tools available, which are e.g. JDK 8, it is recommended that you get the `jdk8u` forest, which contains
explained below. incremental updates, instead of the `jdk8` forest, which was frozen at JDK 8 GA.
In any case, make sure you are getting the correct version. At the [OpenJDK
Mercurial server](http://hg.openjdk.java.net/) you can see a list of all
available forests. If you want to build an older version, e.g. JDK 8, it is
recommended that you get the `jdk8u` forest, which contains incremental
updates, instead of the `jdk8` forest, which was frozen at JDK 8 GA.
If you are new to Mercurial, a good place to start is the [Mercurial Beginner's If you are new to Mercurial, a good place to start is the [Mercurial Beginner's
Guide](http://www.mercurial-scm.org/guide). The rest of this document assumes a Guide](http://www.mercurial-scm.org/guide). The rest of this document assumes a
...@@ -101,96 +95,6 @@ on where and how to check out the source code. ...@@ -101,96 +95,6 @@ on where and how to check out the source code.
Failure to follow this procedure might result in hard-to-debug build Failure to follow this procedure might result in hard-to-debug build
problems. problems.
### Using get\_source.sh
The simplest way to get the entire forest is probably to clone the top-level
repository and then run the `get_source.sh` script, like this:
```
hg clone http://hg.openjdk.java.net/jdk9/jdk9
cd jdk9
bash get_source.sh
```
The first time this is run, it will clone all the sub-repositories. Any
subsequent execution of the script will update all sub-repositories to the
latest revision.
### Using hgforest.sh
The `hgforest.sh` script is more expressive than `get_source.sh`. It takes any
number of arguments, and runs `hg` with those arguments on each sub-repository
in the forest. The `get_source.sh` script is basically a simple wrapper that
runs either `hgforest.sh clone` or `hgforest.sh pull -u`.
* Cloning the forest:
```
hg clone http://hg.openjdk.java.net/jdk9/jdk9
cd jdk9
bash common/bin/hgforest.sh clone
```
* Pulling and updating the forest:
```
bash common/bin/hgforest.sh pull -u
```
* Merging over the entire forest:
```
bash common/bin/hgforest.sh merge
```
### Using the Trees Extension
The trees extension is a Mercurial add-on that helps you deal with the forest.
More information is available on the [Code Tools trees page](
http://openjdk.java.net/projects/code-tools/trees).
#### Installing the Extension
Install the extension by cloning `http://hg.openjdk.java.net/code-tools/trees`
and updating your `.hgrc` file. Here's one way to do this:
```
cd ~
mkdir hg-ext
cd hg-ext
hg clone http://hg.openjdk.java.net/code-tools/trees
cat << EOT >> ~/.hgrc
[extensions]
trees=~/hg-ext/trees/trees.py
EOT
```
#### Initializing the Tree
The trees extension needs to know the structure of the forest. If you have
already cloned the entire forest using another method, you can initialize the
forest like this:
```
hg tconf --set --walk --depth
```
Or you can clone the entire forest at once, if you substitute `clone` with
`tclone` when cloning the top-level repository, e.g. like this:
```
hg tclone http://hg.openjdk.java.net/jdk9/jdk9
```
In this case, the forest will be properly initialized from the start.
#### Other Operations
The trees extensions supplement many common operations with a trees version by
prefixing a `t` to the normal Mercurial command, e.g. `tcommit`, `tstatus` or
`tmerge`. For instance, to update the entire forest:
```
hg tpull -u
```
## Build Hardware Requirements ## Build Hardware Requirements
OpenJDK is a massive project, and require machines ranging from decent to OpenJDK is a massive project, and require machines ranging from decent to
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Testing OpenJDK</title> <title>Testing OpenJDK</title>
<style type="text/css">code{white-space: pre;}</style> <style type="text/css">code{white-space: pre;}</style>
<link rel="stylesheet" href="../../jdk/make/data/docs-resources/resources/jdk-default.css"> <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]--> <![endif]-->
...@@ -43,7 +43,6 @@ $ make run-test-only TEST=&quot;gtest:LogTagSet gtest:LogTagSetDescriptions&quot ...@@ -43,7 +43,6 @@ $ make run-test-only TEST=&quot;gtest:LogTagSet gtest:LogTagSetDescriptions&quot
$ make run-test TEST=&quot;hotspot/test:hotspot_gc&quot; JTREG=&quot;JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug&quot; $ make run-test TEST=&quot;hotspot/test:hotspot_gc&quot; JTREG=&quot;JOBS=1;TIMEOUT=8;VM_OTIONS=-XshowSettings -Xlog:gc+ref=debug&quot;
$ make run-test TEST=&quot;jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java&quot; $ make run-test TEST=&quot;jtreg:hotspot/test:hotspot_gc hotspot/test/native_sanity/JniVersion.java&quot;
$ make exploded-run-test TEST=hotspot_tier1</code></pre> $ make exploded-run-test TEST=hotspot_tier1</code></pre>
<h3 id="configuration">Configuration</h3> <h3 id="configuration">Configuration</h3>
<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p> <p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>
<h2 id="test-selection">Test selection</h2> <h2 id="test-selection">Test selection</h2>
......
...@@ -32,18 +32,17 @@ include JarArchive.gmk ...@@ -32,18 +32,17 @@ include JarArchive.gmk
include JavaCompilation.gmk include JavaCompilation.gmk
include SetupJavaCompilers.gmk include SetupJavaCompilers.gmk
include TextFileProcessing.gmk include TextFileProcessing.gmk
include Modules.gmk
JDK_CLASSES := $(call PathList, $(strip $(addprefix $(JDK_OUTPUTDIR)/modules/, \ JDK_CLASSES := $(call PathList, $(strip $(addprefix $(JDK_OUTPUTDIR)/modules/, \
java.base java.logging java.scripting jdk.dynalink))) java.base java.logging java.scripting jdk.dynalink)))
MODULESOURCEPATH := $(NASHORN_TOPDIR)/src/*/share/classes
# Need to use source and target 8 for nasgen to work. # Need to use source and target 8 for nasgen to work.
$(eval $(call SetupJavaCompiler, GENERATE_NEWBYTECODE_DEBUG, \ $(eval $(call SetupJavaCompiler, GENERATE_NEWBYTECODE_DEBUG, \
JVM := $(JAVA_JAVAC), \ JVM := $(JAVA_JAVAC), \
JAVAC := $(NEW_JAVAC), \ JAVAC := $(NEW_JAVAC), \
FLAGS := -g -source 9 -target 9 --upgrade-module-path "$(JDK_OUTPUTDIR)/modules/" \ FLAGS := -g -source 9 -target 9 --upgrade-module-path "$(JDK_OUTPUTDIR)/modules/" \
--system none --module-source-path "$(MODULESOURCEPATH)", \ --system none --module-source-path $(call GetModuleSrcPath), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \ SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA))) SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
...@@ -54,12 +53,12 @@ $(eval $(call SetupJavaCompiler, GENERATE_NEWBYTECODE_DEBUG, \ ...@@ -54,12 +53,12 @@ $(eval $(call SetupJavaCompiler, GENERATE_NEWBYTECODE_DEBUG, \
$(eval $(call SetupJavaCompilation, jdk.scripting.nashorn, \ $(eval $(call SetupJavaCompilation, jdk.scripting.nashorn, \
SETUP := GENERATE_NEWBYTECODE_DEBUG, \ SETUP := GENERATE_NEWBYTECODE_DEBUG, \
MODULE := jdk.scripting.nashorn, \ MODULE := jdk.scripting.nashorn, \
SRC := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes, \ SRC := $(TOPDIR)/src/jdk.scripting.nashorn/share/classes, \
COPY := .properties .js, \ COPY := .properties .js, \
BIN := $(SUPPORT_OUTPUTDIR)/special_classes)) BIN := $(SUPPORT_OUTPUTDIR)/special_classes))
NASGEN_SRC := $(NASHORN_TOPDIR)/buildtools/nasgen/src NASGEN_SRC := $(TOPDIR)/make/nashorn/buildtools/nasgen/src
ASM_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm ASM_SRC := $(TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm
# Build nasgen # Build nasgen
$(eval $(call SetupJavaCompilation, BUILD_NASGEN, \ $(eval $(call SetupJavaCompilation, BUILD_NASGEN, \
...@@ -94,7 +93,7 @@ $(NASGEN_RUN_FILE): $(BUILD_NASGEN) $(jdk.scripting.nashorn) ...@@ -94,7 +93,7 @@ $(NASGEN_RUN_FILE): $(BUILD_NASGEN) $(jdk.scripting.nashorn)
# Version file needs to be processed with version numbers # Version file needs to be processed with version numbers
$(eval $(call SetupTextFileProcessing, BUILD_VERSION_FILE, \ $(eval $(call SetupTextFileProcessing, BUILD_VERSION_FILE, \
SOURCE_FILES := $(NASHORN_TOPDIR)/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/version.properties.template, \ SOURCE_FILES := $(TOPDIR)/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources/version.properties.template, \
OUTPUT_FILE := $(JDK_OUTPUTDIR)/modules/jdk.scripting.nashorn/jdk/nashorn/internal/runtime/resources/version.properties, \ OUTPUT_FILE := $(JDK_OUTPUTDIR)/modules/jdk.scripting.nashorn/jdk/nashorn/internal/runtime/resources/version.properties, \
REPLACEMENTS := \ REPLACEMENTS := \
@@VERSION_STRING@@ => $(VERSION_STRING) ; \ @@VERSION_STRING@@ => $(VERSION_STRING) ; \
......
...@@ -56,7 +56,7 @@ define SetupBundleFileBody ...@@ -56,7 +56,7 @@ define SetupBundleFileBody
$$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \ $$(eval $1_$$d_RELATIVE_FILES := $$$$(patsubst $$d/%, %, \
$$$$(filter $$d/%, $$$$($1_FILES)))) \ $$$$(filter $$d/%, $$$$($1_FILES)))) \
$$(eval $1_$$d_LIST_FILE := \ $$(eval $1_$$d_LIST_FILE := \
$(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(TOPDIR)/%,%,$$d)_files)) \ $(SUPPORT_OUTPUTDIR)/bundles/_$1_$$$$(subst /,_,$$$$(patsubst $(OUTPUT_ROOT)/%,%,$$d)_files)) \
) )
ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), ) ifneq ($$(filter %.tar.gz, $$($1_BUNDLE_NAME)), )
......
...@@ -38,8 +38,8 @@ include TextFileProcessing.gmk ...@@ -38,8 +38,8 @@ include TextFileProcessing.gmk
include ZipArchive.gmk include ZipArchive.gmk
# Prepare the find cache. # Prepare the find cache.
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/demo \ $(eval $(call FillCacheFind, $(wildcard $(TOPDIR)/src/demo \
$(JDK_TOPDIR)/src/*/demo))) $(TOPDIR)/src/*/demo)))
# Append demo goals to this variable. # Append demo goals to this variable.
TARGETS = TARGETS =
...@@ -48,15 +48,15 @@ TARGETS = ...@@ -48,15 +48,15 @@ TARGETS =
# Now every other demo has its own quirks where to put the # Now every other demo has its own quirks where to put the
# READMEs and other files. # READMEs and other files.
DEMO_SHARE_SRC := $(JDK_TOPDIR)/src/demo/share DEMO_SHARE_SRC := $(TOPDIR)/src/demo/share
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf
# This rule will be depended on due to the MANIFEST line in SetupBuildDemo # This rule will be depended on due to the MANIFEST line in SetupBuildDemo
# and SetupBuildJvmtiDemo. # and SetupBuildJvmtiDemo.
$(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \ $(eval $(call SetupTextFileProcessing, BUILD_JAVA_MANIFEST, \
SOURCE_FILES := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \ SOURCE_FILES := $(TOPDIR)/make/data/mainmanifest/manifest.mf, \
OUTPUT_FILE := $(DEMO_MANIFEST), \ OUTPUT_FILE := $(DEMO_MANIFEST), \
REPLACEMENTS := \ REPLACEMENTS := \
@@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \ @@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION) ; \
...@@ -303,7 +303,7 @@ endif ...@@ -303,7 +303,7 @@ endif
################################################################################ ################################################################################
# Hook to include the corresponding custom file, if present. # Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, CompileDemos.gmk)) $(eval $(call IncludeCustomExtension, , CompileDemos.gmk))
all: $(TARGETS) all: $(TARGETS)
images: $(IMAGES_TARGETS) images: $(IMAGES_TARGETS)
......
...@@ -43,7 +43,7 @@ define SetupInterimModule ...@@ -43,7 +43,7 @@ define SetupInterimModule
$$(eval $$(call SetupJavaCompilation,BUILD_INTERIM_$(strip $1), \ $$(eval $$(call SetupJavaCompilation,BUILD_INTERIM_$(strip $1), \
SETUP := BOOT_JAVAC, \ SETUP := BOOT_JAVAC, \
DISABLE_SJAVAC := true, \ DISABLE_SJAVAC := true, \
SRC := $(LANGTOOLS_TOPDIR)/src/$(strip $1)/share/classes \ SRC := $(TOPDIR)/src/$(strip $1)/share/classes \
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)), \ $$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$(strip $1)), \
EXCLUDES := sun com/sun/tools/jdeps com/sun/tools/javap \ EXCLUDES := sun com/sun/tools/jdeps com/sun/tools/javap \
com/sun/tools/jdeprscan, \ com/sun/tools/jdeprscan, \
......
...@@ -43,7 +43,7 @@ RMIC_PKGS := \ ...@@ -43,7 +43,7 @@ RMIC_PKGS := \
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_RMIC, \ $(eval $(call SetupJavaCompilation,BUILD_INTERIM_RMIC, \
SETUP := GENERATE_OLDBYTECODE, \ SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes, \ SRC := $(TOPDIR)/src/jdk.rmic/share/classes, \
EXCLUDE_FILES := module-info.java, \ EXCLUDE_FILES := module-info.java, \
INCLUDES := $(RMIC_PKGS), \ INCLUDES := $(RMIC_PKGS), \
BIN := $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.rmic, \ BIN := $(BUILDTOOLS_OUTPUTDIR)/override_modules/jdk.rmic, \
......
...@@ -47,7 +47,7 @@ java.base_COPY += .icu .dat .spp content-types.properties hijrah-config-islamic- ...@@ -47,7 +47,7 @@ java.base_COPY += .icu .dat .spp content-types.properties hijrah-config-islamic-
java.base_CLEAN += intrinsic.properties java.base_CLEAN += intrinsic.properties
java.base_EXCLUDE_FILES += \ java.base_EXCLUDE_FILES += \
$(JDK_TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java $(TOPDIR)/src/java.base/share/classes/jdk/internal/module/ModuleLoaderMap.java
java.base_EXCLUDES += java/lang/doc-files java.base_EXCLUDES += java/lang/doc-files
...@@ -146,10 +146,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx) ...@@ -146,10 +146,10 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
com/sun/java/swing/plaf/gtk \ com/sun/java/swing/plaf/gtk \
# #
java.desktop_EXCLUDE_FILES += \ java.desktop_EXCLUDE_FILES += \
$(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/*.java) \ $(wildcard $(TOPDIR)/src/java.desktop/unix/classes/sun/java2d/*.java) \
$(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/java2d/opengl/*.java) \ $(wildcard $(TOPDIR)/src/java.desktop/unix/classes/sun/java2d/opengl/*.java) \
$(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/awt/*.java) \ $(wildcard $(TOPDIR)/src/java.desktop/unix/classes/sun/awt/*.java) \
$(wildcard $(JDK_TOPDIR)/src/java.desktop/unix/classes/sun/font/*.java) \ $(wildcard $(TOPDIR)/src/java.desktop/unix/classes/sun/font/*.java) \
# #
else else
# TBD: figure out how to eliminate this long list # TBD: figure out how to eliminate this long list
...@@ -267,15 +267,15 @@ java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS ...@@ -267,15 +267,15 @@ java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.sql.rowset_CLEAN_FILES += $(wildcard \ java.sql.rowset_CLEAN_FILES += $(wildcard \
$(JDK_TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \ $(TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
$(JDK_TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties) $(TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
################################################################################ ################################################################################
java.rmi_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' java.rmi_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.rmi_CLEAN_FILES += $(wildcard \ java.rmi_CLEAN_FILES += $(wildcard \
$(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/registry/resources/*.properties \ $(TOPDIR)/src/java.rmi/share/classes/sun/rmi/registry/resources/*.properties \
$(JDK_TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties) $(TOPDIR)/src/java.rmi/share/classes/sun/rmi/server/resources/*.properties)
################################################################################ ################################################################################
...@@ -351,10 +351,11 @@ jdk.charsets_COPY += .dat ...@@ -351,10 +351,11 @@ jdk.charsets_COPY += .dat
################################################################################ ################################################################################
jdk.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*' \ jdk.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected \
'-Xdoclint/package:-com.sun.tools.*,-jdk.internal.*,sun.tools.serialver.resources.*' \
-XDstringConcat=inline -XDstringConcat=inline
jdk.compiler_CLEAN_FILES += $(wildcard \ jdk.compiler_CLEAN_FILES += $(wildcard \
$(patsubst %, $(JDK_TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \ $(patsubst %, $(TOPDIR)/src/jdk.compiler/share/classes/%/*.properties, \
sun/tools/serialver/resources)) sun/tools/serialver/resources))
################################################################################ ################################################################################
...@@ -399,17 +400,17 @@ jdk.rmic_CLEAN += .properties ...@@ -399,17 +400,17 @@ jdk.rmic_CLEAN += .properties
# No SCTP implementation on Mac OS X or AIX. These classes should be excluded. # No SCTP implementation on Mac OS X or AIX. These classes should be excluded.
SCTP_IMPL_CLASSES = \ SCTP_IMPL_CLASSES = \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationImpl.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationImpl.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/PeerAddrChange.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/PeerAddrChange.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/ResultContainer.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/ResultContainer.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpChannelImpl.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNet.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNotification.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpNotification.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \ $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/SendFailed.java \
$(JDK_TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java $(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/Shutdown.java
ifeq ($(OPENJDK_TARGET_OS), macosx) ifeq ($(OPENJDK_TARGET_OS), macosx)
jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES) jdk.sctp_EXCLUDE_FILES += $(SCTP_IMPL_CLASSES)
...@@ -424,15 +425,15 @@ endif ...@@ -424,15 +425,15 @@ endif
jdk.jconsole_COPY += .gif .png jdk.jconsole_COPY += .gif .png
jdk.jconsole_CLEAN_FILES += $(wildcard \ jdk.jconsole_CLEAN_FILES += $(wildcard \
$(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/*.properties) $(TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/*.properties)
################################################################################ ################################################################################
jdk.jdeps_COPY += .txt jdk.jdeps_COPY += .txt
jdk.jdeps_CLEAN_FILES += $(wildcard \ jdk.jdeps_CLEAN_FILES += $(wildcard \
$(JDK_TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \ $(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/resources/*.properties \
$(JDK_TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties) $(TOPDIR)/src/jdk.jdeps/share/classes/com/sun/tools/javap/resources/*.properties)
################################################################################ ################################################################################
...@@ -448,7 +449,7 @@ jdk.jdi_EXCLUDE_FILES += jdi-overview.html ...@@ -448,7 +449,7 @@ jdk.jdi_EXCLUDE_FILES += jdi-overview.html
################################################################################ ################################################################################
jdk.dev_CLEAN_FILES += $(wildcard \ jdk.dev_CLEAN_FILES += $(wildcard \
$(patsubst %, $(JDK_TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \ $(patsubst %, $(TOPDIR)/src/jdk.dev/share/classes/%/*.properties, \
com/sun/tools/script/shell)) com/sun/tools/script/shell))
jdk.dev_COPY += .js oqlhelp.html .txt jdk.dev_COPY += .js oqlhelp.html .txt
...@@ -601,7 +602,7 @@ ifeq ($(MODULE), jdk.internal.vm.ci) ...@@ -601,7 +602,7 @@ ifeq ($(MODULE), jdk.internal.vm.ci)
## WORKAROUND jdk.internal.vm.ci source structure issue ## WORKAROUND jdk.internal.vm.ci source structure issue
JVMCI_MODULESOURCEPATH := $(MODULESOURCEPATH) \ JVMCI_MODULESOURCEPATH := $(MODULESOURCEPATH) \
$(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \ $(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \
$(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src))) $(wildcard $(TOPDIR)/src/$(MODULE)/share/classes/*/src)))
MODULESOURCEPATH := $(call PathList, $(JVMCI_MODULESOURCEPATH)) MODULESOURCEPATH := $(call PathList, $(JVMCI_MODULESOURCEPATH))
endif endif
...@@ -609,7 +610,7 @@ ifeq ($(MODULE), jdk.internal.vm.compiler) ...@@ -609,7 +610,7 @@ ifeq ($(MODULE), jdk.internal.vm.compiler)
## WORKAROUND jdk.internal.vm.compiler source structure issue ## WORKAROUND jdk.internal.vm.compiler source structure issue
VM_COMPILER_MODULESOURCEPATH := $(MODULESOURCEPATH) \ VM_COMPILER_MODULESOURCEPATH := $(MODULESOURCEPATH) \
$(subst /$(MODULE)/,/*/, $(filter-out %processor/src %test/src %jtt/src %bench/src %microbenchmarks/src, \ $(subst /$(MODULE)/,/*/, $(filter-out %processor/src %test/src %jtt/src %bench/src %microbenchmarks/src, \
$(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src))) $(wildcard $(TOPDIR)/src/$(MODULE)/share/classes/*/src)))
MODULESOURCEPATH := $(call PathList, $(VM_COMPILER_MODULESOURCEPATH)) MODULESOURCEPATH := $(call PathList, $(VM_COMPILER_MODULESOURCEPATH))
endif endif
...@@ -617,7 +618,7 @@ ifeq ($(MODULE), jdk.aot) ...@@ -617,7 +618,7 @@ ifeq ($(MODULE), jdk.aot)
## WORKAROUND jdk.aot source structure issue ## WORKAROUND jdk.aot source structure issue
AOT_MODULESOURCEPATH := $(MODULESOURCEPATH) \ AOT_MODULESOURCEPATH := $(MODULESOURCEPATH) \
$(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \ $(subst /$(MODULE)/,/*/, $(filter-out %processor/src, \
$(wildcard $(HOTSPOT_TOPDIR)/src/$(MODULE)/share/classes/*/src))) $(wildcard $(TOPDIR)/src/$(MODULE)/share/classes/*/src)))
MODULESOURCEPATH := $(call PathList, $(AOT_MODULESOURCEPATH)) MODULESOURCEPATH := $(call PathList, $(AOT_MODULESOURCEPATH))
endif endif
...@@ -654,7 +655,7 @@ $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.pr ...@@ -654,7 +655,7 @@ $(JDK_OUTPUTDIR)/modules/%_zh_HK.properties: $(JDK_OUTPUTDIR)/modules/%_zh_TW.pr
$(install-file) $(install-file)
CreateHkTargets = \ CreateHkTargets = \
$(patsubst $(JDK_TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \ $(patsubst $(TOPDIR)/src/%, $(JDK_OUTPUTDIR)/modules/%, \
$(subst /share/classes,, \ $(subst /share/classes,, \
$(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1)))) $(subst _zh_TW,_zh_HK, $(filter %_zh_TW.properties, $1))))
......
...@@ -36,7 +36,7 @@ TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes ...@@ -36,7 +36,7 @@ TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
$(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \ $(eval $(call SetupJavaCompilation,BUILD_JIGSAW_TOOLS, \
SETUP := GENERATE_USINGJDKBYTECODE, \ SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(JDK_TOPDIR)/make/src/classes, \ SRC := $(TOPDIR)/make/jdk/src/classes, \
INCLUDES := build/tools/deps \ INCLUDES := build/tools/deps \
build/tools/docs \ build/tools/docs \
build/tools/jigsaw, \ build/tools/jigsaw, \
......
...@@ -35,12 +35,12 @@ include SetupJavaCompilers.gmk ...@@ -35,12 +35,12 @@ include SetupJavaCompilers.gmk
TARGETS := TARGETS :=
# Hook to include the corresponding custom file, if present. # Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, hotspot, CompileTools.gmk)) $(eval $(call IncludeCustomExtension, , hotspot/CompileTools.gmk))
ifeq ($(INCLUDE_GRAAL), true) ifeq ($(INCLUDE_GRAAL), true)
VM_CI_SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.internal.vm.ci/share/classes VM_CI_SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.ci/share/classes
SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.internal.vm.compiler/share/classes SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.compiler/share/classes
############################################################################## ##############################################################################
# Compile the annotation processors # Compile the annotation processors
......
...@@ -32,13 +32,13 @@ include SetupJavaCompilers.gmk ...@@ -32,13 +32,13 @@ include SetupJavaCompilers.gmk
################################################################################ ################################################################################
$(eval $(call IncludeCustomExtension, jdk, CompileTools.gmk)) $(eval $(call IncludeCustomExtension, , CompileTools.gmk))
################################################################################ ################################################################################
# Use += to be able to add to this from a custom extension # Use += to be able to add to this from a custom extension
BUILD_TOOLS_SRC_DIRS += \ BUILD_TOOLS_SRC_DIRS += \
$(JDK_TOPDIR)/make/src/classes \ $(TOPDIR)/make/jdk/src/classes \
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \ $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \
# #
...@@ -53,9 +53,9 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \ ...@@ -53,9 +53,9 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
TARGETS += $(BUILD_TOOLS_JDK) TARGETS += $(BUILD_TOOLS_JDK)
$(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \ $(eval $(call SetupCopyFiles,COPY_NIMBUS_TEMPLATES, \
SRC := $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \ SRC := $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \ DEST := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes/build/tools/generatenimbus/resources, \
FILES := $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template))) FILES := $(wildcard $(TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template)))
TARGETS += $(COPY_NIMBUS_TEMPLATES) TARGETS += $(COPY_NIMBUS_TEMPLATES)
......
...@@ -42,7 +42,7 @@ define cldrconverter_copytznames ...@@ -42,7 +42,7 @@ define cldrconverter_copytznames
endef endef
$(eval $(call SetupCopyFiles,COPY_INTERIM_CLDRCONVERTER, \ $(eval $(call SetupCopyFiles,COPY_INTERIM_CLDRCONVERTER, \
SRC := $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/resources, \ SRC := $(TOPDIR)/src/java.base/share/classes/sun/util/resources, \
DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes/build/tools/cldrconverter, \ DEST := $(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes/build/tools/cldrconverter, \
FILES := TimeZoneNames.java, \ FILES := TimeZoneNames.java, \
MACRO := cldrconverter_copytznames)) MACRO := cldrconverter_copytznames))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment