aboutsummaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorohair <none@none>2012-03-04 11:55:34 -0800
committerohair <none@none>2012-03-04 11:55:34 -0800
commit6c32066a02948e0679eb6d8dedb4e3d2c0109a77 (patch)
tree5f800d77c68ad5d9d399d5a7e5f6a971e57d0e11 /make
parent9487cffffe3d240071004612d3dd38ea138297fe (diff)
downloadjdk8u_jaxp-6c32066a02948e0679eb6d8dedb4e3d2c0109a77.tar.gz
7150324: Stop using drop bundles in jaxp
Reviewed-by: prr, joehw
Diffstat (limited to 'make')
-rw-r--r--make/Makefile25
-rw-r--r--make/scripts/update_src.sh86
2 files changed, 91 insertions, 20 deletions
diff --git a/make/Makefile b/make/Makefile
index b2574d7..12f1328 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -91,23 +91,6 @@ else
endif
endif
-# Do we have the drops already downloaded?
-# Check ALT_DROPS_DIR for a full path first,
-# before trying to use the devtools path,
-# either via ALT_JDK_DEVTOOLS_DIR or /java/devtools.
-ifdef ALT_DROPS_DIR
- DROPS_DIR = $(ALT_DROPS_DIR)
-else
- ifdef ALT_JDK_DEVTOOLS_DIR
- DROPS_DIR = $(ALT_JDK_DEVTOOLS_DIR)/share/jdk8-drops
- else
- DROPS_DIR = $(_SLASHJAVA)/devtools/share/jdk8-drops
- endif
-endif
-
-# Add in path to drops already downloaded
-ANT_OPTIONS += -Ddrops.dir=$(DROPS_DIR)
-
ifdef ALT_OUTPUTDIR
OUTPUTDIR = $(ALT_OUTPUTDIR)
ANT_OPTIONS += -Doutput.dir=$(ALT_OUTPUTDIR)
@@ -144,13 +127,17 @@ endif
default: all
# All ant targets of interest
-ANT_TARGETS = all source drop_included build dist clobber clean sanity
+ANT_TARGETS = all build dist clobber clean sanity
# Create a make target for each
$(ANT_TARGETS):
cd .. && $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) -version
cd .. && $(ANT_JAVA_HOME) $(ANT) $(ANT_OPTIONS) $@
+# Just for compat reasons, delete in future.
+drop_included:
+source:
+
# Help target
define helpenvline
@echo " $1";echo " $2"
@@ -164,8 +151,6 @@ help:
@echo " $(ANT_TARGETS)"
@echo " "
@echo " Environment or command line variables (all optional):"
- $(call helpenvline, ALT_DROPS_DIR,\
- "Directory that contains the drop source bundles i.e. drops.dir")
$(call helpenvline, ALT_BOOTDIR,\
"JAVA_HOME to use when running ant")
$(call helpenvline, ALT_LANGTOOLS_DIST,\
diff --git a/make/scripts/update_src.sh b/make/scripts/update_src.sh
new file mode 100644
index 0000000..b1ff207
--- /dev/null
+++ b/make/scripts/update_src.sh
@@ -0,0 +1,86 @@
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# This script was used to copy the former drop source bundle source into
+# the repository. Exists as a form of documentation.
+
+curdir="`(cd . && pwd)`"
+
+# Whitespace normalizer script is in the top repository.
+normalizer="perl ${curdir}/../make/scripts/normalizer.pl"
+
+# Locations for bundle and root of source tree
+tmp=/tmp
+srcroot=${curdir}/src
+mkdir -p ${srcroot}
+
+# Bundle information
+drops_dir="/java/devtools/share/jdk8-drops"
+url1="http://download.java.net/jaxp/1.4.5"
+bundle1="jaxp145_01.zip"
+srcdir1="${srcroot}/share/classes"
+
+# Function to get a bundle and explode it and normalize the source files.
+getBundle() # drops_dir url bundlename bundledestdir srcrootdir
+{
+ # Get the bundle from drops_dir or downloaded
+ mkdir -p $4
+ rm -f $4/$3
+ if [ -f $1/$3 ] ; then
+ echo "Copy over bundle: $1/$3"
+ cp $1/$3 $4
+ else
+ echo "Downloading bundle: $2/$3"
+ (cd $4 && wget $2/$3)
+ fi
+ # Fail if it does not exist
+ if [ ! -f $4/$3 ] ; then
+ echo "ERROR: Could not get $3"
+ exit 1
+ fi
+ # Wipe it out completely
+ echo "Cleaning up $5"
+ rm -f -r $5
+ mkdir -p $5
+ echo "Unzipping $4/$3"
+ ( cd $5 && unzip -q $4/$3 && mv src/* . && rmdir src && rm LICENSE )
+ # Run whitespace normalizer
+ echo "Normalizing the sources in $5"
+ ( cd $5 && ${normalizer} . )
+ # Delete the bundle and leftover files
+ rm -f $4/$3 $5/filelist
+}
+
+# Process the bundles.
+getBundle "${drops_dir}" "${url1}" "${bundle1}" ${tmp} ${srcdir1}
+echo "Completed bundle extraction."
+echo " "
+
+# Appropriate Mercurial commands needed to run:
+echo "Run: hg addremove src"
+echo "Run: ksh ../make/scripts/webrev.ksh -N -o ${HOME}/webrev"
+echo "Get reviewer, get CR, then..."
+echo "Run: hg commit"
+