compare.sh.in revision 1664:c800f2919a1f
1#!/bin/bash
2#
3# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
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
25# This script is processed by configure before it's usable. It is run from
26# the root of the build directory.
27
28
29##########################################################################################
30# Substitutions from autoconf
31
32LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
33
34OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
35OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
36
37AWK="@AWK@"
38CAT="@CAT@"
39CMP="@CMP@"
40CP="@CP@"
41CUT="@CUT@"
42DIFF="@DIFF@"
43DUMPBIN="@FIXPATH@ @DUMPBIN@"
44EXPR="@EXPR@"
45FILE="@FILE@"
46FIND="@FIND@"
47GREP="@GREP@"
48JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
49JIMAGE="@FIXPATH@ @BUILD_OUTPUT@/jdk/bin/jimage"
50LDD="@LDD@"
51LN="@LN@"
52MKDIR="@MKDIR@"
53NAWK="@NAWK@"
54NM="@GNM@"
55OBJDUMP="@OBJDUMP@"
56OTOOL="@OTOOL@"
57PRINTF="@PRINTF@"
58READELF="@READELF@"
59RM="@RM@"
60SED="@SED@"
61SORT="@SORT@"
62STAT="@STAT@"
63STRIP="@STRIP@ @STRIPFLAGS@"
64TEE="@TEE@"
65UNIQ="@UNIQ@"
66UNPACK200="@FIXPATH@ @BOOT_JDK@/bin/unpack200"
67UNZIP="@UNZIP@"
68
69SRC_ROOT="@TOPDIR@"
70
71if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
72  PATH="@VS_PATH@"
73fi
74
75# Now locate the main script and run it.
76REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
77if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
78  echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
79  exit 1
80fi
81
82. "$REAL_COMPARE_SCRIPT" "$@"
83