author | goetz |
Thu, 18 Sep 2014 09:37:26 +0200 | |
changeset 26805 | 73f3e9ac86f5 |
parent 16630 | 3dea566541da |
child 30211 | 442fbbb31f75 |
permissions | -rw-r--r-- |
1 | 1 |
#! /bin/sh |
2 |
# |
|
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
3 |
# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
# |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
21 |
# or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
22 |
# questions. |
1 | 23 |
# |
24 |
# |
|
25 |
||
26 |
# Make sure the variable JAVA_HOME is set before running this script. |
|
27 |
||
28 |
set -u |
|
29 |
||
30 |
||
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
31 |
if [ $# -lt 1 ]; then |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
32 |
echo "Usage : $0 BuildTarget [LP64=1] [BuildOptions]" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
33 |
echo " Server VM | Client VM" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
34 |
echo "BuildTarget : debug | debug1" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
35 |
echo " fastdebug | fastdebug1" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
36 |
echo " jvmg | jvmg1" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
37 |
echo " optimized | optimized1" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
38 |
echo " profiled | profiled1" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
39 |
echo " product | product1" |
1 | 40 |
exit 1 |
41 |
fi |
|
42 |
||
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
43 |
if [ "${JAVA_HOME-}" = "" -o ! -d "${JAVA_HOME-}" -o ! -d ${JAVA_HOME-}/jre/lib/ ]; then |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
44 |
echo "JAVA_HOME needs to be set to a valid JDK path" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
45 |
echo "JAVA_HOME: ${JAVA_HOME-}" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
46 |
exit 1 |
1 | 47 |
fi |
48 |
||
49 |
# Just in case: |
|
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
50 |
JAVA_HOME=`( cd $JAVA_HOME; pwd )` |
1 | 51 |
|
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
52 |
if [ "${ALT_BOOTDIR-}" = "" -o ! -d "${ALT_BOOTDIR-}" -o ! -d ${ALT_BOOTDIR-}/jre/lib/ ]; then |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
53 |
ALT_BOOTDIR=${JAVA_HOME} |
1 | 54 |
fi |
55 |
||
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
56 |
# build in current directory by default |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
57 |
if [ "${ALT_OUTPUTDIR-}" = "" -o ! -d "${ALT_OUTPUTDIR-}" ]; then |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
58 |
ALT_OUTPUTDIR=`(pwd)` |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
59 |
fi |
1 | 60 |
|
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
61 |
HOTSPOT_SRC=`(dirname $0)`/.. |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
62 |
HOTSPOT_SRC=`(cd ${HOTSPOT_SRC}; pwd)` |
1 | 63 |
|
64 |
for gm in gmake gnumake |
|
65 |
do |
|
66 |
if [ "${GNUMAKE-}" != "" ]; then break; fi |
|
67 |
($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm |
|
68 |
done |
|
69 |
: ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'} |
|
70 |
||
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
71 |
# quiet build by default |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
72 |
Quiet="MAKE_VERBOSE=" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
73 |
|
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
74 |
# no debug info by default |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
75 |
NoDebugInfo="ENABLE_FULL_DEBUG_SYMBOLS=" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
76 |
|
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
77 |
LANG=C |
1 | 78 |
|
79 |
echo "### ENVIRONMENT SETTINGS:" |
|
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
80 |
export HOTSPOT_SRC ; echo "HOTSPOT_SRC=$HOTSPOT_SRC" |
1 | 81 |
export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME" |
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
82 |
export ALT_BOOTDIR ; echo "ALT_BOOTDIR=$ALT_BOOTDIR" |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
83 |
export ALT_OUTPUTDIR ; echo "ALT_OUTPUTDIR=$ALT_OUTPUTDIR" |
1 | 84 |
export GNUMAKE ; echo "GNUMAKE=$GNUMAKE" |
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
85 |
export LANG ; echo "LANG=$LANG" |
1 | 86 |
echo "###" |
87 |
||
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
88 |
BuildOptions="$Quiet $NoDebugInfo $*" |
1 | 89 |
|
90 |
echo \ |
|
16630
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
91 |
${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC} |
3dea566541da
8011198: LP64 setting is not preserved on Solaris after 8006965
kvn
parents:
5547
diff
changeset
|
92 |
${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC} |