compare.sh.in revision 1665:1e64ec3d1c60
1234370Sjasone#!/bin/bash 2234370Sjasone# 3234370Sjasone# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 4234370Sjasone# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5234370Sjasone# 6234370Sjasone# This code is free software; you can redistribute it and/or modify it 7234370Sjasone# under the terms of the GNU General Public License version 2 only, as 8234370Sjasone# published by the Free Software Foundation. 9234370Sjasone# 10234370Sjasone# This code is distributed in the hope that it will be useful, but WITHOUT 11234370Sjasone# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12234370Sjasone# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13234370Sjasone# version 2 for more details (a copy is included in the LICENSE file that 14234370Sjasone# accompanied this code). 15234370Sjasone# 16234370Sjasone# You should have received a copy of the GNU General Public License version 17234370Sjasone# 2 along with this work; if not, write to the Free Software Foundation, 18234370Sjasone# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19234370Sjasone# 20234370Sjasone# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21234370Sjasone# or visit www.oracle.com if you need additional information or have any 22234370Sjasone# questions. 23234370Sjasone# 24234370Sjasone 25234370Sjasone# This script is processed by configure before it's usable. It is run from 26234370Sjasone# the root of the build directory. 27234370Sjasone 28234370Sjasone 29234370Sjasone########################################################################################## 30234370Sjasone# Substitutions from autoconf 31234370Sjasone 32234370Sjasoneexport LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@ 33234370Sjasone 34234370Sjasoneexport OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@" 35234370Sjasoneexport OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@" 36234370Sjasone 37234370Sjasoneexport AWK="@AWK@" 38234370Sjasoneexport BASH="@BASH@" 39234370Sjasoneexport CAT="@CAT@" 40234370Sjasoneexport CMP="@CMP@" 41234370Sjasoneexport CP="@CP@" 42234543Sjasoneexport CUT="@CUT@" 43234543Sjasoneexport DIFF="@DIFF@" 44234370Sjasoneexport DUMPBIN="@FIXPATH@ @DUMPBIN@" 45234370Sjasoneexport EXPR="@EXPR@" 46234370Sjasoneexport FILE="@FILE@" 47234370Sjasoneexport FIND="@FIND@" 48234370Sjasoneexport GREP="@GREP@" 49234370Sjasoneexport JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@" 50234370Sjasoneexport JIMAGE="@FIXPATH@ @BUILD_OUTPUT@/jdk/bin/jimage" 51234402Sjasoneexport LDD="@LDD@" 52234402Sjasoneexport LN="@LN@" 53234402Sjasoneexport MKDIR="@MKDIR@" 54234370Sjasoneexport MV="@MV@" 55234370Sjasoneexport NAWK="@NAWK@" 56234370Sjasoneexport NM="@GNM@" 57234370Sjasoneexport OBJDUMP="@OBJDUMP@" 58234370Sjasoneexport OTOOL="@OTOOL@" 59234370Sjasoneexport PRINTF="@PRINTF@" 60234370Sjasoneexport READELF="@READELF@" 61234370Sjasoneexport RM="@RM@" 62234370Sjasoneexport SED="@SED@" 63234370Sjasoneexport SORT="@SORT@" 64234370Sjasoneexport STAT="@STAT@" 65234370Sjasoneexport STRIP="@STRIP@ @STRIPFLAGS@" 66234402Sjasoneexport TEE="@TEE@" 67234370Sjasoneexport UNIQ="@UNIQ@" 68234370Sjasoneexport UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200" 69234370Sjasoneexport UNZIP="@UNZIP@" 70234370Sjasone 71234370Sjasoneexport SRC_ROOT="@TOPDIR@" 72234370Sjasoneexport OUTPUT_ROOT="@OUTPUT_ROOT@" 73234370Sjasone 74234402Sjasoneif [ "$OPENJDK_TARGET_OS" = "windows" ]; then 75234370Sjasone export PATH="@VS_PATH@" 76234370Sjasonefi 77234370Sjasone 78234370Sjasone# Now locate the main script and run it. 79234370SjasoneREAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh" 80234370Sjasoneif [ ! -e "$REAL_COMPARE_SCRIPT" ]; then 81234370Sjasone echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT" 82234370Sjasone exit 1 83234370Sjasonefi 84234370Sjasone 85234370Sjasone# Rotate logs 86234370Sjasone$RM $OUTPUT_ROOT/compare.log.old 2> /dev/null 87234370Sjasone$MV $OUTPUT_ROOT/compare.log $OUTPUT_ROOT/compare.log.old 2> /dev/null 88234370Sjasone 89234370Sjasone$BASH $SRC_ROOT/common/bin/logger.sh $OUTPUT_ROOT/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@" 90234370Sjasone