author | jjiang |
Tue, 23 Apr 2019 10:08:52 +0800 | |
changeset 54588 | f203906d0dde |
parent 53570 | ab7fcc43dab4 |
permissions | -rw-r--r-- |
13697 | 1 |
#!/bin/bash |
2 |
# |
|
41458 | 3 |
# Copyright (c) 2012, 2016, 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 |
|
53110 | 34 |
export OPENJDK_BUILD_OS_ENV="@OPENJDK_BUILD_OS_ENV@" |
37651 | 35 |
export OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@" |
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
36 |
export OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@" |
37402 | 37 |
export DEBUG_LEVEL="@DEBUG_LEVEL@" |
13697 | 38 |
|
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
39 |
export AWK="@AWK@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
40 |
export BASH="@BASH@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
41 |
export CAT="@CAT@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
42 |
export CMP="@CMP@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
43 |
export CP="@CP@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
44 |
export CUT="@CUT@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
45 |
export DIFF="@DIFF@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
46 |
export DUMPBIN="@FIXPATH@ @DUMPBIN@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
47 |
export EXPR="@EXPR@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
48 |
export FILE="@FILE@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
49 |
export FIND="@FIND@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
50 |
export GREP="@GREP@" |
37972 | 51 |
export GUNZIP="@GUNZIP@" |
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
52 |
export LDD="@LDD@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
53 |
export LN="@LN@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
54 |
export MKDIR="@MKDIR@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
55 |
export MV="@MV@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
56 |
export NAWK="@NAWK@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
57 |
export NM="@GNM@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
58 |
export OBJDUMP="@OBJDUMP@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
59 |
export OTOOL="@OTOOL@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
60 |
export PRINTF="@PRINTF@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
61 |
export READELF="@READELF@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
62 |
export RM="@RM@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
63 |
export SED="@SED@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
64 |
export SORT="@SORT@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
65 |
export STAT="@STAT@" |
32812 | 66 |
export STRIP="@STRIP@ @STRIPFLAGS@" |
37972 | 67 |
export TAR="@TAR@" |
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
68 |
export TEE="@TEE@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
69 |
export UNIQ="@UNIQ@" |
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
70 |
export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200" |
37972 | 71 |
export UNARCHIVE="@UNZIP@ -q -o" |
13697 | 72 |
|
47252 | 73 |
export TOPDIR="@TOPDIR@" |
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47252
diff
changeset
|
74 |
export OUTPUTDIR="@OUTPUTDIR@" |
13697 | 75 |
|
36789 | 76 |
if [ "@COMPILE_TYPE@" != "cross" ]; then |
53110 | 77 |
export JAVAP="@FIXPATH@ $OUTPUTDIR/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@" |
78 |
export JIMAGE="@FIXPATH@ $OUTPUTDIR/jdk/bin/jimage" |
|
53570
ab7fcc43dab4
8217916: Build compare script is not comparing jmods
erikj
parents:
53110
diff
changeset
|
79 |
export JMOD="@FIXPATH@ $OUTPUTDIR/jdk/bin/jmod" |
36789 | 80 |
elif [ "@CREATE_BUILDJDK@" = "true" ]; then |
53110 | 81 |
export JAVAP="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@" |
82 |
export JIMAGE="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jimage" |
|
53570
ab7fcc43dab4
8217916: Build compare script is not comparing jmods
erikj
parents:
53110
diff
changeset
|
83 |
export JMOD="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jmod" |
36789 | 84 |
else |
53110 | 85 |
export JAVAP="@FIXPATH@ @BUILD_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@" |
86 |
export JIMAGE="@FIXPATH@ @BUILD_JDK@/bin/jimage" |
|
53570
ab7fcc43dab4
8217916: Build compare script is not comparing jmods
erikj
parents:
53110
diff
changeset
|
87 |
export JMOD="@FIXPATH@ @BUILD_JDK@/bin/jmod" |
36789 | 88 |
fi |
89 |
||
14111 | 90 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
53110 | 91 |
if [ "$OPENJDK_BUILD_OS_ENV" = "windows.wsl" ]; then |
92 |
export FIXPATH_PATH="@VS_PATH_WINDOWS@" |
|
93 |
export WSLENV="$WSLENV:FIXPATH_PATH:DEBUG_FIXPATH" |
|
94 |
else |
|
95 |
export PATH="@VS_PATH@" |
|
96 |
fi |
|
13697 | 97 |
fi |
98 |
||
14111 | 99 |
# Now locate the main script and run it. |
47252 | 100 |
REAL_COMPARE_SCRIPT="$TOPDIR/make/scripts/compare.sh" |
14111 | 101 |
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then |
20363 | 102 |
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT" |
103 |
exit 1 |
|
13697 | 104 |
fi |
105 |
||
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
106 |
# Rotate logs |
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47252
diff
changeset
|
107 |
$RM $OUTPUTDIR/compare.log.old 2> /dev/null |
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47252
diff
changeset
|
108 |
$MV $OUTPUTDIR/compare.log $OUTPUTDIR/compare.log.old 2> /dev/null |
32718
fadee4d0b5ec
8136813: Log compare.sh output automatically to file
ihse
parents:
27602
diff
changeset
|
109 |
|
33441
ce975712c050
8141439: Fix compare.sh -o <otherdir> (broken by JDK-8136813)
ihse
parents:
33031
diff
changeset
|
110 |
export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )" |
ce975712c050
8141439: Fix compare.sh -o <otherdir> (broken by JDK-8136813)
ihse
parents:
33031
diff
changeset
|
111 |
|
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47252
diff
changeset
|
112 |
$BASH $TOPDIR/make/scripts/logger.sh $OUTPUTDIR/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@" |