common/bin/compare.sh
changeset 27595 cff167b3bfa2
parent 25854 98ce0879ab4c
child 27602 236555ddac42
--- a/common/bin/compare.sh	Mon Nov 24 14:44:10 2014 +0100
+++ b/common/bin/compare.sh	Thu Nov 27 15:41:56 2014 +0100
@@ -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 @@
     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 @@
                  -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 @@
         # 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 @@
 # 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 @@
     (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 @@
 
     (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 @@
         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 @@
         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 @@
     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 @@
     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 @@
     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 @@
 
     $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 @@
 
     $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 @@
     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 @@
         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 @@
     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 @@
                 SYM_MSG=" $SYM_MSG "
             fi
         else
-            SYM_MSG="($SYM_MSG)"            
+            SYM_MSG="($SYM_MSG)"
             DIFF_SYM=
         fi
     else
@@ -748,48 +754,48 @@
 
     # 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 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 @@
     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 @@
 $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 @@
             CMP_JARS=true
             CMP_LIBS=true
             CMP_EXECS=true
-            
+
             if [ -z "$FILTER" ]; then
                 FILTER="$GREP"
             fi
@@ -1136,17 +1147,8 @@
 
 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 @@
     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
+        OTHER_J2SDK="$OTHER/install/j2sdk-image"
+        OTHER_J2RE="$OTHER/install/j2re-image"
+        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"
-        echo "Selecting deploy images in this build"
-    elif [ -d "$THIS/images/j2sdk-image" ]; then
+        OTHER_J2SDK="$OTHER/deploy/j2sdk-image"
+        OTHER_J2RE="$OTHER/deploy/j2re-image"
+        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"
-        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
-        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
         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 @@
         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 @@
         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 @@
         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 @@
         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 @@
         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 [ -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 @@
         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 [ -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 [ -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 [ -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 @@
             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