common/autoconf/compare.sh.in
author ohair
Fri, 26 Oct 2012 14:29:57 -0700
changeset 14111 2a82ecb35fc7
parent 13697 5262b00bc10c
child 14280 7d8ad47b2dbf
permissions -rw-r--r--
8000992: Update new build-infra makefiles Summary: Build-infra project integration. Multiple authors on this work: erikj and ihse primarily, also changes from ohair, tbell, and dholmes. Special credit to ohstrom for his smartjavac work. Reviewed-by: erikj, ihse, dholmes, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     1
#!/bin/bash
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     2
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     3
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     5
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     8
# published by the Free Software Foundation.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
     9
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    14
# accompanied this code).
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    15
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    16
# You should have received a copy of the GNU General Public License version
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    19
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    20
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    21
# or visit www.oracle.com if you need additional information or have any
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    22
# questions.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    23
#
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    24
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    25
# This script is processed by configure before it's usable. It is run from 
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    26
# the root of the build directory.
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    27
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    28
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    29
##########################################################################################
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    30
# Substitutions from autoconf
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    31
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    32
LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    33
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    34
OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    35
OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    36
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    37
AWK="@AWK@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    38
CAT="@CAT@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    39
CMP="@CMP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    40
CP="@CP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    41
CUT="@CUT@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    42
DIFF="@DIFF@"
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    43
DUMPBIN="@FIXPATH@ @DUMPBIN@"
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    44
EXPR="@EXPR@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    45
FILE="@FILE@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    46
FIND="@FIND@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    47
GREP="@GREP@"
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    48
JAVAP="@FIXPATH@ @BOOT_JDK@/bin/javap"
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    49
LDD="@LDD@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    50
MKDIR="@MKDIR@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    51
NM="@NM@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    52
OBJDUMP="@OBJDUMP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    53
OTOOL="@OTOOL@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    54
PRINTF="@PRINTF@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    55
READELF="@READELF@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    56
RM="@RM@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    57
SED="@SED@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    58
SORT="@SORT@"
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    59
STAT="@STAT@"
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    60
STRIP="@POST_STRIP_CMD@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    61
TEE="@TEE@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    62
UNIQ="@UNIQ@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    63
UNZIP="@UNZIP@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    64
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    65
SRC_ROOT="@SRC_ROOT@"
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    66
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    67
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    68
    PATH="@VS_PATH@"
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    69
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    70
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    71
# Now locate the main script and run it.
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    72
REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    73
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    74
    echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
13697
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    75
    exit 1
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    76
fi
5262b00bc10c 7197849: Update new build-infra makefiles
ohair
parents:
diff changeset
    77
14111
2a82ecb35fc7 8000992: Update new build-infra makefiles
ohair
parents: 13697
diff changeset
    78
. "$REAL_COMPARE_SCRIPT" "$@"