common/autoconf/compare.sh.in
author ohair
Tue, 18 Sep 2012 11:29:16 -0700
changeset 13697 5262b00bc10c
child 14111 2a82ecb35fc7
permissions -rw-r--r--
7197849: Update new build-infra makefiles Reviewed-by: ihse, erikj, ohrstrom, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#!/bin/bash
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     2
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# published by the Free Software Foundation.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# accompanied this code).
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
# You should have received a copy of the GNU General Public License version
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# or visit www.oracle.com if you need additional information or have any
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# questions.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
# This script is processed by configure before it's usable. It is run from 
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
# the root of the build directory.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    28
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    29
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    30
# Substitutions from autoconf
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    31
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    32
LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    34
OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    35
OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    36
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    37
AWK="@AWK@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    38
CAT="@CAT@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    39
CMP="@CMP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    40
CP="@CP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    41
CUT="@CUT@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    42
DIFF="@DIFF@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    43
DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    44
EXPR="@EXPR@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    45
FILE="@FILE@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    46
FIND="@FIND@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    47
GREP="@GREP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    48
JAVAP="@UNCYGDRIVE@ @BOOT_JDK@/bin/javap"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    49
LDD="@LDD@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    50
MKDIR="@MKDIR@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    51
NM="@NM@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    52
OBJDUMP="@OBJDUMP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    53
OTOOL="@OTOOL@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    54
PRINTF="@PRINTF@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    55
READELF="@READELF@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    56
RM="@RM@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    57
SED="@SED@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    58
SORT="@SORT@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    59
STRIP="@POST_STRIP_CMD@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    60
TEE="@TEE@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    61
UNIQ="@UNIQ@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    62
UNZIP="@UNZIP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    63
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    64
SRC_ROOT="@SRC_ROOT@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    65
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    66
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    67
    READELF_CMD="otool -v -V -h -X -t -d"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    68
elif [ -n "$READELF" ] && [ "$OPENJDK_TARGET_OS" != "windows" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    69
    READELF_CMD="$READELF -a"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    70
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    71
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    72
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    73
    LDD_CMD="$OTOOL -L"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    74
elif [ -n "$LDD" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    75
    LDD_CMD="$LDD"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    76
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    77
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    78
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    79
# Diff exceptions
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    80
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    81
if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    82
STRIP_BEFORE_COMPARE="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    83
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    84
./demo/jvmti/gctest/lib/libgctest.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    85
./demo/jvmti/heapTracker/lib/libheapTracker.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    86
./demo/jvmti/heapViewer/lib/libheapViewer.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    87
./demo/jvmti/hprof/lib/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    88
./demo/jvmti/minst/lib/libminst.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    89
./demo/jvmti/mtrace/lib/libmtrace.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    90
./demo/jvmti/versionCheck/lib/libversionCheck.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    91
./demo/jvmti/waiters/lib/libwaiters.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    92
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    93
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    94
KNOWN_BIN_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    95
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    96
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    97
ACCEPTED_BIN_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    98
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    99
./demo/jvmti/gctest/lib/libgctest.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   100
./demo/jvmti/heapTracker/lib/libheapTracker.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   101
./demo/jvmti/heapViewer/lib/libheapViewer.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   102
./demo/jvmti/hprof/lib/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   103
./demo/jvmti/minst/lib/libminst.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   104
./demo/jvmti/mtrace/lib/libmtrace.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   105
./demo/jvmti/versionCheck/lib/libversionCheck.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   106
./demo/jvmti/waiters/lib/libwaiters.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   107
./jre/lib/amd64/libattach.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   108
./jre/lib/amd64/libdt_socket.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   109
./jre/lib/amd64/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   110
./jre/lib/amd64/libinstrument.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   111
./jre/lib/amd64/libjava_crw_demo.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   112
./jre/lib/amd64/libjsdt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   113
./jre/lib/amd64/libjsig.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   114
./jre/lib/amd64/libmanagement.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   115
./jre/lib/amd64/libnpt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   116
./jre/lib/amd64/libsaproc.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   117
./jre/lib/amd64/libverify.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   118
./jre/lib/amd64/server/libjsig.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   119
./jre/lib/amd64/server/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   120
./bin/appletviewer
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   121
./bin/extcheck
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   122
./bin/idlj
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   123
./bin/jar
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   124
./bin/jarsigner
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   125
./bin/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   126
./bin/javac
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   127
./bin/javadoc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   128
./bin/javah
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   129
./bin/javap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   130
./bin/jcmd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   131
./bin/jconsole
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   132
./bin/jdb
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   133
./bin/jhat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   134
./bin/jinfo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   135
./bin/jmap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   136
./bin/jps
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   137
./bin/jrunscript
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   138
./bin/jsadebugd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   139
./bin/jstack
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   140
./bin/jstat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   141
./bin/jstatd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   142
./bin/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   143
./bin/native2ascii
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   144
./bin/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   145
./bin/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   146
./bin/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   147
./bin/rmic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   148
./bin/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   149
./bin/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   150
./bin/schemagen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   151
./bin/serialver
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   152
./bin/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   153
./bin/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   154
./bin/wsgen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   155
./bin/wsimport
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   156
./bin/xjc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   157
./jre/bin/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   158
./jre/bin/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   159
./jre/bin/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   160
./jre/bin/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   161
./jre/bin/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   162
./jre/bin/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   163
./jre/bin/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   164
./jre/bin/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   165
./jre/bin/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   166
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   167
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   168
KNOWN_SIZE_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   169
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   170
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   171
KNOWN_SYM_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   172
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   173
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   174
KNOWN_ELF_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   175
./demo/jvmti/heapTracker/lib/libheapTracker.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   176
./demo/jvmti/hprof/lib/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   177
./demo/jvmti/waiters/lib/libwaiters.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   178
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   179
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   180
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   181
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   182
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   183
STRIP_BEFORE_COMPARE="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   184
./demo/jni/Poller/lib/libPoller.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   185
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   186
./demo/jvmti/gctest/lib/libgctest.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   187
./demo/jvmti/heapTracker/lib/libheapTracker.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   188
./demo/jvmti/heapViewer/lib/libheapViewer.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   189
./demo/jvmti/hprof/lib/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   190
./demo/jvmti/minst/lib/libminst.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   191
./demo/jvmti/mtrace/lib/libmtrace.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   192
./demo/jvmti/versionCheck/lib/libversionCheck.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   193
./demo/jvmti/waiters/lib/libwaiters.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   194
./jre/lib/i386/jexec
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   195
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   196
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   197
SORT_SYMBOLS="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   198
./jre/lib/i386/client/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   199
./jre/lib/i386/server/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   200
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   201
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   202
SKIP_BIN_DIFF="true"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   203
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   204
ACCEPTED_SMALL_SIZE_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   205
./demo/jni/Poller/lib/libPoller.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   206
./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   207
./demo/jvmti/gctest/lib/libgctest.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   208
./demo/jvmti/heapTracker/lib/libheapTracker.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   209
./demo/jvmti/heapViewer/lib/libheapViewer.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   210
./demo/jvmti/hprof/lib/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   211
./demo/jvmti/minst/lib/libminst.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   212
./demo/jvmti/mtrace/lib/libmtrace.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   213
./demo/jvmti/versionCheck/lib/libversionCheck.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   214
./demo/jvmti/waiters/lib/libwaiters.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   215
./jre/lib/i386/client/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   216
./jre/lib/i386/jli/libjli.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   217
./jre/lib/i386/libJdbcOdbc.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   218
./jre/lib/i386/libattach.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   219
./jre/lib/i386/libawt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   220
./jre/lib/i386/libawt_headless.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   221
./jre/lib/i386/libawt_xawt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   222
./jre/lib/i386/libdcpr.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   223
./jre/lib/i386/libdt_socket.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   224
./jre/lib/i386/libfontmanager.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   225
./jre/lib/i386/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   226
./jre/lib/i386/libinstrument.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   227
./jre/lib/i386/libj2gss.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   228
./jre/lib/i386/libj2pcsc.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   229
./jre/lib/i386/libj2pkcs11.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   230
./jre/lib/i386/libj2ucrypto.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   231
./jre/lib/i386/libjaas_unix.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   232
./jre/lib/i386/libjava.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   233
./jre/lib/i386/libjava_crw_demo.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   234
./jre/lib/i386/libjawt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   235
./jre/lib/i386/libjdwp.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   236
./jre/lib/i386/libjfr.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   237
./jre/lib/i386/libjpeg.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   238
./jre/lib/i386/libjsdt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   239
./jre/lib/i386/libjsound.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   240
./jre/lib/i386/libkcms.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   241
./jre/lib/i386/libmanagement.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   242
./jre/lib/i386/libmlib_image.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   243
./jre/lib/i386/libnet.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   244
./jre/lib/i386/libnio.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   245
./jre/lib/i386/libnpt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   246
./jre/lib/i386/libsctp.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   247
./jre/lib/i386/libsplashscreen.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   248
./jre/lib/i386/libsunec.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   249
./jre/lib/i386/libsunwjdga.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   250
./jre/lib/i386/libt2k.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   251
./jre/lib/i386/libunpack.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   252
./jre/lib/i386/libverify.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   253
./jre/lib/i386/libzip.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   254
./jre/lib/i386/server/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   255
./bin/appletviewer
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   256
./bin/extcheck
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   257
./bin/idlj
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   258
./bin/jar
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   259
./bin/jarsigner
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   260
./bin/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   261
./bin/javac
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   262
./bin/javadoc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   263
./bin/javah
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   264
./bin/javap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   265
./bin/jcmd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   266
./bin/jconsole
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   267
./bin/jdb
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   268
./bin/jhat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   269
./bin/jinfo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   270
./bin/jmap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   271
./bin/jps
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   272
./bin/jrunscript
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   273
./bin/jsadebugd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   274
./bin/jstack
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   275
./bin/jstat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   276
./bin/jstatd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   277
./bin/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   278
./bin/native2ascii
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   279
./bin/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   280
./bin/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   281
./bin/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   282
./bin/rmic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   283
./bin/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   284
./bin/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   285
./bin/schemagen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   286
./bin/serialver
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   287
./bin/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   288
./bin/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   289
./bin/unpack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   290
./bin/wsgen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   291
./bin/wsimport
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   292
./bin/xjc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   293
./jre/bin/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   294
./jre/bin/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   295
./jre/bin/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   296
./jre/bin/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   297
./jre/bin/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   298
./jre/bin/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   299
./jre/bin/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   300
./jre/bin/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   301
./jre/bin/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   302
./jre/bin/unpack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   303
./jre/lib/i386/jexec
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   304
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   305
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   306
SKIP_ELF_DIFF="true"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   307
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   308
# libjvm.so differs in the random 15 char prefix on some symbols.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   309
ACCEPTED_DIS_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   310
./jre/lib/i386/client/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   311
./jre/lib/i386/server/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   312
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   313
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   314
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   315
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   316
if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   317
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   318
STRIP_BEFORE_COMPARE="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   319
./demo/jni/Poller/lib/amd64/libPoller.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   320
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   321
./demo/jvmti/gctest/lib/amd64/libgctest.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   322
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   323
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   324
./demo/jvmti/hprof/lib/amd64/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   325
./demo/jvmti/minst/lib/amd64/libminst.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   326
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   327
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   328
./demo/jvmti/waiters/lib/amd64/libwaiters.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   329
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   330
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   331
SORT_SYMBOLS="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   332
./jre/lib/amd64/server/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   333
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   334
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   335
SKIP_BIN_DIFF="true"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   336
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   337
ACCEPTED_SMALL_SIZE_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   338
./demo/jni/Poller/lib/amd64/libPoller.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   339
./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   340
./demo/jvmti/gctest/lib/amd64/libgctest.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   341
./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   342
./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   343
./demo/jvmti/hprof/lib/amd64/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   344
./demo/jvmti/minst/lib/amd64/libminst.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   345
./demo/jvmti/mtrace/lib/amd64/libmtrace.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   346
./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   347
./demo/jvmti/waiters/lib/amd64/libwaiters.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   348
./jre/lib/amd64/jli/libjli.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   349
./jre/lib/amd64/libJdbcOdbc.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   350
./jre/lib/amd64/libattach.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   351
./jre/lib/amd64/libawt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   352
./jre/lib/amd64/libawt_headless.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   353
./jre/lib/amd64/libawt_xawt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   354
./jre/lib/amd64/libdcpr.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   355
./jre/lib/amd64/libdt_socket.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   356
./jre/lib/amd64/libfontmanager.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   357
./jre/lib/amd64/libhprof.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   358
./jre/lib/amd64/libinstrument.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   359
./jre/lib/amd64/libj2gss.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   360
./jre/lib/amd64/libj2pcsc.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   361
./jre/lib/amd64/libj2pkcs11.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   362
./jre/lib/amd64/libj2ucrypto.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   363
./jre/lib/amd64/libjaas_unix.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   364
./jre/lib/amd64/libjava.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   365
./jre/lib/amd64/libjava_crw_demo.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   366
./jre/lib/amd64/libjawt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   367
./jre/lib/amd64/libjdwp.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   368
./jre/lib/amd64/libjfr.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   369
./jre/lib/amd64/libjpeg.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   370
./jre/lib/amd64/libjsdt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   371
./jre/lib/amd64/libjsound.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   372
./jre/lib/amd64/libkcms.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   373
./jre/lib/amd64/libmanagement.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   374
./jre/lib/amd64/libmlib_image.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   375
./jre/lib/amd64/libnet.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   376
./jre/lib/amd64/libnio.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   377
./jre/lib/amd64/libnpt.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   378
./jre/lib/amd64/libsctp.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   379
./jre/lib/amd64/libsplashscreen.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   380
./jre/lib/amd64/libsunec.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   381
./jre/lib/amd64/libsunwjdga.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   382
./jre/lib/amd64/libt2k.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   383
./jre/lib/amd64/libunpack.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   384
./jre/lib/amd64/libverify.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   385
./jre/lib/amd64/libzip.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   386
./jre/lib/amd64/server/64/libjvm_db.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   387
./jre/lib/amd64/server/64/libjvm_dtrace.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   388
./bin/amd64/appletviewer
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   389
./bin/amd64/extcheck
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   390
./bin/amd64/idlj
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   391
./bin/amd64/jar
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   392
./bin/amd64/jarsigner
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   393
./bin/amd64/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   394
./bin/amd64/javac
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   395
./bin/amd64/javadoc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   396
./bin/amd64/javah
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   397
./bin/amd64/javap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   398
./bin/amd64/jcmd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   399
./bin/amd64/jconsole
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   400
./bin/amd64/jdb
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   401
./bin/amd64/jhat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   402
./bin/amd64/jinfo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   403
./bin/amd64/jmap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   404
./bin/amd64/jps
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   405
./bin/amd64/jrunscript
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   406
./bin/amd64/jsadebugd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   407
./bin/amd64/jstack
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   408
./bin/amd64/jstat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   409
./bin/amd64/jstatd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   410
./bin/amd64/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   411
./bin/amd64/native2ascii
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   412
./bin/amd64/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   413
./bin/amd64/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   414
./bin/amd64/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   415
./bin/amd64/rmic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   416
./bin/amd64/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   417
./bin/amd64/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   418
./bin/amd64/schemagen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   419
./bin/amd64/serialver
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   420
./bin/amd64/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   421
./bin/amd64/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   422
./bin/amd64/unpack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   423
./bin/amd64/wsgen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   424
./bin/amd64/wsimport
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   425
./bin/amd64/xjc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   426
./jre/bin/amd64/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   427
./jre/bin/amd64/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   428
./jre/bin/amd64/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   429
./jre/bin/amd64/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   430
./jre/bin/amd64/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   431
./jre/bin/amd64/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   432
./jre/bin/amd64/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   433
./jre/bin/amd64/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   434
./jre/bin/amd64/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   435
./jre/bin/amd64/unpack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   436
./jre/lib/amd64/jexec
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   437
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   438
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   439
SKIP_ELF_DIFF="true"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   440
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   441
# Can't find an explaination for the diff in libmlib_image.so.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   442
KNOWN_DIS_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   443
./jre/lib/amd64/libmlib_image.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   444
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   445
# libjvm.so differs in the random 15 char prefix on some symbols.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   446
ACCEPTED_DIS_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   447
./jre/lib/amd64/server/libjvm.so
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   448
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   449
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   450
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   451
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   452
if [ "$OPENJDK_TARGET_OS" = "windows" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   453
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   454
ACCEPTED_BIN_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   455
./bin/jli.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   456
./demo/jvmti/compiledMethodLoad/lib/compiledMethodLoad.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   457
./demo/jvmti/gctest/lib/gctest.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   458
./demo/jvmti/heapTracker/lib/heapTracker.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   459
./demo/jvmti/heapViewer/lib/heapViewer.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   460
./demo/jvmti/hprof/lib/hprof.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   461
./demo/jvmti/minst/lib/minst.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   462
./demo/jvmti/mtrace/lib/mtrace.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   463
./demo/jvmti/versionCheck/lib/versionCheck.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   464
./demo/jvmti/waiters/lib/waiters.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   465
./jre/bin/attach.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   466
./jre/bin/awt.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   467
./jre/bin/dcpr.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   468
./jre/bin/dt_shmem.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   469
./jre/bin/dt_socket.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   470
./jre/bin/fontmanager.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   471
./jre/bin/hprof.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   472
./jre/bin/instrument.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   473
./jre/bin/j2pcsc.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   474
./jre/bin/j2pkcs11.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   475
./jre/bin/jaas_nt.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   476
./jre/bin/java.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   477
./jre/bin/java_crw_demo.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   478
./jre/bin/jawt.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   479
./jre/bin/JdbcOdbc.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   480
./jre/bin/jdwp.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   481
./jre/bin/jfr.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   482
./jre/bin/jli.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   483
./jre/bin/jpeg.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   484
./jre/bin/jsdt.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   485
./jre/bin/jsound.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   486
./jre/bin/jsoundds.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   487
./jre/bin/kcms.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   488
./jre/bin/management.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   489
./jre/bin/mlib_image.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   490
./jre/bin/net.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   491
./jre/bin/nio.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   492
./jre/bin/npt.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   493
./jre/bin/sawindbg.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   494
./jre/bin/server/jvm.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   495
./jre/bin/splashscreen.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   496
./jre/bin/sunec.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   497
./jre/bin/sunmscapi.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   498
./jre/bin/t2k.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   499
./jre/bin/unpack.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   500
./jre/bin/verify.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   501
./jre/bin/w2k_lsa_auth.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   502
./jre/bin/zip.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   503
./bin/appletviewer.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   504
./bin/extcheck.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   505
./bin/idlj.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   506
./bin/jar.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   507
./bin/jarsigner.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   508
./bin/java.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   509
./bin/javac.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   510
./bin/javadoc.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   511
./bin/javah.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   512
./bin/javap.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   513
./bin/java-rmi.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   514
./bin/javaw.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   515
./bin/jcmd.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   516
./bin/jconsole.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   517
./bin/jdb.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   518
./bin/jhat.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   519
./bin/jinfo.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   520
./bin/jmap.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   521
./bin/jps.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   522
./bin/jrunscript.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   523
./bin/jsadebugd.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   524
./bin/jstack.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   525
./bin/jstat.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   526
./bin/jstatd.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   527
./bin/keytool.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   528
./bin/kinit.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   529
./bin/klist.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   530
./bin/ktab.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   531
./bin/native2ascii.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   532
./bin/orbd.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   533
./bin/pack200.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   534
./bin/policytool.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   535
./bin/rmic.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   536
./bin/rmid.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   537
./bin/rmiregistry.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   538
./bin/schemagen.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   539
./bin/serialver.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   540
./bin/servertool.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   541
./bin/tnameserv.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   542
./bin/unpack200.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   543
./bin/wsgen.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   544
./bin/wsimport.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   545
./bin/xjc.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   546
./jre/bin/java.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   547
./jre/bin/java-rmi.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   548
./jre/bin/javaw.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   549
./jre/bin/keytool.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   550
./jre/bin/kinit.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   551
./jre/bin/klist.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   552
./jre/bin/ktab.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   553
./jre/bin/orbd.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   554
./jre/bin/pack200.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   555
./jre/bin/policytool.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   556
./jre/bin/rmid.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   557
./jre/bin/rmiregistry.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   558
./jre/bin/servertool.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   559
./jre/bin/tnameserv.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   560
./jre/bin/unpack200.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   561
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   562
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   563
KNOWN_SIZE_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   564
./demo/jvmti/heapTracker/lib/heapTracker.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   565
./demo/jvmti/minst/lib/minst.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   566
./jre/bin/awt.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   567
./jre/bin/java_crw_demo.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   568
./bin/java.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   569
./bin/javaw.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   570
./bin/unpack200.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   571
./jre/bin/java.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   572
./jre/bin/javaw.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   573
./jre/bin/unpack200.exe
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   574
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   575
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   576
KNOWN_SYM_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   577
./jre/bin/awt.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   578
./jre/bin/java_crw_demo.dll
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   579
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   580
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   581
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   582
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   583
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   584
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   585
ACCEPTED_JARZIP_CONTENTS="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   586
/META-INF/INDEX.LIST
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   587
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   588
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   589
KNOWN_BIN_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   590
./jre/lib/libJObjC.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   591
./jre/lib/libsaproc.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   592
./jre/lib/server/libjvm.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   593
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   594
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   595
ACCEPTED_BIN_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   596
./bin/appletviewer
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   597
./bin/extcheck
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   598
./bin/idlj
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   599
./bin/jar
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   600
./bin/jarsigner
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   601
./bin/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   602
./bin/javac
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   603
./bin/javadoc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   604
./bin/javah
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   605
./bin/javap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   606
./bin/jcmd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   607
./bin/jconsole
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   608
./bin/jdb
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   609
./bin/jhat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   610
./bin/jinfo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   611
./bin/jmap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   612
./bin/jps
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   613
./bin/jrunscript
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   614
./bin/jsadebugd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   615
./bin/jstack
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   616
./bin/jstat
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   617
./bin/jstatd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   618
./bin/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   619
./bin/native2ascii
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   620
./bin/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   621
./bin/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   622
./bin/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   623
./bin/rmic
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   624
./bin/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   625
./bin/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   626
./bin/schemagen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   627
./bin/serialver
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   628
./bin/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   629
./bin/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   630
./bin/wsgen
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   631
./bin/wsimport
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   632
./bin/xjc
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   633
./jre/bin/java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   634
./jre/bin/keytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   635
./jre/bin/orbd
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   636
./jre/bin/pack200
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   637
./jre/bin/policytool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   638
./jre/bin/rmid
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   639
./jre/bin/rmiregistry
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   640
./jre/bin/servertool
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   641
./jre/bin/tnameserv
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   642
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   643
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   644
KNOWN_SIZE_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   645
./jre/lib/libJObjC.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   646
./jre/lib/server/libjvm.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   647
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   648
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   649
KNOWN_SYM_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   650
./jre/lib/libJObjC.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   651
./jre/lib/server/libjvm.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   652
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   653
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   654
KNOWN_ELF_DIFF="
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   655
./jre/lib/libJObjC.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   656
./jre/lib/server/libjvm.dylib
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   657
"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   658
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   659
SKIP_DIS_DIFF="true"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   660
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   661
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   662
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   663
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   664
# Compare text files and ignore specific differences:
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   665
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   666
#  * Timestamps in Java sources generated by idl2java
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   667
#  * Sorting order and cleanup style in .properties files
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   668
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   669
diff_text() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   670
    OTHER_FILE=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   671
    THIS_FILE=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   672
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   673
    SUFFIX="${THIS_FILE##*.}"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   674
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   675
    TMP=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   676
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   677
    if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   678
        TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   679
            $GREP '^[<>]' | \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   680
            $SED -e '/[<>] Ant-Version: Apache Ant .*/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   681
	         -e '/[<>] Created-By: .* (Oracle Corporation).*/d')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   682
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   683
    if test "x$SUFFIX" = "xjava"; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   684
        TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   685
            $GREP '^[<>]' | \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   686
            $SED -e '/[<>] \* from.*\.idl/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   687
                 -e '/[<>] \*.*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   688
                 -e '/[<>] \*.*[0-9]\{4\} [0-9][0-9]*:[0-9]\{2\}:[0-9]\{2\}.*/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   689
                 -e '/\/\/ Generated from input file.*/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   690
                 -e '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   691
                 -e '/\/\/ java GenerateCharacter.*/d')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   692
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   693
    # Ignore date strings in class files.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   694
    # On Macosx the system sources for generated java classes produce different output on 
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   695
    # consequtive invokations seemingly randomly.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   696
    # For example a method parameter randomly named "thePoint" or "aPoint". Ignore this.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   697
    if test "x$SUFFIX" = "xclass"; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   698
        $JAVAP -c -constants -l -p ${OTHER_FILE} >  ${OTHER_FILE}.javap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   699
        $JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   700
        TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   701
            $GREP '^[<>]' | \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   702
            $SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   703
	         -e '/[<>].*Point   Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   704
	         -e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   705
	         -e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   706
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   707
    if test "x$SUFFIX" = "xproperties"; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   708
        $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e  's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   709
            | $SED -f "$SRC_ROOT/common/bin/unicode2x.sed" \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   710
  	    | $SED -e '/^#/d' -e '/^$/d' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   711
            -e :a -e '/\\$/N; s/\\\n//; ta' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   712
  	    -e 's/^[ \t]*//;s/[ \t]*$//' \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   713
	    -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   714
        TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   715
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   716
    if test -n "$TMP"; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   717
        echo Files $OTHER_FILE and $THIS_FILE differ
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   718
        return 1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   719
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   720
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   721
    return 0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   722
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   723
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   724
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   725
# Compare directory structure
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   726
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   727
compare_dirs() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   728
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   729
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   730
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   731
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   732
    mkdir -p $WORK_DIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   733
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   734
    (cd $OTHER_DIR && $FIND . -type d | $SORT > $WORK_DIR/other_dirs)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   735
    (cd $THIS_DIR && $FIND . -type d | $SORT > $WORK_DIR/this_dirs)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   736
    
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   737
    echo -n Directory structure...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   738
    if $DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs > /dev/null; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   739
        echo Identical!
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   740
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   741
        echo Differences found.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   742
        REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   743
    # Differences in directories found.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   744
        ONLY_OTHER=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '<')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   745
        if [ "$ONLY_OTHER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   746
            echo Only in $OTHER
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   747
            echo $ONLY_OTHER | $SED 's|< ./|\t|g' | $SED 's/ /\n/g'
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   748
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   749
    # Differences in directories found.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   750
        ONLY_THIS=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '>')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   751
        if [ "$ONLY_THIS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   752
            echo Only in $THIS
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   753
            echo $ONLY_THIS | $SED 's|> ./|\t|g' | $SED 's/ /\n/g'
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   754
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   755
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   756
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   757
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   758
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   759
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   760
# Compare file structure
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   761
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   762
compare_files() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   763
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   764
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   765
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   766
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   767
    mkdir -p $WORK_DIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   768
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   769
    (cd $OTHER_DIR && $FIND . -type f | $SORT > $WORK_DIR/other_files)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   770
    (cd $THIS_DIR && $FIND . -type f | $SORT > $WORK_DIR/this_files)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   771
    
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   772
    echo -n File names...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   773
    if diff $WORK_DIR/other_files $WORK_DIR/this_files > /dev/null; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   774
        echo Identical!
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   775
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   776
        echo Differences found.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   777
        REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   778
    # Differences in directories found.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   779
        ONLY_OTHER=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '<')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   780
        if [ "$ONLY_OTHER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   781
            echo Only in $OTHER
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   782
            echo "$ONLY_OTHER" | sed 's|< ./|    |g'
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   783
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   784
    # Differences in directories found.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   785
        ONLY_THIS=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '>')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   786
        if [ "$ONLY_THIS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   787
            echo Only in $THIS
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   788
            echo "$ONLY_THIS" | sed 's|> ./|    |g'
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   789
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   790
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   791
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   792
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   793
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   794
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   795
# Compare permissions
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   796
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   797
compare_permissions() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   798
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   799
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   800
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   801
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   802
    mkdir -p $WORK_DIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   803
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   804
    echo -n Permissions...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   805
    found=""
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   806
    for f in `cd $OTHER_DIR && $FIND . -type f`
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   807
    do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   808
        if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   809
        if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   810
        OP=`ls -l ${OTHER_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   811
        TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'`
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   812
        if [ "$OP" != "$TP" ]
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   813
        then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   814
	    if [ -z "$found" ]; then echo ; found="yes"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   815
	    $PRINTF "\told: ${OP} new: ${TP}\t$f\n"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   816
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   817
    done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   818
    if [ -z "$found" ]; then 
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   819
        echo "Identical!"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   820
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   821
        REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   822
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   823
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   824
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   825
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   826
# Compare file command output
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   827
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   828
compare_file_types() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   829
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   830
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   831
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   832
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   833
    $MKDIR -p $WORK_DIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   834
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   835
    echo -n File types...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   836
    found=""
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   837
    for f in `cd $OTHER_DIR && $FIND . -type f`
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   838
    do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   839
        if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   840
        if [ ! -f ${THIS_DIR}/$f ]; then continue; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   841
        OF=`cd ${OTHER_DIR} && $FILE $f`
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   842
        TF=`cd ${THIS_DIR} && $FILE $f`
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   843
        if [ "$f" = "./src.zip" ] || [ "$f" = "./jre/lib/JObjC.jar" ] || [ "$f" = "./lib/JObjC.jar" ]
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   844
        then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   845
	    if [ "`echo $OF | $GREP -ic zip`" -gt 0 -a "`echo $TF | $GREP -ic zip`" -gt 0 ]
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   846
	    then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   847
	        # the way we produces zip-files make it so that directories are stored in old file
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   848
	        # but not in new (only files with full-path)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   849
	        # this makes file-5.09 report them as different
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   850
	        continue;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   851
	    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   852
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   853
        
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   854
        if [ "$OF" != "$TF" ]
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   855
        then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   856
	    if [ -z "$found" ]; then echo ; found="yes"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   857
	    $PRINTF "\tother: ${OF}\n\tthis : ${TF}\n"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   858
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   859
    done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   860
    if [ -z "$found" ]; then 
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   861
        echo "Identical!"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   862
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   863
        REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   864
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   865
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   866
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   867
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   868
# Compare the rest of the files
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   869
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   870
compare_general_files() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   871
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   872
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   873
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   874
    
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   875
    GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   876
        ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   877
        ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   878
        ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   879
        ! -name "*.lib" \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   880
        | $GREP -v "./bin/"  | $SORT | $FILTER)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   881
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   882
    echo General files...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   883
    for f in $GENERAL_FILES
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   884
    do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   885
        if [ -e $OTHER_DIR/$f ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   886
            DIFF_OUT=$($DIFF $OTHER_DIR/$f $THIS_DIR/$f 2>&1)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   887
            if [ -n "$DIFF_OUT" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   888
                echo $f
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   889
                REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   890
                if [ "$SHOW_DIFFS" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   891
                    echo "$DIFF_OUT"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   892
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   893
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   894
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   895
    done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   896
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   897
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   898
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   899
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   900
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   901
# Compare zip file
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   902
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   903
compare_zip_file() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   904
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   905
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   906
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   907
    ZIP_FILE=$4
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   908
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   909
    THIS_ZIP=$THIS_DIR/$ZIP_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   910
    OTHER_ZIP=$OTHER_DIR/$ZIP_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   911
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   912
    THIS_SUFFIX="${THIS_ZIP##*.}"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   913
    OTHER_SUFFIX="${OTHER_ZIP##*.}"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   914
    if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   915
        echo The files do not have the same suffix type!
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   916
        return 2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   917
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   918
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   919
    UNARCHIVE="$UNZIP -q"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   920
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   921
    TYPE="$THIS_SUFFIX"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   922
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   923
    if $CMP $OTHER_ZIP $THIS_ZIP > /dev/null
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   924
    then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   925
        return 0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   926
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   927
    # Not quite identical, the might still contain the same data.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   928
    # Unpack the jar/zip files in temp dirs
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   929
    
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   930
    THIS_UNZIPDIR=$WORK_DIR/$ZIP_FILE.this
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   931
    OTHER_UNZIPDIR=$WORK_DIR/$ZIP_FILE.other
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   932
    $RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   933
    $MKDIR -p $THIS_UNZIPDIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   934
    $MKDIR -p $OTHER_UNZIPDIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   935
    (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   936
    (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   937
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   938
    CONTENTS_DIFF_FILE=$WORK_DIR/$ZIP_FILE.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   939
    LANG=C $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   940
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   941
    ONLY_OTHER=$($GREP "^Only in $OTHER_UNZIPDIR" $CONTENTS_DIFF_FILE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   942
    ONLY_THIS=$($GREP "^Only in $THIS_UNZIPDIR" $CONTENTS_DIFF_FILE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   943
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   944
    return_value=0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   945
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   946
    if [ -n "$ONLY_OTHER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   947
        echo "        Only OTHER $ZIP_FILE contains:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   948
        echo "$ONLY_OTHER" | sed "s|Only in $OTHER_UNZIPDIR|            |"g | sed 's|: |/|g'
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   949
        return_value=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   950
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   951
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   952
    if [ -n "$ONLY_THIS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   953
        echo "        Only THIS $ZIP_FILE contains:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   954
        echo "$ONLY_THIS" | sed "s|Only in $THIS_UNZIPDIR|            |"g | sed 's|: |/|g'
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   955
        return_value=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   956
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   957
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   958
    DIFFING_FILES=$($GREP differ $CONTENTS_DIFF_FILE | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g")
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   959
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   960
    $RM -f $WORK_DIR/$ZIP_FILE.diffs
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   961
    for file in $DIFFING_FILES; do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   962
	if [[ "$ACCEPTED_JARZIP_CONTENTS" != *"$file"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   963
            diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   964
	fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   965
    done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   966
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   967
    if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   968
        return_value=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   969
        echo "        Differing files in $ZIP_FILE"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   970
        $CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP differ | cut -f 2 -d ' ' | \
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   971
            $SED "s|$OTHER_UNZIPDIR|            |g" > $WORK_DIR/$ZIP_FILE.difflist
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   972
        $CAT $WORK_DIR/$ZIP_FILE.difflist
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   973
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   974
        if [ -n "$SHOW_DIFFS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   975
            for i in $(cat $WORK_DIR/$ZIP_FILE.difflist) ; do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   976
                if [ -f "${OTHER_UNZIPDIR}/$i.javap" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   977
                    LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   978
                elif [ -f "${OTHER_UNZIPDIR}/$i.cleaned" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   979
                    LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   980
                else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   981
                    LANG=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   982
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   983
            done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   984
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   985
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   986
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   987
    return $return_value
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   988
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   989
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   990
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   991
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   992
# Compare all zip files
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   993
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   994
compare_all_zip_files() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   995
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   996
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   997
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   998
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
   999
    ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" | $SORT | $FILTER )
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1000
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1001
    if [ -n "$ZIPS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1002
        echo Zip files...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1003
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1004
        return_value=0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1005
        for f in $ZIPS; do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1006
            if [ -f "$OTHER_DIR/$f" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1007
                compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1008
                if [ "$?" != "0" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1009
                    return_value=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1010
                    REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1011
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1012
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1013
        done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1014
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1015
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1016
    return $return_value
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1017
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1018
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1019
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1020
# Compare all jar files
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1021
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1022
compare_all_jar_files() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1023
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1024
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1025
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1026
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1027
    # TODO filter?
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1028
    ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" | $SORT | $FILTER)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1029
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1030
    if [ -n "$ZIPS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1031
        echo Jar files...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1032
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1033
        return_value=0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1034
        for f in $ZIPS; do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1035
            if [ -f "$OTHER_DIR/$f" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1036
                compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1037
                if [ "$?" != "0" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1038
                    return_value=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1039
                    REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1040
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1041
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1042
        done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1043
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1044
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1045
    return $return_value
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1046
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1047
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1048
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1049
# Compare binary (executable/library) file
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1050
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1051
compare_bin_file() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1052
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1053
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1054
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1055
    BIN_FILE=$4
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1056
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1057
    THIS_FILE=$THIS_DIR/$BIN_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1058
    OTHER_FILE=$OTHER_DIR/$BIN_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1059
    NAME=$(basename $BIN_FILE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1060
    WORK_FILE_BASE=$WORK_DIR/$BIN_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1061
    FILE_WORK_DIR=$(dirname $WORK_FILE_BASE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1062
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1063
    $MKDIR -p $FILE_WORK_DIR
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1064
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1065
    ORIG_THIS_FILE="$THIS_FILE"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1066
    ORIG_OTHER_FILE="$OTHER_FILE"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1067
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1068
    if [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1069
        THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1070
        OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1071
        $MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1072
        $CP $THIS_FILE $THIS_STRIPPED_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1073
        $CP $OTHER_FILE $OTHER_STRIPPED_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1074
        $STRIP $THIS_STRIPPED_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1075
        $STRIP $OTHER_STRIPPED_FILE
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1076
        THIS_FILE="$THIS_STRIPPED_FILE"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1077
        OTHER_FILE="$OTHER_STRIPPED_FILE"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1078
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1079
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1080
    if [ -z "$SKIP_BIN_DIFF" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1081
        if cmp $OTHER_FILE $THIS_FILE > /dev/null; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1082
        # The files were bytewise identical.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1083
            if [ -n "$VERBOSE" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1084
                echo "        :           :         :         :          : $BIN_FILE"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1085
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1086
            return 0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1087
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1088
        BIN_MSG=" diff "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1089
        if [[ "$ACCEPTED_BIN_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1090
            DIFF_BIN=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1091
            if [[ "$KNOWN_BIN_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1092
                BIN_MSG="*$BIN_MSG*"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1093
                REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1094
            else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1095
                BIN_MSG=" $BIN_MSG "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1096
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1097
        else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1098
            BIN_MSG="($BIN_MSG)"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1099
            DIFF_BIN=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1100
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1101
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1102
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1103
    THIS_SIZE=$(ls -l "$THIS_FILE" | awk '{ print $5 }')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1104
    OTHER_SIZE=$(ls -l "$OTHER_FILE" | awk '{ print $5 }')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1105
    if [ $THIS_SIZE -ne $OTHER_SIZE ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1106
        DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1107
        DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1108
        SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1109
        if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] && [ "$DIFF_SIZE_REL" -lt 102 ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1110
            SIZE_MSG="($SIZE_MSG)"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1111
            DIFF_SIZE=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1112
        else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1113
            if [[ "$ACCEPTED_SIZE_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1114
                DIFF_SIZE=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1115
                if [[ "$KNOWN_SIZE_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1116
                    SIZE_MSG="*$SIZE_MSG*"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1117
                    REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1118
                else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1119
                    SIZE_MSG=" $SIZE_MSG "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1120
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1121
            else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1122
                SIZE_MSG="($SIZE_MSG)"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1123
                DIFF_SIZE=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1124
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1125
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1126
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1127
        SIZE_MSG="           "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1128
        DIFF_SIZE=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1129
        if [[ "$KNOWN_SIZE_DIFF $ACCEPTED_SIZE_DIFF" = *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1130
            SIZE_MSG="     !     "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1131
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1132
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1133
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1134
    if [[ "$SORT_SYMBOLS" = *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1135
        SYM_SORT_CMD="sort"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1136
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1137
        SYM_SORT_CMD="cat"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1138
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1139
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1140
    # Check symbols
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1141
    if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1142
	$DUMPBIN -exports $OTHER_FILE | $GREP " = " | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1143
	$DUMPBIN -exports $THIS_FILE  | $GREP " = " | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1144
    elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1145
        # Some symbols get seemingly random 15 character prefixes. Filter them out.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1146
        $NM -a $ORIG_OTHER_FILE | $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
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1147
	$NM -a $ORIG_THIS_FILE  | $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
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1148
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1149
	$NM -a $ORIG_OTHER_FILE | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1150
	$NM -a $ORIG_THIS_FILE  | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1151
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1152
    
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1153
    LANG=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1154
    if [ -s $WORK_FILE_BASE.symbols.diff ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1155
        SYM_MSG=" diff  "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1156
        if [[ "$ACCEPTED_SYM_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1157
            DIFF_SYM=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1158
            if [[ "$KNOWN_SYM_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1159
                SYM_MSG="*$SYM_MSG*"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1160
                REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1161
            else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1162
                SYM_MSG=" $SYM_MSG "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1163
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1164
        else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1165
            SYM_MSG="($SYM_MSG)"            
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1166
            DIFF_SYM=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1167
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1168
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1169
        SYM_MSG="         "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1170
        DIFF_SYM=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1171
        if [[ "$KNOWN_SYM_DIFF $ACCEPTED_SYM_DIFF" = *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1172
            SYM_MSG="    !    "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1173
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1174
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1175
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1176
    # Check dependencies
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1177
    if [ -n "$LDD_CMD" ];then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1178
	(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1179
	(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1180
	(cd $FILE_WORK_DIR && $RM -f $NAME)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1181
	
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1182
	LANG=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1183
	LANG=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1184
	
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1185
	if [ -s $WORK_FILE_BASE.deps.diff ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1186
            if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1187
		DEP_MSG=" diff  "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1188
            else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1189
		DEP_MSG=" redun "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1190
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1191
            if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1192
		DIFF_DEP=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1193
		if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1194
                    DEP_MSG="*$DEP_MSG*"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1195
                    REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1196
		else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1197
                    DEP_MSG=" $DEP_MSG "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1198
		fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1199
            else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1200
		DEP_MSG="($DEP_MSG)"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1201
		DIFF_DEP=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1202
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1203
	else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1204
	    DEP_MSG="         "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1205
	    DIFF_DEP=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1206
            if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1207
                DEP_MSG="     !      "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1208
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1209
	fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1210
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1211
    
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1212
    # Compare readelf output
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1213
    if [ -n "$READELF_CMD" ] && [ -z "$SKIP_ELF_DIFF" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1214
        $READELF_CMD $OTHER_FILE > $WORK_FILE_BASE.readelf.other 2>&1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1215
        $READELF_CMD $THIS_FILE > $WORK_FILE_BASE.readelf.this 2>&1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1216
        
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1217
        LANG=C $DIFF $WORK_FILE_BASE.readelf.other $WORK_FILE_BASE.readelf.this > $WORK_FILE_BASE.readelf.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1218
        
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1219
        if [ -s $WORK_FILE_BASE.readelf.diff ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1220
            ELF_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.readelf.diff | awk '{print $5}')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1221
            ELF_MSG=$($PRINTF "%8d" $ELF_DIFF_SIZE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1222
            if [[ "$ACCEPTED_ELF_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1223
                DIFF_ELF=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1224
                if [[ "$KNOWN_ELF_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1225
                    ELF_MSG="*$ELF_MSG*"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1226
                    REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1227
                else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1228
                    ELF_MSG=" $ELF_MSG "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1229
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1230
            else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1231
                ELF_MSG="($ELF_MSG)"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1232
                DIFF_ELF=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1233
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1234
        else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1235
            ELF_MSG="          "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1236
            DIFF_ELF=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1237
            if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1238
                ELF_MSG="    !    "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1239
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1240
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1241
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1242
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1243
    # Compare disassemble output
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1244
    if [ -f "$OBJDUMP" ] && [ -z "$SKIP_DIS_DIFF" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1245
        $OBJDUMP -d $OTHER_FILE | $GREP -v $NAME > $WORK_FILE_BASE.dis.other 2>&1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1246
        $OBJDUMP -d $THIS_FILE  | $GREP -v $NAME > $WORK_FILE_BASE.dis.this  2>&1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1247
        
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1248
        LANG=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1249
        
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1250
        if [ -s $WORK_FILE_BASE.dis.diff ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1251
            DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}')
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1252
            DIS_MSG=$($PRINTF "%8d" $DIS_DIFF_SIZE)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1253
            if [[ "$ACCEPTED_DIS_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1254
                DIFF_DIS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1255
                if [[ "$KNOWN_DIS_DIFF" != *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1256
                    DIS_MSG="*$DIS_MSG*"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1257
                    REGRESSIONS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1258
                else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1259
                    DIS_MSG=" $DIS_MSG "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1260
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1261
            else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1262
                DIS_MSG="($DIS_MSG)"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1263
                DIFF_DIS=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1264
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1265
        else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1266
            DIS_MSG="          "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1267
            DIFF_DIS=
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1268
            if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1269
                DIS_MSG="    !    "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1270
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1271
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1272
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1273
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1274
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1275
    if [ -n "$DIFF_BIN$DIFF_SIZE$DIFF_SYM$DIFF_DEP$DIFF_ELF$DIFF_DIS" ] || [ -n "$VERBOSE" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1276
        if [ -n "$BIN_MSG" ]; then echo -n "$BIN_MSG:"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1277
        if [ -n "$SIZE_MSG" ]; then echo -n "$SIZE_MSG:"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1278
        if [ -n "$SYM_MSG" ]; then echo -n "$SYM_MSG:"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1279
        if [ -n "$DEP_MSG" ]; then echo -n "$DEP_MSG:"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1280
        if [ -n "$ELF_MSG" ]; then echo -n "$ELF_MSG:"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1281
        if [ -n "$DIS_MSG" ]; then echo -n "$DIS_MSG:"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1282
        echo " $BIN_FILE"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1283
        if [ "$SHOW_DIFFS" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1284
            if [ -s "$WORK_FILE_BASE.symbols.diff" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1285
                echo "Symbols diff:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1286
                $CAT $WORK_FILE_BASE.symbols.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1287
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1288
            if [ -s "$WORK_FILE_BASE.deps.diff" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1289
                echo "Deps diff:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1290
                $CAT $WORK_FILE_BASE.deps.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1291
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1292
            if [ -s "$WORK_FILE_BASE.readelf.diff" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1293
                echo "Readelf diff:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1294
                $CAT $WORK_FILE_BASE.readelf.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1295
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1296
            if [ -s "$WORK_FILE_BASE.dis.diff" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1297
                echo "Disassembly diff:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1298
                $CAT $WORK_FILE_BASE.dis.diff
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1299
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1300
        fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1301
        return 1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1302
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1303
    return 0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1304
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1305
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1306
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1307
# Print binary diff header
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1308
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1309
print_binary_diff_header() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1310
    if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1311
    if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n "   Size    :"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1312
    if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1313
    if [ -z "$SKIP_DEP_DIFF" ]; then echo -n "  Deps   :"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1314
    if [ -z "$SKIP_ELF_DIFF" ]; then echo -n " Readelf  :"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1315
    if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass   :"; fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1316
    echo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1317
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1318
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1319
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1320
# Compare all libraries
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1321
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1322
compare_all_libs() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1323
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1324
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1325
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1326
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1327
    LIBS=$(cd $THIS_DIR && $FIND . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | $SORT | $FILTER)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1328
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1329
    if [ -n "$LIBS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1330
        echo Libraries...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1331
        print_binary_diff_header
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1332
        for l in $LIBS; do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1333
            if [ -f "$OTHER_DIR/$l" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1334
                compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1335
                if [ "$?" != "0" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1336
                    return_value=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1337
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1338
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1339
        done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1340
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1341
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1342
    return $return_value
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1343
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1344
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1345
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1346
# Compare all executables
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1347
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1348
compare_all_execs() {
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1349
    THIS_DIR=$1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1350
    OTHER_DIR=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1351
    WORK_DIR=$3
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1352
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1353
    if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1354
        EXECS=$(cd $THIS_DIR && $FIND . -type f -name '*.exe' | $SORT | $FILTER)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1355
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1356
        EXECS=$(cd $THIS_DIR && $FIND . -name db -prune -o -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.cgi' \) | $SORT | $FILTER)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1357
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1358
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1359
    if [ -n "$EXECS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1360
        echo Executables...
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1361
        print_binary_diff_header
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1362
        for e in $EXECS; do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1363
            if [ -f "$OTHER_DIR/$e" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1364
                compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $e
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1365
                if [ "$?" != "0" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1366
                    return_value=1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1367
                fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1368
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1369
        done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1370
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1371
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1372
    return $return_value
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1373
}
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1374
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1375
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1376
# Initiate configuration
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1377
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1378
COMPARE_ROOT=/tmp/cimages.$USER
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1379
$MKDIR -p $COMPARE_ROOT
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1380
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1381
    if [ "$(uname -o)" = "Cygwin" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1382
	COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1383
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1384
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1385
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1386
THIS="$( cd "$( dirname "$0" )" && pwd )"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1387
echo "$THIS"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1388
THIS_SCRIPT="$0"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1389
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1390
if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1" = "/?" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1391
    echo "bash ./compare.sh [OPTIONS] [FILTER]"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1392
    echo ""
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1393
    echo "-all                Compare all files in all known ways"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1394
    echo "-names              Compare the file names and directory structure"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1395
    echo "-perms              Compare the permission bits on all files and directories"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1396
    echo "-types              Compare the output of the file command on all files"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1397
    echo "-general            Compare the files not convered by the specialized comparisons"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1398
    echo "-zips               Compare the contents of all zip files"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1399
    echo "-jars               Compare the contents of all jar files"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1400
    echo "-libs               Compare all native libraries"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1401
    echo "-execs              Compare all executables"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1402
    echo "-v                  Verbose output, does not hide known differences"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1403
    echo "-vv                 More verbose output, shows diff output of all comparisons"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1404
    echo "-o [OTHER]          Compare with build in other directory. Will default to the old build directory"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1405
    echo ""
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1406
    echo "[FILTER]            List filenames in the image to compare, works for jars, zips, libs and execs"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1407
    echo "Example:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1408
    echo "bash ./common/bin/compareimages.sh CodePointIM.jar"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1409
    exit 10
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1410
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1411
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1412
CMP_NAMES=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1413
CMP_PERMS=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1414
CMP_TYPES=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1415
CMP_GENERAL=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1416
CMP_ZIPS=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1417
CMP_JARS=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1418
CMP_LIBS=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1419
CMP_EXECS=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1420
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1421
while [ -n "$1" ]; do
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1422
    case "$1" in
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1423
        -v)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1424
            VERBOSE=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1425
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1426
        -vv)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1427
            VERBOSE=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1428
            SHOW_DIFFS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1429
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1430
        -o)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1431
            OTHER=$2
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1432
            shift
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1433
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1434
        -all)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1435
            CMP_NAMES=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1436
            if [ "$OPENJDK_TARGET_OS" != "windows" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1437
                CMP_PERMS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1438
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1439
            CMP_TYPES=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1440
            CMP_GENERAL=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1441
            CMP_ZIPS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1442
            CMP_JARS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1443
            CMP_LIBS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1444
            CMP_EXECS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1445
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1446
        -names)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1447
            CMP_NAMES=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1448
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1449
        -perms)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1450
            CMP_PERMS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1451
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1452
        -types)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1453
            CMP_TYPES=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1454
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1455
        -general)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1456
            CMP_GENERAL=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1457
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1458
        -zips)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1459
            CMP_ZIPS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1460
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1461
        -jars)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1462
            CMP_JARS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1463
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1464
        -libs)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1465
            CMP_LIBS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1466
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1467
        -execs)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1468
            CMP_EXECS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1469
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1470
        *)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1471
            CMP_NAMES=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1472
            CMP_PERMS=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1473
            CMP_TYPES=false
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1474
            CMP_ZIPS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1475
            CMP_JARS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1476
            CMP_LIBS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1477
            CMP_EXECS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1478
            
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1479
            if [ -z "$FILTER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1480
                FILTER="$GREP"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1481
            fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1482
            FILTER="$FILTER -e $1"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1483
            ;;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1484
    esac
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1485
    shift
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1486
done
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1487
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1488
if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1489
    CMP_NAMES=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1490
    CMP_PERMS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1491
    CMP_TYPES=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1492
    CMP_GENERAL=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1493
    CMP_ZIPS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1494
    CMP_JARS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1495
    CMP_LIBS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1496
    CMP_EXECS=true
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1497
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1498
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1499
if [ -z "$FILTER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1500
    FILTER="$CAT"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1501
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1502
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1503
if [ -z "$OTHER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1504
    OTHER="$THIS/../$LEGACY_BUILD_DIR"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1505
    if [ -d "$OTHER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1506
        OTHER="$( cd "$OTHER" && pwd )"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1507
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1508
        echo "Default old build directory does not exist:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1509
        echo "$OTHER"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1510
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1511
    echo "Comparing to default old build:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1512
    echo "$OTHER"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1513
    echo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1514
else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1515
    echo "Comparing to:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1516
    echo "$OTHER"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1517
    echo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1518
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1519
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1520
if [ ! -d "$OTHER" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1521
    echo "Other build directory does not exist:"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1522
    echo "$OTHER"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1523
    exit 1;
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1524
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1525
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1526
# Figure out the layout of the new build. Which kinds of images have been produced
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1527
if [ -d "$THIS/images/j2sdk-image" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1528
    THIS_J2SDK="$THIS/images/j2sdk-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1529
    THIS_J2RE="$THIS/images/j2re-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1530
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1531
if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1532
    THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1533
    THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1534
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1535
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1536
# Figure out the layout of the other build (old or new, normal or overlay image)
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1537
if [ -d "$OTHER/j2sdk-image" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1538
    if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1539
        OTHER_J2SDK="$OTHER/j2sdk-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1540
        OTHER_J2RE="$OTHER/j2re-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1541
    else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1542
        OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1543
        OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1544
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1545
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1546
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1547
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1548
if [ -z "$OTHER_J2SDK" ] && [ -n "$OTHER_J2SDK_OVERLAY" ] && [ -z "$THIS_J2SDK_OVERLAY" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1549
    echo "OTHER build only has an overlay image while this build does not. Nothing to compare!"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1550
    exit 1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1551
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1552
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1553
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1554
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1555
# Do the work
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1556
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1557
if [ "$CMP_NAMES" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1558
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1559
        echo -n "J2SDK "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1560
        compare_dirs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1561
        echo -n "J2RE  "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1562
        compare_dirs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1563
        
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1564
        echo -n "J2SDK "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1565
        compare_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1566
        echo -n "J2RE  "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1567
        compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1568
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1569
    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1570
        echo -n "J2SDK Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1571
        compare_dirs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1572
        echo -n "J2RE  Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1573
        compare_dirs $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1574
        
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1575
        echo -n "J2SDK Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1576
        compare_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1577
        echo -n "J2RE  Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1578
        compare_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1579
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1580
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1581
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1582
if [ "$CMP_PERMS" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1583
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1584
        echo -n "J2SDK "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1585
        compare_permissions $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1586
        echo -n "J2RE  "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1587
        compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1588
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1589
    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1590
        echo -n "J2SDK Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1591
        compare_permissions $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1592
        echo -n "J2RE  Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1593
        compare_permissions $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1594
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1595
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1596
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1597
if [ "$CMP_TYPES" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1598
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1599
        echo -n "J2SDK "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1600
        compare_file_types $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1601
        echo -n "J2RE  "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1602
        compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1603
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1604
    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1605
        echo -n "J2SDK Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1606
        compare_file_types $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1607
        echo -n "J2RE  Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1608
        compare_file_types $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1609
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1610
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1611
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1612
if [ "$CMP_GENERAL" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1613
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1614
        echo -n "J2SDK "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1615
        compare_general_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1616
        echo -n "J2RE  "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1617
        compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1618
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1619
    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1620
        echo -n "J2SDK Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1621
        compare_general_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1622
        echo -n "J2RE  Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1623
        compare_general_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1624
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1625
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1626
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1627
if [ "$CMP_ZIPS" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1628
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1629
        compare_all_zip_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1630
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1631
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1632
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1633
if [ "$CMP_JARS" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1634
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1635
        compare_all_jar_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1636
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1637
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1638
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1639
if [ "$CMP_LIBS" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1640
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1641
        compare_all_libs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1642
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1643
    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1644
        echo -n "Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1645
        compare_all_libs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1646
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1647
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1648
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1649
if [ "$CMP_EXECS" = "true" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1650
    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1651
        compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1652
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1653
    if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1654
        echo -n "Overlay "
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1655
        compare_all_execs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1656
    fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1657
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1658
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1659
echo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1660
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1661
if [ -n "$REGRESSIONS" ]; then
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1662
    echo "REGRESSIONS FOUND!"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1663
    echo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1664
    exit 1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1665
else
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1666
    echo "No regressions found"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1667
    echo
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1668
    exit 0
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
  1669
fi