author | duke |
Wed, 05 Jul 2017 20:58:26 +0200 | |
changeset 33429 | 42c06db042ae |
parent 33031 | e208908e7d48 |
child 33441 | ce975712c050 |
permissions | -rw-r--r-- |
13697 | 1 |
#!/bin/bash |
2 |
# |
|
22722 | 3 |
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. |
13697 | 4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 |
# |
|
6 |
# This code is free software; you can redistribute it and/or modify it |
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
|
8 |
# published by the Free Software Foundation. |
|
9 |
# |
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
# accompanied this code). |
|
15 |
# |
|
16 |
# You should have received a copy of the GNU General Public License version |
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
# |
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
21 |
# or visit www.oracle.com if you need additional information or have any |
|
22 |
# questions. |
|
23 |
# |
|
24 |
||
20363 | 25 |
# This script is processed by configure before it's usable. It is run from |
13697 | 26 |
# the root of the build directory. |
27 |
||
28 |
||
29 |
########################################################################################## |
|
30 |
# Substitutions from autoconf |
|
31 |
||
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
32 |
export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@ |
13697 | 33 |
|
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
34 |
export OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
35 |
export OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@" |
13697 | 36 |
|
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
37 |
export AWK="@AWK@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
38 |
export BASH="@BASH@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
39 |
export CAT="@CAT@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
40 |
export CMP="@CMP@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
41 |
export CP="@CP@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
42 |
export CUT="@CUT@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
43 |
export DIFF="@DIFF@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
44 |
export DUMPBIN="@FIXPATH@ @DUMPBIN@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
45 |
export EXPR="@EXPR@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
46 |
export FILE="@FILE@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
47 |
export FIND="@FIND@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
48 |
export GREP="@GREP@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
49 |
export JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
50 |
export JIMAGE="@FIXPATH@ @BUILD_OUTPUT@/jdk/bin/jimage" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
51 |
export LDD="@LDD@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
52 |
export LN="@LN@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
53 |
export MKDIR="@MKDIR@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
54 |
export MV="@MV@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
55 |
export NAWK="@NAWK@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
56 |
export NM="@GNM@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
57 |
export OBJDUMP="@OBJDUMP@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
58 |
export OTOOL="@OTOOL@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
59 |
export PRINTF="@PRINTF@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
60 |
export READELF="@READELF@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
61 |
export RM="@RM@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
62 |
export SED="@SED@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
63 |
export SORT="@SORT@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
64 |
export STAT="@STAT@" |
32812 | 65 |
export STRIP="@STRIP@ @STRIPFLAGS@" |
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
66 |
export TEE="@TEE@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
67 |
export UNIQ="@UNIQ@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
68 |
export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200" |
33031
e208908e7d48
8139969: Fix unzip in compare.sh broken by JDK-8136813
ihse
parents:
32812
diff
changeset
|
69 |
export UNARCHIVE="@UNZIP@ -q" |
13697 | 70 |
|
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
71 |
export SRC_ROOT="@TOPDIR@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
72 |
export OUTPUT_ROOT="@OUTPUT_ROOT@" |
13697 | 73 |
|
14111 | 74 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
75 |
export PATH="@VS_PATH@" |
13697 | 76 |
fi |
77 |
||
14111 | 78 |
# Now locate the main script and run it. |
79 |
REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh" |
|
80 |
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then |
|
20363 | 81 |
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT" |
82 |
exit 1 |
|
13697 | 83 |
fi |
84 |
||
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
85 |
# Rotate logs |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
86 |
$RM $OUTPUT_ROOT/compare.log.old 2> /dev/null |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
87 |
$MV $OUTPUT_ROOT/compare.log $OUTPUT_ROOT/compare.log.old 2> /dev/null |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
88 |
|
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
89 |
$BASH $SRC_ROOT/common/bin/logger.sh $OUTPUT_ROOT/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@" |