8065914: Various improvements and cleanup of build system

Reviewed-by: erikj
This commit is contained in:
Magnus Ihse Bursie 2014-11-27 15:41:56 +01:00
parent 2f10adad63
commit c4ced97793
29 changed files with 422 additions and 424 deletions

View File

@ -33,7 +33,7 @@ default:
# The shell code below will be executed on /usr/ccs/bin/make on Solaris, but not in GNU make. # 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. # /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. # Assume we have GNU make, but check version.
ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), ) ifeq ($(strip $(foreach v, 3.81% 3.82% 4.%, $(filter $v, $(MAKE_VERSION)))), )
@ -46,7 +46,17 @@ ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
else else
makefile_path:=$(lastword $(MAKEFILE_LIST)) makefile_path:=$(lastword $(MAKEFILE_LIST))
endif 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 # ... and then we can include our helper functions
include $(root_dir)/make/MakeHelpers.gmk 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 # The wrapper target was called so we now have a single configuration. Load the spec file
# and call the real Main.gmk. # and call the real Main.gmk.
include $(SPEC) include $(SPEC)
include $(SRC_ROOT)/make/common/MakeBase.gmk
### Clean up from previous run ### Clean up from previous run
# Remove any build.log from a previous run, if they exist # Remove any build.log from a previous run, if they exist

View File

@ -57,4 +57,3 @@ JAR_CMD:=$(BOOT_JDK)/bin/jar
NATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii NATIVE2ASCII_CMD:=$(BOOT_JDK)/bin/native2ascii
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD) SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)

View File

@ -47,6 +47,7 @@ FIND="@FIND@"
GREP="@GREP@" GREP="@GREP@"
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@" JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
LDD="@LDD@" LDD="@LDD@"
LN="@LN@"
MKDIR="@MKDIR@" MKDIR="@MKDIR@"
NAWK="@NAWK@" NAWK="@NAWK@"
NM="@GNM@" NM="@GNM@"

View File

@ -4331,7 +4331,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1417016445 DATE_WHEN_GENERATED=1417099232
############################################################################### ###############################################################################
# #

View File

@ -76,10 +76,13 @@ diff_text() {
TMP=1 TMP=1
if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then 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 | \ TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
$GREP '^[<>]' | \ $GREP '^[<>]' | \
$SED -e '/[<>] Ant-Version: Apache Ant .*/d' \ $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 fi
if test "x$SUFFIX" = "xjava"; then if test "x$SUFFIX" = "xjava"; then
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \ TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
@ -130,11 +133,10 @@ diff_text() {
$GREP '^[<>]' | \ $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 '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
fi fi
if test "x$SUFFIX" = "xMF"; then if test "x$SUFFIX" = "xhtml"; then
# Filter out date string differences.
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \ TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
$GREP '^[<>]' | \ $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 fi
if test -n "$TMP"; then if test -n "$TMP"; then
echo Files $OTHER_FILE and $THIS_FILE differ echo Files $OTHER_FILE and $THIS_FILE differ
@ -237,7 +239,7 @@ compare_permissions() {
if [ "$OP" != "$TP" ] if [ "$OP" != "$TP" ]
then then
if [ -z "$found" ]; then echo ; found="yes"; fi if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\told: ${OP} new: ${TP}\t$f\n" $PRINTF "\tother: ${OP} this: ${TP}\t$f\n"
fi fi
done done
if [ -z "$found" ]; then if [ -z "$found" ]; then
@ -265,22 +267,20 @@ compare_file_types() {
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'` OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'`
TF=`cd ${THIS_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" ] if [ "$OF" != "$TF" ]
then then
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 if [ -z "$found" ]; then echo ; found="yes"; fi
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n" $PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
fi fi
fi
done done
if [ -z "$found" ]; then if [ -z "$found" ]; then
echo "Identical!" echo "Identical!"
@ -299,9 +299,10 @@ compare_general_files() {
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \ GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \ ! -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 "*.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) | $GREP -v "./bin/" | $SORT | $FILTER)
echo General files... echo General files...
@ -377,7 +378,7 @@ compare_zip_file() {
THIS_SUFFIX="${THIS_ZIP##*.}" THIS_SUFFIX="${THIS_ZIP##*.}"
OTHER_SUFFIX="${OTHER_ZIP##*.}" OTHER_SUFFIX="${OTHER_ZIP##*.}"
if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then 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 return 2
fi fi
@ -567,6 +568,10 @@ compare_bin_file() {
$MKDIR -p $FILE_WORK_DIR $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_THIS_FILE="$THIS_FILE"
ORIG_OTHER_FILE="$OTHER_FILE" ORIG_OTHER_FILE="$OTHER_FILE"
@ -587,6 +592,7 @@ compare_bin_file() {
# On windows we need to unzip the debug symbols, if present # On windows we need to unzip the debug symbols, if present
OTHER_FILE_BASE=${OTHER_FILE/.dll/} OTHER_FILE_BASE=${OTHER_FILE/.dll/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/} OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.cpl/}
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz DIZ_NAME=$(basename $OTHER_FILE_BASE).diz
# java.exe and java.dll diz files will have the same name. Have to # 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 # make sure java.exe gets the right one. This is only needed for
@ -633,7 +639,7 @@ compare_bin_file() {
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
# The files were bytewise identical. # The files were bytewise identical.
if [ -n "$VERBOSE" ]; then if [ -n "$VERBOSE" ]; then
echo " : : : : : $BIN_FILE" echo " : : : : : : $BIN_FILE"
fi fi
return 0 return 0
fi fi
@ -816,11 +822,14 @@ compare_bin_file() {
# Compare disassemble output # Compare disassemble output
if [ -n "$DIS_CMD" ] && [ -z "$SKIP_DIS_DIFF" ]; then if [ -n "$DIS_CMD" ] && [ -z "$SKIP_DIS_DIFF" ]; then
# 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 if [ -z "$DIS_DIFF_FILTER" ]; then
DIS_DIFF_FILTER="$CAT" DIS_DIFF_FILTER="$GREP -v ' # .* <.*>$'"
fi fi
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.other 2>&1 $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 | $DIS_DIFF_FILTER > $WORK_FILE_BASE.dis.this 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 LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff
@ -901,7 +910,9 @@ compare_all_libs() {
OTHER_DIR=$2 OTHER_DIR=$2
WORK_DIR=$3 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 if [ -n "$LIBS" ]; then
echo Libraries... echo Libraries...
@ -1136,17 +1147,8 @@ fi
if [ "$SKIP_DEFAULT" != "true" ]; then if [ "$SKIP_DEFAULT" != "true" ]; then
if [ -z "$OTHER" ]; then if [ -z "$OTHER" ]; then
OTHER="$THIS/../$LEGACY_BUILD_DIR" echo "Nothing to compare to, set with -o"
if [ -d "$OTHER" ]; then
OTHER="$( cd "$OTHER" && pwd )"
else
echo "Default old build directory does not exist:"
echo "$OTHER"
exit 1 exit 1
fi
echo "Comparing to default old build:"
echo "$OTHER"
echo
else else
if [ ! -d "$OTHER" ]; then if [ ! -d "$OTHER" ]; then
echo "Other build directory does not exist:" echo "Other build directory does not exist:"
@ -1160,92 +1162,49 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
fi fi
# Figure out the layout of the this build. Which kinds of images have been produced # Find the common images to compare, prioritizing later build stages
if [ -d "$THIS/install/j2sdk-image" ]; then if [ -d "$THIS/install/j2sdk-image" ] && [ -d "$OTHER/install/j2sdk-image" ]; then
THIS_J2SDK="$THIS/install/j2sdk-image" THIS_J2SDK="$THIS/install/j2sdk-image"
THIS_J2RE="$THIS/install/j2re-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_J2SDK="$OTHER/install/j2sdk-image"
OTHER_J2RE="$OTHER/install/j2re-image" OTHER_J2RE="$OTHER/install/j2re-image"
echo "Selecting install images in other build" echo "Selecting install images for compare"
elif [ -d "$OTHER/deploy/j2sdk-image" ]; then 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_J2SDK="$OTHER/deploy/j2sdk-image"
OTHER_J2RE="$OTHER/deploy/j2re-image" OTHER_J2RE="$OTHER/deploy/j2re-image"
echo "Selecting deploy images in other build" echo "Selecting deploy images for compare"
elif [ -d "$OTHER/images/j2sdk-image" ]; then 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_J2SDK="$OTHER/images/j2sdk-image"
OTHER_J2RE="$OTHER/images/j2re-image" OTHER_J2RE="$OTHER/images/j2re-image"
echo "Selecting jdk images in other build" echo "Selecting jdk images for compare"
else
echo "No common images found."
exit 1
fi fi
if [ -d "$OTHER/j2sdk-bundle" ]; then if [ -d "$THIS/images/j2sdk-bundle" ] && [ -d "$OTHER/images/j2sdk-bundle" ]; then
OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle" THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle" THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
echo "Selecting bundles in other build"
elif [ -d "$OTHER/images/j2sdk-bundle" ]; then
OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle" OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle" OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
echo "Selecting jdk bundles in other build" echo "Also comparing macosx bundles"
fi fi
if [ -z "$THIS_J2SDK" ] || [ -z "$THIS_J2RE" ]; then if [ -d "$THIS/deploy" ] && [ -d "$OTHER/deploy" ]; then
if [ -z "$THIS_J2SDK_OVERLAY" ]; then THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/dist/installer/bundles"
echo "Cannot locate images for this build. Are you sure you have run 'make images'?" OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles"
exit 1 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
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!"
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!"
fi
if [ -d "$OTHER/images" ]; then if [ -d "$OTHER/images" ]; then
OTHER_SEC_DIR="$OTHER/images" OTHER_SEC_DIR="$OTHER/images"
else else
@ -1266,22 +1225,13 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN" THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
fi fi
if [ -d "$THIS/docs" ]; then if [ -d "$THIS/docs" ] && [ -d "$OTHER/docs" ]; then
THIS_DOCS="$THIS/docs" THIS_DOCS="$THIS/docs"
fi
if [ -d "$OTHER/docs" ]; then
OTHER_DOCS="$OTHER/docs" OTHER_DOCS="$OTHER/docs"
fi echo "Also comparing docs"
else
if [ -z "$THIS_DOCS" ]; then
echo "WARNING! Docs haven't been built and won't be compared." echo "WARNING! Docs haven't been built and won't be compared."
fi fi
if [ -z "$OTHER_DOCS" ]; then
echo "WARNING! Other build doesn't contain docs, skipping doc compare."
fi
fi fi
########################################################################################## ##########################################################################################
@ -1299,17 +1249,6 @@ if [ "$CMP_NAMES" = "true" ]; then
echo -n "J2RE " echo -n "J2RE "
compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi 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 if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle " echo -n "J2SDK Bundle "
compare_dirs $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle compare_dirs $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/j2sdk-bundle
@ -1331,6 +1270,12 @@ if [ "$CMP_NAMES" = "true" ]; then
compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
if [ "$CMP_PERMS" = "true" ]; then if [ "$CMP_PERMS" = "true" ]; then
@ -1340,21 +1285,13 @@ if [ "$CMP_PERMS" = "true" ]; then
echo -n "J2RE " echo -n "J2RE "
compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi 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 if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
if [ "$CMP_TYPES" = "true" ]; then if [ "$CMP_TYPES" = "true" ]; then
@ -1364,12 +1301,6 @@ if [ "$CMP_TYPES" = "true" ]; then
echo -n "J2RE " echo -n "J2RE "
compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi 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 if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle " echo -n "J2SDK Bundle "
compare_file_types $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/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 if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
if [ "$CMP_GENERAL" = "true" ]; then if [ "$CMP_GENERAL" = "true" ]; then
@ -1388,12 +1323,6 @@ if [ "$CMP_GENERAL" = "true" ]; then
echo -n "J2RE " echo -n "J2RE "
compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi 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 if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
echo -n "J2SDK Bundle " echo -n "J2SDK Bundle "
compare_general_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/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 if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
if [ "$CMP_ZIPS" = "true" ]; then if [ "$CMP_ZIPS" = "true" ]; then
@ -1434,6 +1367,12 @@ if [ "$CMP_ZIPS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; 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 compare_all_zip_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
if [ "$CMP_JARS" = "true" ]; then if [ "$CMP_JARS" = "true" ]; then
@ -1443,6 +1382,9 @@ if [ "$CMP_JARS" = "true" ]; then
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; 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 compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
if [ "$CMP_LIBS" = "true" ]; then if [ "$CMP_LIBS" = "true" ]; then
@ -1454,26 +1396,30 @@ if [ "$CMP_LIBS" = "true" ]; then
compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi fi
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 if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
if [ "$CMP_EXECS" = "true" ]; then if [ "$CMP_EXECS" = "true" ]; then
if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
echo -n "J2RE "
compare_all_execs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
fi 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
fi fi
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
fi 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 fi
echo echo

View File

@ -85,6 +85,7 @@ ACCEPTED_BIN_DIFF="
./bin/jdb ./bin/jdb
./bin/jhat ./bin/jhat
./bin/jinfo ./bin/jinfo
./bin/jjs
./bin/jmap ./bin/jmap
./bin/jps ./bin/jps
./bin/jrunscript ./bin/jrunscript
@ -108,6 +109,7 @@ ACCEPTED_BIN_DIFF="
./bin/wsimport ./bin/wsimport
./bin/xjc ./bin/xjc
./jre/bin/java ./jre/bin/java
./jre/bin/jjs
./jre/bin/keytool ./jre/bin/keytool
./jre/bin/orbd ./jre/bin/orbd
./jre/bin/pack200 ./jre/bin/pack200
@ -172,6 +174,7 @@ ACCEPTED_BIN_DIFF="
./bin/jdb ./bin/jdb
./bin/jhat ./bin/jhat
./bin/jinfo ./bin/jinfo
./bin/jjs
./bin/jmap ./bin/jmap
./bin/jps ./bin/jps
./bin/jrunscript ./bin/jrunscript
@ -195,6 +198,7 @@ ACCEPTED_BIN_DIFF="
./bin/wsimport ./bin/wsimport
./bin/xjc ./bin/xjc
./jre/bin/java ./jre/bin/java
./jre/bin/jjs
./jre/bin/keytool ./jre/bin/keytool
./jre/bin/orbd ./jre/bin/orbd
./jre/bin/pack200 ./jre/bin/pack200
@ -910,11 +914,6 @@ ACCEPTED_JARZIP_CONTENTS="
/META-INF/INDEX.LIST /META-INF/INDEX.LIST
" "
KNOWN_BIN_DIFF="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
"
ACCEPTED_BIN_DIFF=" ACCEPTED_BIN_DIFF="
./bin/appletviewer ./bin/appletviewer
./bin/idlj ./bin/idlj
@ -964,34 +963,82 @@ ACCEPTED_BIN_DIFF="
./jre/bin/tnameserv ./jre/bin/tnameserv
./jre/lib/libsaproc.dylib ./jre/lib/libsaproc.dylib
./jre/lib/server/libjvm.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/libsaproc.dylib
./lib/libsplashscreen.dylib
./lib/server/libjvm.dylib ./lib/server/libjvm.dylib
./lib/deploy/JavaControlPanel.prefPane/Contents/MacOS/JavaControlPanel ./lib/deploy/JavaControlPanel.prefPane/Contents/MacOS/JavaControlPanel
" "
KNOWN_SIZE_DIFF="
./jre/lib/libJObjC.dylib
./lib/libJObjC.dylib
"
SORT_SYMBOLS=" SORT_SYMBOLS="
./jre/lib/libJObjC.dylib ./Contents/Home/lib/libsaproc.dylib
./lib/libJObjC.dylib ./jre/lib/libsaproc.dylib
./lib/libsaproc.dylib
" "
KNOWN_SYM_DIFF=" ACCEPTED_SMALL_SIZE_DIFF="
./jre/lib/libJObjC.dylib ./bin/javaws
./lib/libJObjC.dylib ./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 fi

View File

@ -181,4 +181,3 @@ checkErrors
checkErrors checkErrors
exit 0 exit 0

View File

@ -200,4 +200,3 @@ do
printf "%s\n" "$line" >> $output printf "%s\n" "$line" >> $output
fi fi
done < "$input" done < "$input"

View File

@ -228,25 +228,26 @@ define ParseConfAndSpec
# If we only have global targets, no need to bother with SPEC or CONF # If we only have global targets, no need to bother with SPEC or CONF
ifneq ($$(origin SPEC),undefined) ifneq ($$(origin SPEC),undefined)
# We have been given a SPEC, check that it works out properly # 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) ifneq ($$(origin CONF),undefined)
# We also have a CONF argument. This is OK only if this is a repeated call by ourselves, # 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. # but complain if this is the top-level make call.
ifeq ($$(MAKELEVEL),0) 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)) $$(eval $$(call FatalError))
endif endif
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 # ... OK, we're satisfied, we'll use this SPEC later on
else else
# Find all spec.gmk files in the build output directory # Find all spec.gmk files in the build output directory
output_dir=$$(root_dir)/build output_dir=$$(root_dir)/build
all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk) all_spec_files=$$(wildcard $$(output_dir)/*/spec.gmk)
ifeq ($$(all_spec_files),) 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)) $$(eval $$(call FatalError))
endif endif
# Extract the configuration names from the path # 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)))) matching_confs=$$(strip $$(foreach var,$$(all_confs),$$(if $$(findstring $$(CONF),$$(var)),$$(var))))
endif endif
ifeq ($$(matching_confs),) ifeq ($$(matching_confs),)
$$(info No configurations found matching CONF=$$(CONF)) $$(info Error: No configurations found matching CONF=$$(CONF).)
$$(info Available configurations:) $$(info Available configurations in $$(output_dir):)
$$(foreach var,$$(all_confs),$$(info * $$(var))) $$(foreach var,$$(all_confs),$$(info * $$(var)))
$$(eval $$(call FatalError)) $$(eval $$(call FatalError))
else else
ifeq ($$(words $$(matching_confs)),1) ifeq ($$(words $$(matching_confs)),1)
$$(info Building '$$(matching_confs)' (matching CONF=$$(CONF))) $$(info Building '$$(matching_confs)' (matching CONF=$$(CONF)))
else 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))) $$(foreach var,$$(matching_confs),$$(info * $$(var)))
endif endif
endif endif
@ -280,10 +281,10 @@ define ParseConfAndSpec
else else
# No CONF or SPEC given, check the available configurations # No CONF or SPEC given, check the available configurations
ifneq ($$(words $$(all_spec_files)),1) ifneq ($$(words $$(all_spec_files)),1)
$$(info No CONF given, but more than one configuration found in $$(output_dir).) $$(info Error: No CONF given, but more than one configuration found.)
$$(info Available configurations:) $$(info Available configurations in $$(output_dir):)
$$(foreach var,$$(all_confs),$$(info * $$(var))) $$(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)) $$(eval $$(call FatalError))
endif endif

View File

@ -405,7 +405,7 @@ ifeq ($(OPENJDK_TARGET_OS),solaris)
# If the source and target parent directories are the same, recursive copy doesn't work # 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. # so we fall back on regular copy, which isn't preserving symlinks.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p '$(@D)'
$(RM) '$@' $(RM) '$@'
if [ "$(@D)" != "$(<D)" ]; then \ if [ "$(@D)" != "$(<D)" ]; then \
$(CP) -f -r -P '$<' '$(@D)'; \ $(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 # 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. # attributes when they are present, failing on this is avoided.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p '$(@D)'
$(CP) -fRP '$<' '$@' $(CP) -fRP '$<' '$@'
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
endef endef
@ -435,7 +435,7 @@ else
# Running mkdir and cp in the same shell speeds up copy intensive tasks in Cygwin # Running mkdir and cp in the same shell speeds up copy intensive tasks in Cygwin
# significantly. # significantly.
define install-file define install-file
$(MKDIR) -p $(@D) && $(CP) -fP '$<' '$@' $(MKDIR) -p '$(@D)' && $(CP) -fP '$<' '$@'
endef endef
endif endif

View File

@ -87,11 +87,9 @@ define SetupRMICompilationInner
$$($1_DEP_FILE): $$($1_CLASS_FILES) $$($1_DEP_FILE): $$($1_CLASS_FILES)
$(MKDIR) -p $$($1_STUB_CLASSES_DIR) $(MKDIR) -p $$($1_STUB_CLASSES_DIR)
if [ "x$$($1_ARGS)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
fi;
if [ "x$$($1_ARGS2)" != "x" ]; then \ if [ "x$$($1_ARGS2)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \

View File

@ -73,9 +73,9 @@ endef
# REPLACEMENTS one or more text replacement patterns, using the syntax: # REPLACEMENTS one or more text replacement patterns, using the syntax:
# PATTERN => REPLACEMENT_TEXT ; ... # PATTERN => REPLACEMENT_TEXT ; ...
# #
# At least one of INCLUDES or REPLACEMENTS must be present. If both are # If both INCLUDES or REPLACEMENTS are present, then the includes will be
# present, then the includes will be processed first, and replacements will be # processed first, and replacements will be done on the included fragments as well.
# done on the included fragments as well. # If neither is present, the files will just be copied without modifications.
# #
define SetupTextFileProcessing define SetupTextFileProcessing
$(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk)) $(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)) $(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)) $(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_FILES),)
ifneq ($$($1_SOURCE_DIRS),) ifneq ($$($1_SOURCE_DIRS),)
$$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1)) $$(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)) $$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1))
endif endif
else 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. # Find all files in the source trees. Sort to remove duplicates.
$$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \ $$(foreach src, $$($1_SOURCE_DIRS), $$(if $$(wildcard $$(src)), , \
$$(error SOURCE_DIRS contains missing directory $$(src) (in $1)))) $$(error SOURCE_DIRS contains missing directory $$(src) (in $1))))
@ -163,9 +162,9 @@ define SetupTextFileProcessingInner
# Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command # 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 '/' # line (-e "s/A/B/" -e "s/C/D/" ...), basically by replacing '=>' with '/'
# and ';' with '/" -e "s/', and adjusting for edge cases. # and ';' with '/" -e "s/', and adjusting for edge cases.
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e "s$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($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),//" \ -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)" -e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)'
else 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) $1_REPLACEMENTS_COMMAND_LINE := $(CAT)
@ -204,7 +203,7 @@ define SetupTextFileProcessingInner
# Note that $1 is space sensitive and must disobey whitespace rules # Note that $1 is space sensitive and must disobey whitespace rules
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$($1_SOURCE_FILES), \ $$(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 else
ifeq ($$($1_OUTPUT_DIR),) ifeq ($$($1_OUTPUT_DIR),)
$$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1)) $$(error Neither OUTPUT_FILE nor OUTPUT_DIR was specified (in $1))
@ -217,14 +216,15 @@ define SetupTextFileProcessingInner
# rules. # rules.
$$(foreach src, $$($1_SOURCE_FILES), \ $$(foreach src, $$($1_SOURCE_FILES), \
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \ $$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \
$$($1_OUTPUT_DIR), $$(notdir $$(src))))) $$(patsubst %/, %, $$($1_OUTPUT_DIR)), $$(notdir $$(src)))))
else else
# With a base dir, extract the relative portion of the path. Note that $1 # 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 # is space sensitive and must disobey whitespace rules, and so is the
# arguments to patsubst. # arguments to patsubst.
$$(foreach src, $$($1_SOURCE_FILES), \ $$(foreach src, $$($1_SOURCE_FILES), \
$$(eval $$(call SetupSingleTextFileForProcessing,$1, $$(src), \ $$(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
endif endif
endef endef

View File

@ -204,5 +204,3 @@ sub usage {
print "Examples:\n"; print "Examples:\n";
print " normalizer.pl -e c,cpp,h,hpp .\n"; print " normalizer.pl -e c,cpp,h,hpp .\n";
} }

View File

@ -196,4 +196,3 @@ fi
# Cleanup # Cleanup
rm -f -r ${tmp} rm -f -r ${tmp}
exit 0 exit 0