author | lana |
Tue, 05 Jun 2012 17:56:16 -0700 | |
changeset 12812 | 5119c8da8a8d |
parent 12258 | 6ec26f6cc53e |
child 12801 | 948f8ad66ee7 |
permissions | -rw-r--r-- |
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
#!/bin/bash |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
2 |
# |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# This code is free software; you can redistribute it and/or modify it |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# published by the Free Software Foundation. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# accompanied this code). |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# You should have received a copy of the GNU General Public License version |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# or visit www.oracle.com if you need additional information or have any |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# questions. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
# Simple tool to diff two shared libraries. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
26 |
# Criterias: two shared libraries are considered equal if: |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
27 |
# the file sizes are the same AND the symbols outputs from the nm command are equal |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
29 |
if [ $# -lt 2 ] |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
30 |
then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
echo "Diff two shared libs. Return codes:" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
echo "0 - no diff" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
33 |
echo "1 - Identical symbols AND size, BUT not bytewise identical" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
34 |
echo "2 - Identical symbols BUT NEW size" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
35 |
echo "3 - Differences, content BUT SAME size" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
36 |
echo "4 - Differences, content AND size" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
37 |
echo "10 - Could not perform diff" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
38 |
echo "Use 'quiet' to disable any output." |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
39 |
echo "Syntax: $0 file1 file2 [quiet]" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
40 |
exit 10 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
41 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
42 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
43 |
if [ ! -f $1 ] |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
44 |
then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
45 |
echo $1 does not exist |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
46 |
exit 10 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
47 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
48 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
49 |
if [ ! -f $2 ] |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
50 |
then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
51 |
echo $2 does not exist |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
52 |
exit 10 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
53 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
54 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
55 |
if [ "`uname`" == "SunOS" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
56 |
NM=gnm |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
57 |
STAT=gstat |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
58 |
elif [ $OSTYPE == "cygwin" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
59 |
NM="$VS100COMNTOOLS/../../VC/bin/amd64/dumpbin.exe" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
60 |
NM_ARGS=/exports |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
61 |
STAT=stat |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
62 |
else |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
63 |
NM=nm |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
64 |
STAT=stat |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
65 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
66 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
67 |
# Should the differences be viewed? |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
68 |
VIEW= |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
69 |
# You can do export DIFF=meld to view |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
70 |
# any differences using meld instead. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
71 |
if [ -n "$DIFF" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
72 |
DIFF="$DIFF" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
73 |
else |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
74 |
DIFF=diff |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
75 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
76 |
OLD=$(cd $(dirname $1) && pwd)/$(basename $1) |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
77 |
NEW=$(cd $(dirname $2) && pwd)/$(basename $2) |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
78 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
79 |
OLD_SIZE=$($STAT -c%s "$OLD") |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
80 |
NEW_SIZE=$($STAT -c%s "$NEW") |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
81 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
82 |
if [ $# -gt 3 ] |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
83 |
then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
84 |
ROOT1=$(cd $3 && pwd) |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
85 |
ROOT2=$(cd $4 && pwd) |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
86 |
OLD_NAME=$(echo $OLD | sed "s|$ROOT1/||") |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
87 |
NEW_NAME=$(echo $NEW | sed "s|$ROOT2/||") |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
88 |
if [ "x$5" == "xview" ]; then VIEW=view; fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
89 |
else |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
90 |
ROOT1=$(dirname $OLD)/ |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
91 |
ROOT2=$(dirname $NEW)/ |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
92 |
OLD_NAME=$OLD |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
93 |
NEW_NAME=$NEW |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
94 |
if [ "x$3" == "xview" ]; then VIEW=view; fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
95 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
96 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
97 |
OLD_SUFFIX="${OLD##*.}" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
98 |
NEW_SUFFIX="${NEW##*.}" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
99 |
if [ "$OLD_SUFFIX" != "$NEW_SUFFIX" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
100 |
echo The files do not have the same suffix type! |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
101 |
exit 10 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
102 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
103 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
104 |
if [ "$OLD_SUFFIX" != "so" ] && [ "$OLD_SUFFIX" != "dylib" ] && [ "$OLD_SUFFIX" != "dll" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
105 |
echo The files have to be .so, .dylib or .dll! They are $OLD_SUFFIX |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
106 |
exit 10 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
107 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
108 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
109 |
TYPE="$OLD_SUFFIX" |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
110 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
111 |
if cmp $OLD $NEW > /dev/null |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
112 |
then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
113 |
# The files were bytewise identical. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
114 |
echo Identical: $OLD_NAME |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
115 |
exit 0 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
116 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
117 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
118 |
OLD_SYMBOLS=$COMPARE_ROOT/$OLD_NAME.old |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
119 |
NEW_SYMBOLS=$COMPARE_ROOT/$NEW_NAME.new |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
120 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
121 |
mkdir -p $(dirname $OLD_SYMBOLS) |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
122 |
mkdir -p $(dirname $NEW_SYMBOLS) |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
123 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
124 |
if [ $OSTYPE == "cygwin" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
125 |
"$NM" $NM_ARGS $OLD | grep " = " > $OLD_SYMBOLS |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
126 |
"$NM" $NM_ARGS $NEW | grep " = " > $NEW_SYMBOLS |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
127 |
"$NM" $NM_ARGS $OLD > $OLD_SYMBOLS.full |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
128 |
"$NM" $NM_ARGS $NEW > $NEW_SYMBOLS.full |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
129 |
else |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
130 |
# Strip the addresses, just compare the ordering of the symbols. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
131 |
$NM $OLD | cut -f 2- -d ' ' > $OLD_SYMBOLS |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
132 |
$NM $NEW | cut -f 2- -d ' ' > $NEW_SYMBOLS |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
133 |
# But store the full information for easy diff access. |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
134 |
$NM $OLD > $OLD_SYMBOLS.full |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
135 |
$NM $NEW > $NEW_SYMBOLS.full |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
136 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
137 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
138 |
DIFFS=$(LANG=C diff $OLD_SYMBOLS $NEW_SYMBOLS) |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
139 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
140 |
RESULT=0 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
141 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
142 |
if [ -n "$DIFFS" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
143 |
if [ $OLD_SIZE -ne $NEW_SIZE ] |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
144 |
then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
145 |
echo Differences, content AND size : $OLD_NAME |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
146 |
RESULT=4 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
147 |
else |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
148 |
echo Differences, content BUT SAME size: $OLD_NAME |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
149 |
RESULT=3 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
150 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
151 |
if [ "x$VIEW" == "xview" ]; then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
152 |
LANG=C $DIFF $OLD_SYMBOLS $NEW_SYMBOLS |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
153 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
154 |
else |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
155 |
if [ $OLD_SIZE -ne $NEW_SIZE ] |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
156 |
then |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
157 |
echo Identical symbols BUT NEW size : $OLD_NAME |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
158 |
RESULT=2 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
159 |
else |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
160 |
echo Identical symbols AND size, BUT not bytewise identical: $OLD_NAME |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
161 |
RESULT=1 |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
162 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
163 |
fi |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
164 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
165 |
exit $RESULT |
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
166 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
167 |
|
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
168 |