8065914: Various improvements and cleanup of build system
Reviewed-by: erikj
This commit is contained in:
parent
2f10adad63
commit
c4ced97793
15
Makefile
15
Makefile
@ -33,7 +33,7 @@ default:
|
||||
|
||||
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make.
|
||||
# /usr/ccs/bin/make lacks basically every other flow control mechanism.
|
||||
TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
|
||||
.TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a requirement. Check your path. 1>&2 && exit 1
|
||||
|
||||
# Assume we have GNU make, but check version.
|
||||
ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
|
||||
@ -46,7 +46,17 @@ ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
|
||||
else
|
||||
makefile_path:=$(lastword $(MAKEFILE_LIST))
|
||||
endif
|
||||
root_dir:=$(dir $(makefile_path))
|
||||
root_dir:=$(patsubst %/,%,$(dir $(makefile_path)))
|
||||
|
||||
ifneq ($(findstring qp,$(MAKEFLAGS)),)
|
||||
# When called with -qp, assume an external part (e.g. bash completion) is trying
|
||||
# to understand our targets.
|
||||
# Duplication of global targets, needed before ParseConfAndSpec in case we have
|
||||
# no configurations.
|
||||
help:
|
||||
# If CONF is not set, look for all available configurations
|
||||
CONF?=
|
||||
endif
|
||||
|
||||
# ... and then we can include our helper functions
|
||||
include $(root_dir)/make/MakeHelpers.gmk
|
||||
@ -89,6 +99,7 @@ else
|
||||
# The wrapper target was called so we now have a single configuration. Load the spec file
|
||||
# and call the real Main.gmk.
|
||||
include $(SPEC)
|
||||
include $(SRC_ROOT)/make/common/MakeBase.gmk
|
||||
|
||||
### Clean up from previous run
|
||||
# Remove any build.log from a previous run, if they exist
|
||||
|
@ -268,7 +268,7 @@ AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
|
||||
fi
|
||||
])
|
||||
|
||||
# Setup a tool for the given variable. If correctly specified by the user,
|
||||
# Setup a tool for the given variable. If correctly specified by the user,
|
||||
# use that value, otherwise search for the tool using the supplied code snippet.
|
||||
# $1: variable to set
|
||||
# $2: code snippet to call to look for the tool
|
||||
@ -546,7 +546,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
XCODEBUILD=
|
||||
AC_SUBST(XCODEBUILD)
|
||||
fi
|
||||
|
||||
|
||||
AC_MSG_CHECKING([for sdk name])
|
||||
AC_ARG_WITH([sdk-name], [AS_HELP_STRING([--with-sdk-name],
|
||||
[use the platform SDK of the given name. @<:@macosx@:>@])],
|
||||
|
@ -24,31 +24,31 @@
|
||||
#
|
||||
|
||||
########################################################################
|
||||
# This file handles detection of the Boot JDK. The Boot JDK detection
|
||||
# process has been developed as a response to solve a complex real-world
|
||||
# problem. Initially, it was simple, but it has grown as platform after
|
||||
# This file handles detection of the Boot JDK. The Boot JDK detection
|
||||
# process has been developed as a response to solve a complex real-world
|
||||
# problem. Initially, it was simple, but it has grown as platform after
|
||||
# platform, idiosyncracy after idiosyncracy has been supported.
|
||||
#
|
||||
# The basic idea is this:
|
||||
# 1) You need an acceptable *) JDK to use as a Boot JDK
|
||||
# 2) There are several ways to locate a JDK, that are mostly platform
|
||||
# 2) There are several ways to locate a JDK, that are mostly platform
|
||||
# dependent **)
|
||||
# 3) You can have multiple JDKs installed
|
||||
# 4) If possible, configure should try to dig out an acceptable JDK
|
||||
# 4) If possible, configure should try to dig out an acceptable JDK
|
||||
# automatically, without having to resort to command-line options
|
||||
#
|
||||
# *) acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
|
||||
# javac) and not a JRE, etc.
|
||||
# *) acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
|
||||
# javac) and not a JRE, etc.
|
||||
#
|
||||
# **) On Windows we typically use a well-known path.
|
||||
# **) On Windows we typically use a well-known path.
|
||||
# On MacOSX we typically use the tool java_home.
|
||||
# On Linux we typically find javac in the $PATH, and then follow a
|
||||
# chain of symlinks that often ends up in a real JDK.
|
||||
# On Linux we typically find javac in the $PATH, and then follow a
|
||||
# chain of symlinks that often ends up in a real JDK.
|
||||
#
|
||||
# This leads to the code where we check in different ways to locate a
|
||||
# JDK, and if one is found, check if it is acceptable. If not, we print
|
||||
# our reasons for rejecting it (useful when debugging non-working
|
||||
# configure situations) and continue checking the next one.
|
||||
# This leads to the code where we check in different ways to locate a
|
||||
# JDK, and if one is found, check if it is acceptable. If not, we print
|
||||
# our reasons for rejecting it (useful when debugging non-working
|
||||
# configure situations) and continue checking the next one.
|
||||
########################################################################
|
||||
|
||||
# Execute the check given as argument, and verify the result
|
||||
@ -244,7 +244,7 @@ AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
|
||||
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
|
||||
[
|
||||
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
|
||||
BASIC_SETUP_TOOL($1,
|
||||
BASIC_SETUP_TOOL($1,
|
||||
[
|
||||
AC_MSG_CHECKING([for $2 in Boot JDK])
|
||||
$1=$BOOT_JDK/bin/$2
|
||||
|
@ -57,4 +57,3 @@ JAR_CMD:=$(BOOT_JDK)/bin/jar
|
||||
NATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii
|
||||
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
|
||||
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
|
||||
|
||||
|
2
common/autoconf/build-aux/config.guess
vendored
2
common/autoconf/build-aux/config.guess
vendored
@ -77,7 +77,7 @@ if test $? = 0; then
|
||||
fi
|
||||
|
||||
# Test and fix little endian PowerPC64.
|
||||
# TODO: should be handled by autoconf-config.guess.
|
||||
# TODO: should be handled by autoconf-config.guess.
|
||||
if [ "x$OUT" = x ]; then
|
||||
if [ `uname -m` = ppc64le ]; then
|
||||
if [ `uname -s` = Linux ]; then
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
echo >&2 "No suitable 'install' command found.'"
|
||||
echo >&2 "If automake is installed, running 'automake -fa'"
|
||||
echo >&2 "(and ignoring the errors) might produce one."
|
||||
exit 1
|
||||
#!/bin/sh
|
||||
echo >&2 "No suitable 'install' command found.'"
|
||||
echo >&2 "If automake is installed, running 'automake -fa'"
|
||||
echo >&2 "(and ignoring the errors) might produce one."
|
||||
exit 1
|
||||
|
@ -47,6 +47,7 @@ FIND="@FIND@"
|
||||
GREP="@GREP@"
|
||||
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
|
||||
LDD="@LDD@"
|
||||
LN="@LN@"
|
||||
MKDIR="@MKDIR@"
|
||||
NAWK="@NAWK@"
|
||||
NM="@GNM@"
|
||||
|
@ -4331,7 +4331,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1417016445
|
||||
DATE_WHEN_GENERATED=1417099232
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -355,7 +355,7 @@ AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
|
||||
FOUND_FREETYPE=no
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x$FOUND_FREETYPE" = xyes; then
|
||||
# Include file found, let's continue the sanity check.
|
||||
AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD])
|
||||
|
@ -456,7 +456,7 @@ JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
|
||||
JAVA_TOOL_FLAGS_SMALL:=@JAVA_TOOL_FLAGS_SMALL@
|
||||
SJAVAC_SERVER_JAVA_FLAGS:=@SJAVAC_SERVER_JAVA_FLAGS@
|
||||
|
||||
# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
|
||||
# The *_CMD variables are defined separately to be easily overridden in bootcycle-spec.gmk
|
||||
# for bootcycle-images build. Make sure to keep them in sync. Do not use the *_CMD
|
||||
# versions of the variables directly.
|
||||
JAVA_CMD:=@JAVA@
|
||||
@ -713,7 +713,7 @@ JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
|
||||
|
||||
# This macro is called to allow inclusion of closed source counterparts.
|
||||
# Unless overridden in closed sources, it expands to nothing.
|
||||
# Usage: This function is called in an open makefile, with the following
|
||||
# Usage: This function is called in an open makefile, with the following
|
||||
# arguments:
|
||||
# $1 the name of the repo, or empty if the top-level repo.
|
||||
# $2 the name of the makefile
|
||||
|
@ -248,7 +248,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL],
|
||||
METHOD="$2"
|
||||
if test -e "$POSSIBLE_MSVCR_DLL"; then
|
||||
AC_MSG_NOTICE([Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD])
|
||||
|
||||
|
||||
# Need to check if the found msvcr is correct architecture
|
||||
AC_MSG_CHECKING([found msvcr100.dll architecture])
|
||||
MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
|
||||
@ -291,7 +291,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
|
||||
AC_MSG_ERROR([Could not find a proper msvcr100.dll as specified by --with-msvcr-dll])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# Probe: Using well-known location from Visual Studio 10.0
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
@ -311,9 +311,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
|
||||
POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [well-known location in Boot JDK])
|
||||
fi
|
||||
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# Probe: Look in the Windows system32 directory
|
||||
# Probe: Look in the Windows system32 directory
|
||||
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
|
||||
POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
|
||||
@ -333,7 +333,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VS100COMNTOOLS])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
|
||||
# (This was the original behaviour; kept since it might turn up something)
|
||||
@ -347,11 +347,11 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVCR_DLL],
|
||||
POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVCR_DLL([$POSSIBLE_MSVCR_DLL], [search of VCINSTALLDIR])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "x$MSVCR_DLL" = x; then
|
||||
AC_MSG_CHECKING([for msvcr100.dll])
|
||||
AC_MSG_RESULT([no])
|
||||
|
@ -22,7 +22,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script is processed by configure before it's usable. It is run from
|
||||
# This script is processed by configure before it's usable. It is run from
|
||||
# the root of the build directory.
|
||||
|
||||
|
||||
@ -76,10 +76,13 @@ diff_text() {
|
||||
TMP=1
|
||||
|
||||
if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then
|
||||
# Filter out date string, ant version and java version differences.
|
||||
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
|
||||
$GREP '^[<>]' | \
|
||||
$SED -e '/[<>] Ant-Version: Apache Ant .*/d' \
|
||||
-e '/[<>] Created-By: .* (Oracle Corporation).*/d')
|
||||
-e '/[<>] Created-By: .* (Oracle [Corpatin)]*/d' \
|
||||
-e '/[<>] [Corpatin]*)/d' \
|
||||
-e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
|
||||
fi
|
||||
if test "x$SUFFIX" = "xjava"; then
|
||||
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
|
||||
@ -92,7 +95,7 @@ diff_text() {
|
||||
-e '/\/\/ java GenerateCharacter.*/d')
|
||||
fi
|
||||
# Ignore date strings in class files.
|
||||
# On Macosx the system sources for generated java classes produce different output on
|
||||
# On Macosx the system sources for generated java classes produce different output on
|
||||
# consequtive invocations seemingly randomly.
|
||||
# For example a method parameter randomly named "thePoint" or "aPoint". Ignore this.
|
||||
# Anonymous lambda classes get randomly assigned counters in their names.
|
||||
@ -100,18 +103,18 @@ diff_text() {
|
||||
# To improve performance when large diffs are found, do a rough filtering of classes
|
||||
# elibeble for these exceptions
|
||||
if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' \
|
||||
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
|
||||
-e thePoint -e aPoint -e setItemsPtr \
|
||||
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
|
||||
-e thePoint -e aPoint -e setItemsPtr \
|
||||
-e 'lambda\$[a-zA-Z0-9]*\$[0-9]' ${THIS_FILE} > /dev/null; then
|
||||
$JAVAP -c -constants -l -p ${OTHER_FILE} > ${OTHER_FILE}.javap
|
||||
$JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap
|
||||
TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
|
||||
$GREP '^[<>]' | \
|
||||
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
|
||||
-e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
|
||||
-e '/[<>].*Point Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
|
||||
-e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
|
||||
-e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d' \
|
||||
-e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
|
||||
-e '/[<>].*Point Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
|
||||
-e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
|
||||
-e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d' \
|
||||
-e '/[<>].*lambda\$[a-zA-Z0-9]*\$[0-9]*/d')
|
||||
fi
|
||||
fi
|
||||
@ -121,20 +124,19 @@ diff_text() {
|
||||
# Disable this exception since we aren't changing the properties cleaning method yet.
|
||||
# $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
|
||||
# | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
|
||||
# | $SED -e '/^#/d' -e '/^$/d' \
|
||||
# | $SED -e '/^#/d' -e '/^$/d' \
|
||||
# -e :a -e '/\\$/N; s/\\\n//; ta' \
|
||||
# -e 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
# -e 's/\\=/=/' | LC_ALL=C $SORT > $OTHER_FILE.cleaned
|
||||
# -e 's/^[ \t]*//;s/[ \t]*$//' \
|
||||
# -e 's/\\=/=/' | LC_ALL=C $SORT > $OTHER_FILE.cleaned
|
||||
# Filter out date string differences.
|
||||
TMP=$(LC_ALL=C $DIFF $OTHER_FILE.cleaned $THIS_FILE | \
|
||||
$GREP '^[<>]' | \
|
||||
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
|
||||
fi
|
||||
if test "x$SUFFIX" = "xMF"; then
|
||||
# Filter out date string differences.
|
||||
if test "x$SUFFIX" = "xhtml"; then
|
||||
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
|
||||
$GREP '^[<>]' | \
|
||||
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
|
||||
$SED -e '/[<>] <!-- Generated by javadoc .* on .* -->/d' )
|
||||
fi
|
||||
if test -n "$TMP"; then
|
||||
echo Files $OTHER_FILE and $THIS_FILE differ
|
||||
@ -158,7 +160,7 @@ compare_dirs() {
|
||||
(cd $THIS_DIR && $FIND . -type d | $SORT > $WORK_DIR/dirs_this)
|
||||
|
||||
$DIFF $WORK_DIR/dirs_other $WORK_DIR/dirs_this > $WORK_DIR/dirs_diff
|
||||
|
||||
|
||||
echo -n Directory structure...
|
||||
if [ -s $WORK_DIR/dirs_diff ]; then
|
||||
echo Differences found.
|
||||
@ -192,7 +194,7 @@ compare_files() {
|
||||
|
||||
(cd $OTHER_DIR && $FIND . ! -type d | $SORT > $WORK_DIR/files_other)
|
||||
(cd $THIS_DIR && $FIND . ! -type d | $SORT > $WORK_DIR/files_this)
|
||||
|
||||
|
||||
$DIFF $WORK_DIR/files_other $WORK_DIR/files_this > $WORK_DIR/files_diff
|
||||
|
||||
echo -n File names...
|
||||
@ -236,11 +238,11 @@ compare_permissions() {
|
||||
TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
|
||||
if [ "$OP" != "$TP" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
$PRINTF "\told: ${OP} new: ${TP}\t$f\n"
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
$PRINTF "\tother: ${OP} this: ${TP}\t$f\n"
|
||||
fi
|
||||
done
|
||||
if [ -z "$found" ]; then
|
||||
if [ -z "$found" ]; then
|
||||
echo "Identical!"
|
||||
else
|
||||
REGRESSIONS=true
|
||||
@ -265,24 +267,22 @@ compare_file_types() {
|
||||
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
|
||||
OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
|
||||
TF=`cd ${THIS_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
|
||||
if [ "$f" = "./src.zip" ] || [[ "$f" = *"/Home/src.zip" ]] || [[ "$f" = *"/lib/JObjC.jar" ]]
|
||||
then
|
||||
if [ "`echo $OF | $GREP -ic zip`" -gt 0 -a "`echo $TF | $GREP -ic zip`" -gt 0 ]
|
||||
then
|
||||
# the way we produces zip-files make it so that directories are stored in old file
|
||||
# but not in new (only files with full-path)
|
||||
# this makes file-5.09 report them as different
|
||||
continue;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$OF" != "$TF" ]
|
||||
then
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
|
||||
if [ "`echo $OF | $GREP -c 'Zip archive data'`" -gt 0 ] \
|
||||
&& [ "`echo $TF | $GREP -c 'Zip archive data'`" -gt 0 ]
|
||||
then
|
||||
# the way we produce zip-files make it so that directories are stored in
|
||||
# old file but not in new (only files with full-path) this makes file
|
||||
# report them as different
|
||||
continue
|
||||
else
|
||||
if [ -z "$found" ]; then echo ; found="yes"; fi
|
||||
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ -z "$found" ]; then
|
||||
if [ -z "$found" ]; then
|
||||
echo "Identical!"
|
||||
else
|
||||
REGRESSIONS=true
|
||||
@ -296,12 +296,13 @@ compare_general_files() {
|
||||
THIS_DIR=$1
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
|
||||
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
|
||||
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
|
||||
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
|
||||
! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" ! -name "*.cpl" \
|
||||
! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
|
||||
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" ! -name "*.jmod" \
|
||||
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" ! -name "JavaUpdater" \
|
||||
| $GREP -v "./bin/" | $SORT | $FILTER)
|
||||
|
||||
echo General files...
|
||||
@ -377,7 +378,7 @@ compare_zip_file() {
|
||||
THIS_SUFFIX="${THIS_ZIP##*.}"
|
||||
OTHER_SUFFIX="${OTHER_ZIP##*.}"
|
||||
if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then
|
||||
echo The files do not have the same suffix type!
|
||||
echo "The files do not have the same suffix type! ($THIS_SUFFIX != $OTHER_SUFFIX)"
|
||||
return 2
|
||||
fi
|
||||
|
||||
@ -389,7 +390,7 @@ compare_zip_file() {
|
||||
fi
|
||||
# Not quite identical, the might still contain the same data.
|
||||
# Unpack the jar/zip files in temp dirs
|
||||
|
||||
|
||||
THIS_UNZIPDIR=$WORK_DIR/$ZIP_FILE.this
|
||||
OTHER_UNZIPDIR=$WORK_DIR/$ZIP_FILE.other
|
||||
$RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR
|
||||
@ -458,9 +459,9 @@ compare_zip_file() {
|
||||
|
||||
$RM -f $WORK_DIR/$ZIP_FILE.diffs
|
||||
for file in $DIFFING_FILES; do
|
||||
if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then
|
||||
if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then
|
||||
diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then
|
||||
@ -567,6 +568,10 @@ compare_bin_file() {
|
||||
|
||||
$MKDIR -p $FILE_WORK_DIR
|
||||
|
||||
# Make soft links to original files from work dir to facilitate debugging
|
||||
$LN -f -s $THIS_FILE $WORK_FILE_BASE.this
|
||||
$LN -f -s $OTHER_FILE $WORK_FILE_BASE.other
|
||||
|
||||
ORIG_THIS_FILE="$THIS_FILE"
|
||||
ORIG_OTHER_FILE="$OTHER_FILE"
|
||||
|
||||
@ -583,57 +588,58 @@ compare_bin_file() {
|
||||
fi
|
||||
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
unset _NT_SYMBOL_PATH
|
||||
# On windows we need to unzip the debug symbols, if present
|
||||
OTHER_FILE_BASE=${OTHER_FILE/.dll/}
|
||||
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/}
|
||||
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz
|
||||
unset _NT_SYMBOL_PATH
|
||||
# On windows we need to unzip the debug symbols, if present
|
||||
OTHER_FILE_BASE=${OTHER_FILE/.dll/}
|
||||
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/}
|
||||
OTHER_FILE_BASE=${OTHER_FILE_BASE/.cpl/}
|
||||
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz
|
||||
# java.exe and java.dll diz files will have the same name. Have to
|
||||
# make sure java.exe gets the right one. This is only needed for
|
||||
# OTHER since in the new build, all pdb files are left around.
|
||||
if [ "$NAME" = "java.exe" ] && [ -f "$OTHER/tmp/java/java/obj64/java.diz" ]; then
|
||||
OTHER_DIZ_FILE="$OTHER/tmp/java/java/obj64/java.diz"
|
||||
elif [ -f "${OTHER_FILE_BASE}.diz" ]; then
|
||||
OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz
|
||||
else
|
||||
# make sure java.exe gets the right one. This is only needed for
|
||||
# OTHER since in the new build, all pdb files are left around.
|
||||
if [ "$NAME" = "java.exe" ] && [ -f "$OTHER/tmp/java/java/obj64/java.diz" ]; then
|
||||
OTHER_DIZ_FILE="$OTHER/tmp/java/java/obj64/java.diz"
|
||||
elif [ -f "${OTHER_FILE_BASE}.diz" ]; then
|
||||
OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz
|
||||
else
|
||||
# Some files, jli.dll, appears twice in the image but only one of
|
||||
# thme has a diz file next to it.
|
||||
OTHER_DIZ_FILE="$($FIND $OTHER_DIR -name $DIZ_NAME | $SED 1q)"
|
||||
if [ ! -f "$OTHER_DIZ_FILE" ]; then
|
||||
# As a last resort, look for diz file in the whole build output
|
||||
# dir.
|
||||
OTHER_DIZ_FILE="$($FIND $OTHER -name $DIZ_NAME | $SED 1q)"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$OTHER_DIZ_FILE" ]; then
|
||||
$MKDIR -p $FILE_WORK_DIR/other
|
||||
(cd $FILE_WORK_DIR/other ; $UNARCHIVE -o $OTHER_DIZ_FILE)
|
||||
export _NT_SYMBOL_PATH="$FILE_WORK_DIR/other"
|
||||
fi
|
||||
THIS_FILE_BASE=${THIS_FILE/.dll/}
|
||||
THIS_FILE_BASE=${THIS_FILE_BASE/.exe/}
|
||||
if [ -f "${THIS_FILE/.dll/}.diz" ]; then
|
||||
THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz
|
||||
else
|
||||
THIS_DIZ_FILE="$($FIND $THIS_DIR -name $DIZ_NAME | $SED 1q)"
|
||||
if [ ! -f "$THIS_DIZ_FILE" ]; then
|
||||
# As a last resort, look for diz file in the whole build output
|
||||
# dir.
|
||||
THIS_DIZ_FILE="$($FIND $THIS -name $DIZ_NAME | $SED 1q)"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_DIZ_FILE" ]; then
|
||||
$MKDIR -p $FILE_WORK_DIR/this
|
||||
(cd $FILE_WORK_DIR/this ; $UNARCHIVE -o $THIS_DIZ_FILE)
|
||||
export _NT_SYMBOL_PATH="$_NT_SYMBOL_PATH;$FILE_WORK_DIR/this"
|
||||
fi
|
||||
# thme has a diz file next to it.
|
||||
OTHER_DIZ_FILE="$($FIND $OTHER_DIR -name $DIZ_NAME | $SED 1q)"
|
||||
if [ ! -f "$OTHER_DIZ_FILE" ]; then
|
||||
# As a last resort, look for diz file in the whole build output
|
||||
# dir.
|
||||
OTHER_DIZ_FILE="$($FIND $OTHER -name $DIZ_NAME | $SED 1q)"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$OTHER_DIZ_FILE" ]; then
|
||||
$MKDIR -p $FILE_WORK_DIR/other
|
||||
(cd $FILE_WORK_DIR/other ; $UNARCHIVE -o $OTHER_DIZ_FILE)
|
||||
export _NT_SYMBOL_PATH="$FILE_WORK_DIR/other"
|
||||
fi
|
||||
THIS_FILE_BASE=${THIS_FILE/.dll/}
|
||||
THIS_FILE_BASE=${THIS_FILE_BASE/.exe/}
|
||||
if [ -f "${THIS_FILE/.dll/}.diz" ]; then
|
||||
THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz
|
||||
else
|
||||
THIS_DIZ_FILE="$($FIND $THIS_DIR -name $DIZ_NAME | $SED 1q)"
|
||||
if [ ! -f "$THIS_DIZ_FILE" ]; then
|
||||
# As a last resort, look for diz file in the whole build output
|
||||
# dir.
|
||||
THIS_DIZ_FILE="$($FIND $THIS -name $DIZ_NAME | $SED 1q)"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_DIZ_FILE" ]; then
|
||||
$MKDIR -p $FILE_WORK_DIR/this
|
||||
(cd $FILE_WORK_DIR/this ; $UNARCHIVE -o $THIS_DIZ_FILE)
|
||||
export _NT_SYMBOL_PATH="$_NT_SYMBOL_PATH;$FILE_WORK_DIR/this"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$SKIP_BIN_DIFF" ]; then
|
||||
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
|
||||
# The files were bytewise identical.
|
||||
if [ -n "$VERBOSE" ]; then
|
||||
echo " : : : : : $BIN_FILE"
|
||||
echo " : : : : : : $BIN_FILE"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
@ -664,19 +670,19 @@ compare_bin_file() {
|
||||
DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE)
|
||||
SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM)
|
||||
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] \
|
||||
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then
|
||||
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = 512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = 512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = -512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \
|
||||
&& [ "$DIFF_SIZE_NUM" = -512 ]; then
|
||||
# On windows, size of binaries increase in 512 increments.
|
||||
SIZE_MSG="($SIZE_MSG)"
|
||||
DIFF_SIZE=
|
||||
else
|
||||
@ -711,18 +717,18 @@ compare_bin_file() {
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
# The output from dumpbin on windows differs depending on if the debug symbol
|
||||
# files are still around at the location the binary is pointing too. Need
|
||||
# to filter out that extra information.
|
||||
$DUMPBIN -exports $OTHER_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
|
||||
$DUMPBIN -exports $THIS_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
|
||||
# to filter out that extra information.
|
||||
$DUMPBIN -exports $OTHER_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
|
||||
$DUMPBIN -exports $THIS_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
|
||||
elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
|
||||
# Some symbols get seemingly random 15 character prefixes. Filter them out.
|
||||
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
|
||||
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
|
||||
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
|
||||
else
|
||||
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
|
||||
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
|
||||
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
|
||||
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
|
||||
fi
|
||||
|
||||
|
||||
LC_ALL=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff
|
||||
if [ -s $WORK_FILE_BASE.symbols.diff ]; then
|
||||
SYM_MSG=" diff "
|
||||
@ -735,7 +741,7 @@ compare_bin_file() {
|
||||
SYM_MSG=" $SYM_MSG "
|
||||
fi
|
||||
else
|
||||
SYM_MSG="($SYM_MSG)"
|
||||
SYM_MSG="($SYM_MSG)"
|
||||
DIFF_SYM=
|
||||
fi
|
||||
else
|
||||
@ -748,48 +754,48 @@ compare_bin_file() {
|
||||
|
||||
# Check dependencies
|
||||
if [ -n "$LDD_CMD" ]; then
|
||||
(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
|
||||
(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
|
||||
(cd $FILE_WORK_DIR && $RM -f $NAME)
|
||||
|
||||
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
|
||||
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
|
||||
|
||||
if [ -s $WORK_FILE_BASE.deps.diff ]; then
|
||||
(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
|
||||
(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
|
||||
(cd $FILE_WORK_DIR && $RM -f $NAME)
|
||||
|
||||
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
|
||||
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
|
||||
|
||||
if [ -s $WORK_FILE_BASE.deps.diff ]; then
|
||||
if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then
|
||||
DEP_MSG=" diff "
|
||||
DEP_MSG=" diff "
|
||||
else
|
||||
DEP_MSG=" redun "
|
||||
DEP_MSG=" redun "
|
||||
fi
|
||||
if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then
|
||||
DIFF_DEP=true
|
||||
if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then
|
||||
DIFF_DEP=true
|
||||
if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then
|
||||
DEP_MSG="*$DEP_MSG*"
|
||||
REGRESSIONS=true
|
||||
else
|
||||
else
|
||||
DEP_MSG=" $DEP_MSG "
|
||||
fi
|
||||
fi
|
||||
else
|
||||
DEP_MSG="($DEP_MSG)"
|
||||
DIFF_DEP=
|
||||
DEP_MSG="($DEP_MSG)"
|
||||
DIFF_DEP=
|
||||
fi
|
||||
else
|
||||
DEP_MSG=" "
|
||||
DIFF_DEP=
|
||||
else
|
||||
DEP_MSG=" "
|
||||
DIFF_DEP=
|
||||
if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
|
||||
DEP_MSG=" ! "
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
DEP_MSG=" - "
|
||||
DEP_MSG=" - "
|
||||
fi
|
||||
|
||||
|
||||
# Compare fulldump output
|
||||
if [ -n "$FULLDUMP_CMD" ] && [ -z "$SKIP_FULLDUMP_DIFF" ]; then
|
||||
$FULLDUMP_CMD $OTHER_FILE > $WORK_FILE_BASE.fulldump.other 2>&1
|
||||
$FULLDUMP_CMD $THIS_FILE > $WORK_FILE_BASE.fulldump.this 2>&1
|
||||
LC_ALL=C $DIFF $WORK_FILE_BASE.fulldump.other $WORK_FILE_BASE.fulldump.this > $WORK_FILE_BASE.fulldump.diff
|
||||
|
||||
|
||||
if [ -s $WORK_FILE_BASE.fulldump.diff ]; then
|
||||
ELF_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.fulldump.diff | awk '{print $5}')
|
||||
ELF_MSG=$($PRINTF "%8d" $ELF_DIFF_SIZE)
|
||||
@ -816,14 +822,17 @@ compare_bin_file() {
|
||||
|
||||
# Compare disassemble output
|
||||
if [ -n "$DIS_CMD" ] && [ -z "$SKIP_DIS_DIFF" ]; then
|
||||
if [ -z "$DIS_DIFF_FILTER" ]; then
|
||||
DIS_DIFF_FILTER="$CAT"
|
||||
fi
|
||||
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.other 2>&1
|
||||
$DIS_CMD $THIS_FILE | $GREP -v $NAME | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.this 2>&1
|
||||
|
||||
# By default we filter out differences that include references to symbols.
|
||||
# To get a raw diff with the complete disassembly, set
|
||||
# DIS_DIFF_FILTER="$CAT"
|
||||
if [ -z "$DIS_DIFF_FILTER" ]; then
|
||||
DIS_DIFF_FILTER="$GREP -v ' # .* <.*>$'"
|
||||
fi
|
||||
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.other 2>&1
|
||||
$DIS_CMD $THIS_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1
|
||||
|
||||
LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff
|
||||
|
||||
|
||||
if [ -s $WORK_FILE_BASE.dis.diff ]; then
|
||||
DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}')
|
||||
DIS_MSG=$($PRINTF "%8d" $DIS_DIFF_SIZE)
|
||||
@ -901,7 +910,9 @@ compare_all_libs() {
|
||||
OTHER_DIR=$2
|
||||
WORK_DIR=$3
|
||||
|
||||
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' -o -name 'JavaControlPanel' \) | $SORT | $FILTER)
|
||||
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \
|
||||
-o -name '*.dll' -o -name '*.obj' -o -name '*.o' \
|
||||
-o -name '*.cpl' \) | $SORT | $FILTER)
|
||||
|
||||
if [ -n "$LIBS" ]; then
|
||||
echo Libraries...
|
||||
@ -961,7 +972,7 @@ COMPARE_ROOT=/tmp/cimages.$USER
|
||||
$MKDIR -p $COMPARE_ROOT
|
||||
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
if [ "$(uname -o)" = "Cygwin" ]; then
|
||||
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
|
||||
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -1085,7 +1096,7 @@ while [ -n "$1" ]; do
|
||||
CMP_JARS=true
|
||||
CMP_LIBS=true
|
||||
CMP_EXECS=true
|
||||
|
||||
|
||||
if [ -z "$FILTER" ]; then
|
||||
FILTER="$GREP"
|
||||
fi
|
||||
@ -1136,17 +1147,8 @@ fi
|
||||
|
||||
if [ "$SKIP_DEFAULT" != "true" ]; then
|
||||
if [ -z "$OTHER" ]; then
|
||||
OTHER="$THIS/../$LEGACY_BUILD_DIR"
|
||||
if [ -d "$OTHER" ]; then
|
||||
OTHER="$( cd "$OTHER" && pwd )"
|
||||
else
|
||||
echo "Default old build directory does not exist:"
|
||||
echo "$OTHER"
|
||||
exit 1
|
||||
fi
|
||||
echo "Comparing to default old build:"
|
||||
echo "$OTHER"
|
||||
echo
|
||||
echo "Nothing to compare to, set with -o"
|
||||
exit 1
|
||||
else
|
||||
if [ ! -d "$OTHER" ]; then
|
||||
echo "Other build directory does not exist:"
|
||||
@ -1160,90 +1162,47 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
|
||||
fi
|
||||
|
||||
|
||||
# Figure out the layout of the this build. Which kinds of images have been produced
|
||||
if [ -d "$THIS/install/j2sdk-image" ]; then
|
||||
# Find the common images to compare, prioritizing later build stages
|
||||
if [ -d "$THIS/install/j2sdk-image" ] && [ -d "$OTHER/install/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/install/j2sdk-image"
|
||||
THIS_J2RE="$THIS/install/j2re-image"
|
||||
echo "Selecting install images in this build"
|
||||
elif [ -d "$THIS/deploy/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/deploy/j2sdk-image"
|
||||
THIS_J2RE="$THIS/deploy/j2re-image"
|
||||
echo "Selecting deploy images in this build"
|
||||
elif [ -d "$THIS/images/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/images/j2sdk-image"
|
||||
THIS_J2RE="$THIS/images/j2re-image"
|
||||
echo "Selecting jdk images in this build"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
|
||||
if [ -d "$THIS/install/j2sdk-image" ]; then
|
||||
# If there is an install image, prefer that, it's also overlay
|
||||
THIS_J2SDK_OVERLAY="$THIS/install/j2sdk-image"
|
||||
THIS_J2RE_OVERLAY="$THIS/install/j2re-image"
|
||||
echo "Selecting install overlay images in this build"
|
||||
else
|
||||
THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
|
||||
THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
|
||||
echo "Selecting jdk overlay images in this build"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/images/j2sdk-bundle" ]; then
|
||||
THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
|
||||
THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
|
||||
echo "Selecting bundles in this build"
|
||||
fi
|
||||
|
||||
# Figure out the layout of the other build (old or new, normal or overlay image)
|
||||
if [ -d "$OTHER/j2sdk-image" ]; then
|
||||
if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then
|
||||
OTHER_J2SDK="$OTHER/j2sdk-image"
|
||||
OTHER_J2RE="$OTHER/j2re-image"
|
||||
echo "Selecting old-style images in other build"
|
||||
else
|
||||
OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
|
||||
OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
|
||||
echo "Selecting overlay images in other build"
|
||||
fi
|
||||
elif [ -d "$OTHER/install/j2sdk-image" ]; then
|
||||
OTHER_J2SDK="$OTHER/install/j2sdk-image"
|
||||
OTHER_J2RE="$OTHER/install/j2re-image"
|
||||
echo "Selecting install images in other build"
|
||||
elif [ -d "$OTHER/deploy/j2sdk-image" ]; then
|
||||
echo "Selecting install images for compare"
|
||||
elif [ -d "$THIS/deploy/j2sdk-image" ] && [ -d "$OTHER/deploy/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/deploy/j2sdk-image"
|
||||
THIS_J2RE="$THIS/deploy/j2re-image"
|
||||
OTHER_J2SDK="$OTHER/deploy/j2sdk-image"
|
||||
OTHER_J2RE="$OTHER/deploy/j2re-image"
|
||||
echo "Selecting deploy images in other build"
|
||||
elif [ -d "$OTHER/images/j2sdk-image" ]; then
|
||||
echo "Selecting deploy images for compare"
|
||||
elif [ -d "$THIS/images/j2sdk-image" ] && [ -d "$OTHER/images/j2sdk-image" ]; then
|
||||
THIS_J2SDK="$THIS/images/j2sdk-image"
|
||||
THIS_J2RE="$THIS/images/j2re-image"
|
||||
OTHER_J2SDK="$OTHER/images/j2sdk-image"
|
||||
OTHER_J2RE="$OTHER/images/j2re-image"
|
||||
echo "Selecting jdk images in other build"
|
||||
fi
|
||||
|
||||
if [ -d "$OTHER/j2sdk-bundle" ]; then
|
||||
OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle"
|
||||
OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle"
|
||||
echo "Selecting bundles in other build"
|
||||
elif [ -d "$OTHER/images/j2sdk-bundle" ]; then
|
||||
OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
|
||||
OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
|
||||
echo "Selecting jdk bundles in other build"
|
||||
fi
|
||||
|
||||
if [ -z "$THIS_J2SDK" ] || [ -z "$THIS_J2RE" ]; then
|
||||
if [ -z "$THIS_J2SDK_OVERLAY" ]; then
|
||||
echo "Cannot locate images for this build. Are you sure you have run 'make images'?"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$OTHER_J2SDK" ] && [ -n "$OTHER_J2SDK_OVERLAY" ] && [ -z "$THIS_J2SDK_OVERLAY" ]; then
|
||||
echo "OTHER build only has an overlay image while this build does not. Nothing to compare!"
|
||||
echo "Selecting jdk images for compare"
|
||||
else
|
||||
echo "No common images found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
|
||||
echo "WARNING! OTHER build has bundles built while this build does not."
|
||||
echo "Skipping bundle compare!"
|
||||
if [ -d "$THIS/images/j2sdk-bundle" ] && [ -d "$OTHER/images/j2sdk-bundle" ]; then
|
||||
THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
|
||||
THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
|
||||
OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
|
||||
OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
|
||||
echo "Also comparing macosx bundles"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/deploy" ] && [ -d "$OTHER/deploy" ]; then
|
||||
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/dist/installer/bundles"
|
||||
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles"
|
||||
echo "Also comparing deploy/bundles"
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/JavaAppletPlugin.plugin"
|
||||
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/JavaAppletPlugin.plugin"
|
||||
echo "Also comparing JavaAppletPlugin"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d "$OTHER/images" ]; then
|
||||
@ -1266,22 +1225,13 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
|
||||
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
|
||||
fi
|
||||
|
||||
if [ -d "$THIS/docs" ]; then
|
||||
if [ -d "$THIS/docs" ] && [ -d "$OTHER/docs" ]; then
|
||||
THIS_DOCS="$THIS/docs"
|
||||
fi
|
||||
|
||||
if [ -d "$OTHER/docs" ]; then
|
||||
OTHER_DOCS="$OTHER/docs"
|
||||
fi
|
||||
|
||||
if [ -z "$THIS_DOCS" ]; then
|
||||
echo "Also comparing docs"
|
||||
else
|
||||
echo "WARNING! Docs haven't been built and won't be compared."
|
||||
fi
|
||||
|
||||
if [ -z "$OTHER_DOCS" ]; then
|
||||
echo "WARNING! Other build doesn't contain docs, skipping doc compare."
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
@ -1293,29 +1243,18 @@ if [ "$CMP_NAMES" = "true" ]; then
|
||||
compare_dirs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
|
||||
echo -n "J2RE "
|
||||
compare_dirs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
|
||||
|
||||
echo -n "J2SDK "
|
||||
compare_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
|
||||
echo -n "J2RE "
|
||||
compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "J2SDK Overlay "
|
||||
compare_dirs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
|
||||
echo -n "J2RE Overlay "
|
||||
compare_dirs $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
|
||||
|
||||
echo -n "J2SDK Overlay "
|
||||
compare_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
|
||||
echo -n "J2RE Overlay "
|
||||
compare_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
|
||||
echo -n "J2SDK Bundle "
|
||||
compare_dirs $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
|
||||
echo -n "J2RE Bundle "
|
||||
compare_dirs $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
|
||||
|
||||
|
||||
echo -n "J2SDK Bundle "
|
||||
compare_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
|
||||
echo -n "J2RE Bundle "
|
||||
@ -1331,6 +1270,12 @@ if [ "$CMP_NAMES" = "true" ]; then
|
||||
compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_dirs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_PERMS" = "true" ]; then
|
||||
@ -1340,21 +1285,13 @@ if [ "$CMP_PERMS" = "true" ]; then
|
||||
echo -n "J2RE "
|
||||
compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "J2SDK Overlay "
|
||||
compare_permissions $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
|
||||
echo -n "J2RE Overlay "
|
||||
compare_permissions $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
|
||||
echo -n "J2SDK Bundle "
|
||||
compare_permissions $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
|
||||
echo -n "J2RE Bundle "
|
||||
compare_permissions $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/j2re-bundle
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_TYPES" = "true" ]; then
|
||||
@ -1364,12 +1301,6 @@ if [ "$CMP_TYPES" = "true" ]; then
|
||||
echo -n "J2RE "
|
||||
compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "J2SDK Overlay "
|
||||
compare_file_types $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
|
||||
echo -n "J2RE Overlay "
|
||||
compare_file_types $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
|
||||
echo -n "J2SDK Bundle "
|
||||
compare_file_types $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
|
||||
@ -1379,6 +1310,10 @@ if [ "$CMP_TYPES" = "true" ]; then
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_GENERAL" = "true" ]; then
|
||||
@ -1388,12 +1323,6 @@ if [ "$CMP_GENERAL" = "true" ]; then
|
||||
echo -n "J2RE "
|
||||
compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "J2SDK Overlay "
|
||||
compare_general_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
|
||||
echo -n "J2RE Overlay "
|
||||
compare_general_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
|
||||
echo -n "J2SDK Bundle "
|
||||
compare_general_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
|
||||
@ -1407,6 +1336,10 @@ if [ "$CMP_GENERAL" = "true" ]; then
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_ZIPS" = "true" ]; then
|
||||
@ -1434,6 +1367,12 @@ if [ "$CMP_ZIPS" = "true" ]; then
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_zip_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_BUNDLE_DIR" ] && [ -n "$OTHER_DEPLOY_BUNDLE_DIR" ]; then
|
||||
compare_all_zip_files $THIS_DEPLOY_BUNDLE_DIR $OTHER_DEPLOY_BUNDLE_DIR $COMPARE_ROOT/deploy-bundle
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
compare_all_zip_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_JARS" = "true" ]; then
|
||||
@ -1443,6 +1382,9 @@ if [ "$CMP_JARS" = "true" ]; then
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
compare_all_jar_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_LIBS" = "true" ]; then
|
||||
@ -1454,26 +1396,30 @@ if [ "$CMP_LIBS" = "true" ]; then
|
||||
compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "Bundle "
|
||||
compare_all_libs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$CMP_EXECS" = "true" ]; then
|
||||
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
|
||||
compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
|
||||
fi
|
||||
if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
|
||||
echo -n "Overlay "
|
||||
compare_all_execs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
|
||||
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
|
||||
echo -n "J2RE "
|
||||
compare_all_execs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
|
||||
fi
|
||||
fi
|
||||
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
|
||||
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
|
||||
fi
|
||||
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then
|
||||
echo -n "JavaAppletPlugin "
|
||||
compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
|
||||
fi
|
||||
fi
|
||||
|
||||
echo
|
||||
|
@ -85,6 +85,7 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jjs
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
@ -108,6 +109,7 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/jjs
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
@ -172,6 +174,7 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/jdb
|
||||
./bin/jhat
|
||||
./bin/jinfo
|
||||
./bin/jjs
|
||||
./bin/jmap
|
||||
./bin/jps
|
||||
./bin/jrunscript
|
||||
@ -195,6 +198,7 @@ ACCEPTED_BIN_DIFF="
|
||||
./bin/wsimport
|
||||
./bin/xjc
|
||||
./jre/bin/java
|
||||
./jre/bin/jjs
|
||||
./jre/bin/keytool
|
||||
./jre/bin/orbd
|
||||
./jre/bin/pack200
|
||||
@ -910,11 +914,6 @@ ACCEPTED_JARZIP_CONTENTS="
|
||||
/META-INF/INDEX.LIST
|
||||
"
|
||||
|
||||
KNOWN_BIN_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
ACCEPTED_BIN_DIFF="
|
||||
./bin/appletviewer
|
||||
./bin/idlj
|
||||
@ -964,34 +963,82 @@ ACCEPTED_BIN_DIFF="
|
||||
./jre/bin/tnameserv
|
||||
./jre/lib/libsaproc.dylib
|
||||
./jre/lib/server/libjvm.dylib
|
||||
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.dylib
|
||||
./demo/jvmti/gctest/lib/libgctest.dylib
|
||||
./demo/jvmti/heapTracker/lib/libheapTracker.dylib
|
||||
./demo/jvmti/heapViewer/lib/libheapViewer.dylib
|
||||
./demo/jvmti/minst/lib/libminst.dylib
|
||||
./demo/jvmti/mtrace/lib/libmtrace.dylib
|
||||
./demo/jvmti/versionCheck/lib/libversionCheck.dylib
|
||||
./demo/jvmti/waiters/lib/libwaiters.dylib
|
||||
./Contents/Home/lib/libAppleScriptEngine.dylib
|
||||
./Contents/Home/lib/libattach.dylib
|
||||
./Contents/Home/lib/libawt_lwawt.dylib
|
||||
./Contents/Home/lib/libdeploy.dylib
|
||||
./Contents/Home/lib/libdt_socket.dylib
|
||||
./Contents/Home/lib/libhprof.dylib
|
||||
./Contents/Home/lib/libinstrument.dylib
|
||||
./Contents/Home/lib/libjava_crw_demo.dylib
|
||||
./Contents/Home/lib/libjdwp.dylib
|
||||
./Contents/Home/lib/libjsdt.dylib
|
||||
./Contents/Home/lib/libjsig.dylib
|
||||
./Contents/Home/lib/libmanagement.dylib
|
||||
./Contents/Home/lib/libnpjp2.dylib
|
||||
./Contents/Home/lib/libosx.dylib
|
||||
./Contents/Home/lib/libosxapp.dylib
|
||||
./Contents/Home/lib/libsaproc.dylib
|
||||
./Contents/Home/lib/libsplashscreen.dylib
|
||||
./Contents/Home/lib/libverify.dylib
|
||||
./Contents/Home/lib/server/libjsig.dylib
|
||||
./Contents/Home/lib/server/libjvm.dylib
|
||||
./jre/lib/libAppleScriptEngine.dylib
|
||||
./jre/lib/libattach.dylib
|
||||
./jre/lib/libawt_lwawt.dylib
|
||||
./jre/lib/libdeploy.dylib
|
||||
./jre/lib/libdt_socket.dylib
|
||||
./jre/lib/libhprof.dylib
|
||||
./jre/lib/libinstrument.dylib
|
||||
./jre/lib/libjava_crw_demo.dylib
|
||||
./jre/lib/libjdwp.dylib
|
||||
./jre/lib/libjsdt.dylib
|
||||
./jre/lib/libjsig.dylib
|
||||
./jre/lib/libmanagement.dylib
|
||||
./jre/lib/libosx.dylib
|
||||
./jre/lib/libosxapp.dylib
|
||||
./jre/lib/libsaproc.dylib
|
||||
./jre/lib/libsplashscreen.dylib
|
||||
./jre/lib/libverify.dylib
|
||||
./jre/lib/server/libjvm.dylib
|
||||
./lib/libAppleScriptEngine.dylib
|
||||
./lib/libattach.dylib
|
||||
./lib/libawt_lwawt.dylib
|
||||
./lib/libdeploy.dylib
|
||||
./lib/libdt_socket.dylib
|
||||
./lib/libhprof.dylib
|
||||
./lib/libinstrument.dylib
|
||||
./lib/libjava_crw_demo.dylib
|
||||
./lib/libjdwp.dylib
|
||||
./lib/libjsdt.dylib
|
||||
./lib/libjsig.dylib
|
||||
./lib/libmanagement.dylib
|
||||
./lib/libnpjp2.dylib
|
||||
./lib/libosx.dylib
|
||||
./lib/libosxapp.dylib
|
||||
./lib/libverify.dylib
|
||||
./lib/libsaproc.dylib
|
||||
./lib/libsplashscreen.dylib
|
||||
./lib/server/libjvm.dylib
|
||||
./lib/deploy/JavaControlPanel.prefPane/Contents/MacOS/JavaControlPanel
|
||||
"
|
||||
|
||||
KNOWN_SIZE_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
SORT_SYMBOLS="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
./Contents/Home/lib/libsaproc.dylib
|
||||
./jre/lib/libsaproc.dylib
|
||||
./lib/libsaproc.dylib
|
||||
"
|
||||
|
||||
KNOWN_SYM_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
ACCEPTED_SMALL_SIZE_DIFF="
|
||||
./bin/javaws
|
||||
./Contents/Home/bin/_javaws
|
||||
"
|
||||
|
||||
KNOWN_ELF_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
KNOWN_DIS_DIFF="
|
||||
./jre/lib/libJObjC.dylib
|
||||
./lib/libJObjC.dylib
|
||||
"
|
||||
|
||||
fi
|
||||
|
@ -22,10 +22,10 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Usage: ./logger.sh theloggfile acommand arg1 arg2
|
||||
# Usage: ./logger.sh theloggfile acommand arg1 arg2
|
||||
#
|
||||
# Execute acommand with args, in such a way that
|
||||
# both stdout and stderr from acommand are appended to
|
||||
# both stdout and stderr from acommand are appended to
|
||||
# theloggfile.
|
||||
#
|
||||
# Preserve stdout and stderr, so that the stdout
|
||||
|
@ -26,12 +26,12 @@
|
||||
#
|
||||
# This shell script is supposed to be set as a replacement for SHELL in make,
|
||||
# causing it to be called whenever make wants to execute shell commands.
|
||||
# The <shell command line> is suitable for passing on to the old shell,
|
||||
# The <shell command line> is suitable for passing on to the old shell,
|
||||
# typically beginning with -c.
|
||||
#
|
||||
# This script will make sure the shell command line is executed with
|
||||
# This script will make sure the shell command line is executed with
|
||||
# OLD_SHELL -x, and it will also store a simple log of the the time it takes to
|
||||
# execute the command in the OUTPUT_FILE, using the "time" utility as pointed
|
||||
# execute the command in the OUTPUT_FILE, using the "time" utility as pointed
|
||||
# to by TIME_CMD. If TIME_CMD is "-", no timestamp will be stored.
|
||||
|
||||
TIME_CMD="$1"
|
||||
|
@ -171,7 +171,7 @@ checkErrors
|
||||
) 2>&1 | tee ${t3}.build.txt
|
||||
checkErrors
|
||||
|
||||
# Compare old build to build-infra build
|
||||
# Compare old build to build-infra build
|
||||
( \
|
||||
sh ${t0}/common/bin/compareimage.sh \
|
||||
${t3}/build/*/j2sdk-image \
|
||||
@ -181,4 +181,3 @@ checkErrors
|
||||
checkErrors
|
||||
|
||||
exit 0
|
||||
|
||||
|
@ -80,7 +80,7 @@ for r in $repos ; do
|
||||
if [ $repo = "$r" ] ; then
|
||||
found="true"
|
||||
break;
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $found = "false" ] ; then
|
||||
echo "ERROR: Unknown repo: $repo. Should be one of [$repos]." >&2
|
||||
@ -200,4 +200,3 @@ do
|
||||
printf "%s\n" "$line" >> $output
|
||||
fi
|
||||
done < "$input"
|
||||
|
||||
|
@ -321,7 +321,7 @@ jdk.compiler_COPY := javax.tools.JavaCompilerTool
|
||||
|
||||
################################################################################
|
||||
|
||||
jdk.jcmd_COPY := _options
|
||||
jdk.jcmd_COPY := _options
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -470,7 +470,7 @@ define SetupModuleCompilation
|
||||
$1_DEPS := $$(call FindDepsForModule, $1)
|
||||
|
||||
$1_CLASSPATH := $$(addprefix $(JDK_OUTPUTDIR)/modules/,$$($1_DEPS))
|
||||
# When crypto classes are prebuilt, need to look for classes already in
|
||||
# When crypto classes are prebuilt, need to look for classes already in
|
||||
# output dir.
|
||||
ifneq ($(BUILD_CRYPTO), true)
|
||||
$1_CLASSPATH += $(JDK_OUTPUTDIR)/modules/$1
|
||||
@ -495,7 +495,7 @@ define SetupModuleCompilation
|
||||
|
||||
# Declare dependencies between java compilation of different modules.
|
||||
# Since not all modules have been declared yet, or might be declared
|
||||
# in different invocations of this file, use the macro to find the
|
||||
# in different invocations of this file, use the macro to find the
|
||||
# correct target file to depend on.
|
||||
# Only the javac compilation actually depends on other modules so limit
|
||||
# dependency declaration to that by using the *_COMPILE_TARGET variable.
|
||||
|
@ -481,7 +481,7 @@ $(DOCLETAPI_OPTIONS_FILE):
|
||||
) >> $@
|
||||
|
||||
# Create a file with the package names in it
|
||||
$(DOCLETAPI_PACKAGES_FILE): $(call PackageDependencies,$(DOCLETAPI_PKGS))
|
||||
$(DOCLETAPI_PACKAGES_FILE): $(call PackageDependencies,$(DOCLETAPI_PKGS))
|
||||
$(prep-target)
|
||||
$(call PackageFilter,$(DOCLETAPI_PKGS))
|
||||
|
||||
|
@ -43,7 +43,7 @@ include $(SRC_ROOT)/make/common/Modules.gmk
|
||||
include $(JDK_TOPDIR)/make/ProfileNames.gmk
|
||||
|
||||
# Declare ALL_TARGETS as an immediate variable. This variable is a list of all
|
||||
# valid top level targets. It's used to declare them all as PHONY and to
|
||||
# valid top level targets. It's used to declare them all as PHONY and to
|
||||
# generate the -only targets.
|
||||
ALL_TARGETS :=
|
||||
|
||||
@ -314,9 +314,9 @@ ALL_TARGETS += install
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Dependency declarations between targets.
|
||||
# Dependency declarations between targets.
|
||||
#
|
||||
# These are declared in two groups. First all dependencies between targets that
|
||||
# These are declared in two groups. First all dependencies between targets that
|
||||
# have recipes above as these dependencies may be disabled. Then the aggregator
|
||||
# targets that do not have recipes of their own, which will never have their
|
||||
# dependencies disabled.
|
||||
@ -324,10 +324,10 @@ ALL_TARGETS += install
|
||||
################################################################################
|
||||
# Targets with recipes above
|
||||
|
||||
# If running an *-only target, parallel execution and dependencies between
|
||||
# recipe targets are disabled. This makes it possible to run a select set of
|
||||
# If running an *-only target, parallel execution and dependencies between
|
||||
# recipe targets are disabled. This makes it possible to run a select set of
|
||||
# recipe targets in order. It's the responsibility of the user to make sure
|
||||
# all prerequisites are fulfilled.
|
||||
# all prerequisites are fulfilled.
|
||||
ifneq ($(findstring -only, $(MAKECMDGOALS)), )
|
||||
.NOTPARALLEL:
|
||||
else
|
||||
@ -376,11 +376,11 @@ else
|
||||
# Declare dependencies from all other <module>-lib to java.base-lib
|
||||
$(foreach t, $(filter-out java.base-libs, $(LIB_TARGETS)), \
|
||||
$(eval $t: java.base-libs))
|
||||
# Declare the special case dependency for jdk.deploy.osx where libosx
|
||||
# Declare the special case dependency for jdk.deploy.osx where libosx
|
||||
# links against libosxapp.
|
||||
jdk.deploy.osx-libs: java.desktop-libs
|
||||
|
||||
# This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
|
||||
# This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
|
||||
# header file used by jdk.jdwp libs.
|
||||
jdk.jdwp.agent-libs: jdk.jdi-gensrc
|
||||
|
||||
@ -493,7 +493,7 @@ ALL_TARGETS += default all
|
||||
# Clean targets
|
||||
#
|
||||
################################################################################
|
||||
# Clean targets are automatically run serially by the Makefile calling this
|
||||
# Clean targets are automatically run serially by the Makefile calling this
|
||||
# file.
|
||||
|
||||
CLEAN_COMPONENTS += langtools corba hotspot jdk nashorn images \
|
||||
@ -529,8 +529,8 @@ ALL_TARGETS += clean dist-clean $(CLEAN_TARGETS)
|
||||
|
||||
################################################################################
|
||||
|
||||
# Setup a rule for SPEC file that fails if executed. This check makes sure the
|
||||
# configuration is up to date after changes to configure.
|
||||
# Setup a rule for SPEC file that fails if executed. This check makes sure the
|
||||
# configuration is up to date after changes to configure.
|
||||
ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
|
||||
$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
|
||||
@$(ECHO) "ERROR: $(SPEC) is not up to date."
|
||||
|
@ -228,25 +228,26 @@ define ParseConfAndSpec
|
||||
# If we only have global targets, no need to bother with SPEC or CONF
|
||||
ifneq ($$(origin SPEC),undefined)
|
||||
# We have been given a SPEC, check that it works out properly
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Cannot locate spec.gmk, given by SPEC=$$(SPEC))
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
ifneq ($$(origin CONF),undefined)
|
||||
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves,
|
||||
# but complain if this is the top-level make call.
|
||||
ifeq ($$(MAKELEVEL),0)
|
||||
$$(info Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(info Error: Cannot use CONF=$$(CONF) and SPEC=$$(SPEC) at the same time. Choose one.)
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
endif
|
||||
ifeq ($$(wildcard $$(SPEC)),)
|
||||
$$(info Error: Cannot locate spec.gmk, given by SPEC=$$(SPEC).)
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
# ... OK, we're satisfied, we'll use this SPEC later on
|
||||
else
|
||||
# Find all spec.gmk files in the build output directory
|
||||
output_dir=$$(root_dir)/build
|
||||
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
|
||||
ifeq ($$(all_spec_files),)
|
||||
$$(info No configurations found for $$(root_dir)! Please run configure to create a configuration.)
|
||||
$$(info Error: No configurations found for $$(root_dir).)
|
||||
$$(info Please run 'bash configure' to create a configuration.)
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
# Extract the configuration names from the path
|
||||
@ -262,15 +263,15 @@ define ParseConfAndSpec
|
||||
matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
|
||||
endif
|
||||
ifeq ($$(matching_confs),)
|
||||
$$(info No configurations found matching CONF=$$(CONF))
|
||||
$$(info Available configurations:)
|
||||
$$(info Error: No configurations found matching CONF=$$(CONF).)
|
||||
$$(info Available configurations in $$(output_dir):)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(eval $$(call FatalError))
|
||||
else
|
||||
ifeq ($$(words $$(matching_confs)),1)
|
||||
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
|
||||
else
|
||||
$$(info Building target '$(call GetRealTarget)' in the following configurations (matching CONF=$$(CONF)):)
|
||||
$$(info Building target '$(call GetRealTarget)' in these configurations (matching CONF=$$(CONF)):)
|
||||
$$(foreach var,$$(matching_confs),$$(info * $$(var)))
|
||||
endif
|
||||
endif
|
||||
@ -280,10 +281,10 @@ define ParseConfAndSpec
|
||||
else
|
||||
# No CONF or SPEC given, check the available configurations
|
||||
ifneq ($$(words $$(all_spec_files)),1)
|
||||
$$(info No CONF given, but more than one configuration found in $$(output_dir).)
|
||||
$$(info Available configurations:)
|
||||
$$(info Error: No CONF given, but more than one configuration found.)
|
||||
$$(info Available configurations in $$(output_dir):)
|
||||
$$(foreach var,$$(all_confs),$$(info * $$(var)))
|
||||
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>))
|
||||
$$(info Please retry building with CONF=<config pattern> (or SPEC=<specfile>).)
|
||||
$$(eval $$(call FatalError))
|
||||
endif
|
||||
|
||||
|
@ -166,7 +166,7 @@ define SetupArchiveInner
|
||||
ifneq (,$2)
|
||||
$1_DEPS:=$2
|
||||
else
|
||||
# Add all source roots to the find cache since we are likely going to run find
|
||||
# Add all source roots to the find cache since we are likely going to run find
|
||||
# on these more than once. The cache will only be updated if necessary.
|
||||
$$(eval $$(call FillCacheFind, $$($1_FIND_LIST)))
|
||||
$1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
|
||||
@ -336,7 +336,7 @@ endef
|
||||
#
|
||||
# The sed expression does this:
|
||||
# 1. Add a backslash before any :, = or ! that do not have a backslash already.
|
||||
# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
|
||||
# 2. Apply the file unicode2x.sed which does a whole bunch of \u00XX to \xXX
|
||||
# conversions.
|
||||
# 3. Delete all lines starting with #.
|
||||
# 4. Delete empty lines.
|
||||
@ -345,7 +345,7 @@ endef
|
||||
# as sed on macosx does not understand '\t'.
|
||||
# 7. Replace the first \= with just =.
|
||||
# 8. Finally it's all sorted to create a stable output.
|
||||
#
|
||||
#
|
||||
# It is assumed that = is the character used for separating names and values.
|
||||
define add_file_to_clean
|
||||
# param 1 = BUILD_MYPACKAGE
|
||||
@ -431,7 +431,7 @@ define SetupJavaCompilationInner
|
||||
# Make sure the dirs exist.
|
||||
$$(foreach d,$$($1_SRC), $$(if $$(wildcard $$d),,$$(error SRC specified to SetupJavaCompilation $1 contains missing directory $$d)))
|
||||
$$(eval $$(call MakeDir,$$($1_BIN)))
|
||||
# Add all source roots to the find cache since we are likely going to run find
|
||||
# Add all source roots to the find cache since we are likely going to run find
|
||||
# on these more than once. The cache will only be updated if necessary.
|
||||
$$(eval $$(call FillCacheFind,$$($1_SRC)))
|
||||
# Find all files in the source trees. Preserve order of source roots for overrides to
|
||||
|
@ -405,7 +405,7 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
|
||||
# If the source and target parent directories are the same, recursive copy doesn't work
|
||||
# so we fall back on regular copy, which isn't preserving symlinks.
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(MKDIR) -p '$(@D)'
|
||||
$(RM) '$@'
|
||||
if [ "$(@D)" != "$(<D)" ]; then \
|
||||
$(CP) -f -r -P '$<' '$(@D)'; \
|
||||
@ -427,7 +427,7 @@ else ifeq ($(OPENJDK_TARGET_OS),macosx)
|
||||
# output dir. When these are copied again to images, xattr would fail. By only clearing
|
||||
# attributes when they are present, failing on this is avoided.
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D)
|
||||
$(MKDIR) -p '$(@D)'
|
||||
$(CP) -fRP '$<' '$@'
|
||||
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
|
||||
endef
|
||||
@ -435,7 +435,7 @@ else
|
||||
# Running mkdir and cp in the same shell speeds up copy intensive tasks in Cygwin
|
||||
# significantly.
|
||||
define install-file
|
||||
$(MKDIR) -p $(@D) && $(CP) -fP '$<' '$@'
|
||||
$(MKDIR) -p '$(@D)' && $(CP) -fP '$<' '$@'
|
||||
endef
|
||||
endif
|
||||
|
||||
|
@ -87,11 +87,9 @@ define SetupRMICompilationInner
|
||||
|
||||
$$($1_DEP_FILE): $$($1_CLASS_FILES)
|
||||
$(MKDIR) -p $$($1_STUB_CLASSES_DIR)
|
||||
if [ "x$$($1_ARGS)" != "x" ]; then \
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
fi;
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
|
||||
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
|
||||
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
|
||||
if [ "x$$($1_ARGS2)" != "x" ]; then \
|
||||
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
|
||||
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
|
||||
|
@ -40,9 +40,9 @@ $(eval $(call SetupJavaCompiler,BOOT_JAVAC, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := -XDignore.symbol.file=true -g -Xlint:all$(COMMA)-deprecation -Werror))
|
||||
|
||||
# Any java code executed during a JDK build to build other parts of the JDK must be
|
||||
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
|
||||
# purpose must be built with -target PREVIOUS for bootstrapping purposes, which
|
||||
# Any java code executed during a JDK build to build other parts of the JDK must be
|
||||
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
|
||||
# purpose must be built with -target PREVIOUS for bootstrapping purposes, which
|
||||
# requires restricting to language level and api of previous JDK.
|
||||
#
|
||||
# The generate old bytecode javac setup uses the new compiler to compile for the
|
||||
|
@ -73,9 +73,9 @@ endef
|
||||
# REPLACEMENTS one or more text replacement patterns, using the syntax:
|
||||
# PATTERN => REPLACEMENT_TEXT ; ...
|
||||
#
|
||||
# At least one of INCLUDES or REPLACEMENTS must be present. If both are
|
||||
# present, then the includes will be processed first, and replacements will be
|
||||
# done on the included fragments as well.
|
||||
# If both INCLUDES or REPLACEMENTS are present, then the includes will be
|
||||
# processed first, and replacements will be done on the included fragments as well.
|
||||
# If neither is present, the files will just be copied without modifications.
|
||||
#
|
||||
define SetupTextFileProcessing
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
|
||||
@ -87,10 +87,6 @@ define SetupTextFileProcessingInner
|
||||
$(call LogSetupMacroEntry,SetupTextFileProcessing($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
|
||||
|
||||
ifeq ($$($1_REPLACEMENTS)$$($1_INCLUDES),)
|
||||
$$(error At least one of REPLACEMENTS or INCLUDES are required for $1)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_SOURCE_FILES),)
|
||||
ifneq ($$($1_SOURCE_DIRS),)
|
||||
$$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
|
||||
@ -102,6 +98,9 @@ define SetupTextFileProcessingInner
|
||||
$$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1))
|
||||
endif
|
||||
else
|
||||
ifeq ($$($1_SOURCE_DIRS),)
|
||||
$$(error Must specify either SOURCE_FILES or SOURCE_DIRS (in $1))
|
||||
endif
|
||||
# Find all files in the source trees. Sort to remove duplicates.
|
||||
$$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \
|
||||
$$(error SOURCE_DIRS contains missing directory $$(src) (in $1))))
|
||||
@ -154,7 +153,7 @@ define SetupTextFileProcessingInner
|
||||
$1_REPLACEMENTS += ;
|
||||
endif
|
||||
|
||||
# If we have a trailing ";", add a dummy replacement, since there is no easy
|
||||
# If we have a trailing ";", add a dummy replacement, since there is no easy
|
||||
# way to delete the last word in make.
|
||||
ifeq ($$(lastword $$($1_REPLACEMENTS)), ;)
|
||||
$1_REPLACEMENTS += DUMMY_REPLACEMENT => DUMMY_REPLACEMENT
|
||||
@ -163,11 +162,11 @@ define SetupTextFileProcessingInner
|
||||
# Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command
|
||||
# line (-e "s/A/B/" -e "s/C/D/" ...), basically by replacing '=>' with '/'
|
||||
# and ';' with '/" -e "s/', and adjusting for edge cases.
|
||||
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e "s$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)" \
|
||||
-e "s$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),//" \
|
||||
-e "s$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)"
|
||||
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)' \
|
||||
-e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)' \
|
||||
-e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)'
|
||||
else
|
||||
# We don't have any replacements, just pipe the file through cat.
|
||||
# We don't have any replacements, just pipe the file through cat.
|
||||
$1_REPLACEMENTS_COMMAND_LINE := $(CAT)
|
||||
endif
|
||||
|
||||
@ -176,8 +175,8 @@ define SetupTextFileProcessingInner
|
||||
# Convert an INCLUDE like this PATTERN_1 => file1 ; PATTERN_2 => file2 ;
|
||||
# into an awk script fragment like this:
|
||||
# {
|
||||
# if (matches("PATTERN_1")) { include("file1") } else
|
||||
# if (matches("PATTERN_2")) { include("file2") } else
|
||||
# if (matches("PATTERN_1")) { include("file1") } else
|
||||
# if (matches("PATTERN_2")) { include("file2") } else
|
||||
# print
|
||||
# }
|
||||
|
||||
@ -190,12 +189,12 @@ define SetupTextFileProcessingInner
|
||||
$1_INCLUDES_COMMAND_LINE := $(NAWK) '$$($1_INCLUDES_HEADER_AWK) \
|
||||
{ if (matches("$$($1_INCLUDES_PARTIAL_AWK)") } else print }'
|
||||
else
|
||||
# We don't have any includes, just pipe the file through cat.
|
||||
# We don't have any includes, just pipe the file through cat.
|
||||
$1_INCLUDES_COMMAND_LINE := $(CAT)
|
||||
endif
|
||||
|
||||
# Reset target list before populating it
|
||||
$1 :=
|
||||
$1 :=
|
||||
|
||||
ifneq ($$($1_OUTPUT_FILE),)
|
||||
ifneq ($$(words $$($1_SOURCE_FILES)), 1)
|
||||
@ -204,7 +203,7 @@ define SetupTextFileProcessingInner
|
||||
|
||||
# Note that $1 is space sensitive and must disobey whitespace rules
|
||||
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$($1_SOURCE_FILES), \
|
||||
$$(dir $$($1_OUTPUT_FILE)), $$(notdir $$($1_OUTPUT_FILE))))
|
||||
$$(patsubst %/, %, $$(dir $$($1_OUTPUT_FILE))), $$(notdir $$($1_OUTPUT_FILE))))
|
||||
else
|
||||
ifeq ($$($1_OUTPUT_DIR),)
|
||||
$$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1))
|
||||
@ -212,19 +211,20 @@ define SetupTextFileProcessingInner
|
||||
|
||||
# Now call add_native_source for each source file we are going to process.
|
||||
ifeq ($$($1_SOURCE_BASE_DIR),)
|
||||
# With no base dir specified, put all files in target dir, flattening any
|
||||
# With no base dir specified, put all files in target dir, flattening any
|
||||
# hierarchies. Note that $1 is space sensitive and must disobey whitespace
|
||||
# rules.
|
||||
$$(foreach src, $$($1_SOURCE_FILES), \
|
||||
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \
|
||||
$$($1_OUTPUT_DIR), $$(notdir $$(src)))))
|
||||
$$(patsubst %/, %, $$($1_OUTPUT_DIR)), $$(notdir $$(src)))))
|
||||
else
|
||||
# With a base dir, extract the relative portion of the path. Note that $1
|
||||
# is space sensitive and must disobey whitespace rules, and so is the
|
||||
# arguments to patsubst.
|
||||
$$(foreach src, $$($1_SOURCE_FILES), \
|
||||
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \
|
||||
$$($1_OUTPUT_DIR), $$(patsubst $$($1_SOURCE_BASE_DIR)/%,%,$$(src)))))
|
||||
$$(patsubst %/, %, $$($1_OUTPUT_DIR)), \
|
||||
$$(patsubst $$($1_SOURCE_BASE_DIR)/%,%,$$(src)))))
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
@ -154,7 +154,7 @@ my.make.rule.test.targets.default= \
|
||||
${my.test.target.set:TESTNAME=jdk_lang}, \
|
||||
${my.test.target.set:TESTNAME=jdk_math}, \
|
||||
${my.test.target.set:TESTNAME=jdk_util}
|
||||
|
||||
|
||||
# Default vm test targets (testset=core)
|
||||
my.test.targets.core=
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
if ($#ARGV < 0) {
|
||||
&usage;
|
||||
|
||||
|
||||
die;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ sub parse_file {
|
||||
|
||||
# Skip directories
|
||||
return if -d;
|
||||
|
||||
|
||||
# Skip SCCS files
|
||||
return if ($filename =~ /\/SCCS\//);
|
||||
|
||||
@ -121,18 +121,18 @@ sub parse_file {
|
||||
chdir $dirname;
|
||||
|
||||
open(FILE, $filename) or die "Failed while open $filename: $!\n";
|
||||
|
||||
|
||||
# Read file
|
||||
my @content;
|
||||
my $line;
|
||||
my $emptylinescount = 0;
|
||||
my $modified = 0;
|
||||
|
||||
|
||||
while ($line = <FILE>) {
|
||||
my $originalline = $line;
|
||||
|
||||
# Process line
|
||||
|
||||
|
||||
# Remove from the end of the line spaces and return character
|
||||
while ($line =~ /\s$/) {
|
||||
chop($line);
|
||||
@ -144,16 +144,16 @@ sub parse_file {
|
||||
$line = substr($line, 0, $i) . $tabvalues[7 - ($i % 8)] . substr($line, $i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (length($line) == 0) {
|
||||
$emptylinescount++;
|
||||
} else {
|
||||
while ($emptylinescount > 0) {
|
||||
push(@content, "");
|
||||
|
||||
|
||||
$emptylinescount--;
|
||||
}
|
||||
|
||||
|
||||
push(@content, $line);
|
||||
}
|
||||
|
||||
@ -162,23 +162,23 @@ sub parse_file {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$allfiles++;
|
||||
|
||||
|
||||
if ($emptylinescount > 0) {
|
||||
$modified = 1;
|
||||
}
|
||||
|
||||
close(FILE);
|
||||
|
||||
|
||||
if ($modified != 0) {
|
||||
# Write file
|
||||
open(FILE, ">$filename") or die "Failed while open $filename: $!\n";
|
||||
|
||||
|
||||
for (my $i = 0; $i <= $#content; $i++) {
|
||||
print FILE "$content[$i]\n";
|
||||
}
|
||||
|
||||
|
||||
close(FILE);
|
||||
|
||||
# Print name from current dir
|
||||
@ -204,5 +204,3 @@ sub usage {
|
||||
print "Examples:\n";
|
||||
print " normalizer.pl -e c,cpp,h,hpp .\n";
|
||||
}
|
||||
|
||||
|
||||
|
@ -196,4 +196,3 @@ fi
|
||||
# Cleanup
|
||||
rm -f -r ${tmp}
|
||||
exit 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user