compare.sh.in revision 1729:1ad0a683c83d
1169092Sdeischen#!/bin/bash 2169092Sdeischen# 3169092Sdeischen# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. 4157263Sdeischen# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5157263Sdeischen# 6157263Sdeischen# This code is free software; you can redistribute it and/or modify it 7157263Sdeischen# under the terms of the GNU General Public License version 2 only, as 8157263Sdeischen# published by the Free Software Foundation. 9157263Sdeischen# 10157263Sdeischen# This code is distributed in the hope that it will be useful, but WITHOUT 11157263Sdeischen# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12157263Sdeischen# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13157263Sdeischen# version 2 for more details (a copy is included in the LICENSE file that 14157263Sdeischen# accompanied this code). 15157263Sdeischen# 16157263Sdeischen# You should have received a copy of the GNU General Public License version 17157263Sdeischen# 2 along with this work; if not, write to the Free Software Foundation, 18157263Sdeischen# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 19157263Sdeischen# 20157263Sdeischen# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 21157263Sdeischen# or visit www.oracle.com if you need additional information or have any 22157263Sdeischen# questions. 23157263Sdeischen# 24169092Sdeischen 25169092Sdeischen# This script is processed by configure before it's usable. It is run from 26169092Sdeischen# the root of the build directory. 27169092Sdeischen 28157263Sdeischen 29157263Sdeischen########################################################################################## 30157263Sdeischen# Substitutions from autoconf 31169092Sdeischen 32157263Sdeischenexport LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@ 33157263Sdeischen 34157263Sdeischenexport OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@" 35209689Skibexport OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@" 36209689Skib 37209689Skibexport AWK="@AWK@" 38209689Skibexport BASH="@BASH@" 39export CAT="@CAT@" 40export CMP="@CMP@" 41export CP="@CP@" 42export CUT="@CUT@" 43export DIFF="@DIFF@" 44export DUMPBIN="@FIXPATH@ @DUMPBIN@" 45export EXPR="@EXPR@" 46export FILE="@FILE@" 47export FIND="@FIND@" 48export GREP="@GREP@" 49export JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@" 50export JIMAGE="@FIXPATH@ @BUILD_OUTPUT@/jdk/bin/jimage" 51export LDD="@LDD@" 52export LN="@LN@" 53export MKDIR="@MKDIR@" 54export MV="@MV@" 55export NAWK="@NAWK@" 56export NM="@GNM@" 57export OBJDUMP="@OBJDUMP@" 58export OTOOL="@OTOOL@" 59export PRINTF="@PRINTF@" 60export READELF="@READELF@" 61export RM="@RM@" 62export SED="@SED@" 63export SORT="@SORT@" 64export STAT="@STAT@" 65export STRIP="@STRIP@ @STRIPFLAGS@" 66export TEE="@TEE@" 67export UNIQ="@UNIQ@" 68export UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200" 69export UNARCHIVE="@UNZIP@ -q" 70 71export SRC_ROOT="@TOPDIR@" 72export OUTPUT_ROOT="@OUTPUT_ROOT@" 73 74if [ "$OPENJDK_TARGET_OS" = "windows" ]; then 75 export PATH="@VS_PATH@" 76fi 77 78# Now locate the main script and run it. 79REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh" 80if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then 81 echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT" 82 exit 1 83fi 84 85# Rotate logs 86$RM $OUTPUT_ROOT/compare.log.old 2> /dev/null 87$MV $OUTPUT_ROOT/compare.log $OUTPUT_ROOT/compare.log.old 2> /dev/null 88 89export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )" 90 91$BASH $SRC_ROOT/common/bin/logger.sh $OUTPUT_ROOT/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@" 92