Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/build.sh
32278 views
#! /bin/sh1#2# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4#5# This code is free software; you can redistribute it and/or modify it6# under the terms of the GNU General Public License version 2 only, as7# published by the Free Software Foundation.8#9# This code is distributed in the hope that it will be useful, but WITHOUT10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12# version 2 for more details (a copy is included in the LICENSE file that13# accompanied this code).14#15# You should have received a copy of the GNU General Public License version16# 2 along with this work; if not, write to the Free Software Foundation,17# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18#19# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20# or visit www.oracle.com if you need additional information or have any21# questions.22#23#2425# Make sure the variable JAVA_HOME is set before running this script.2627set -u282930if [ $# -lt 1 ]; then31echo "Usage : $0 BuildTarget [LP64=1] [BuildOptions]"32echo " Server VM | Client VM"33echo "BuildTarget : debug | debug1"34echo " fastdebug | fastdebug1"35echo " jvmg | jvmg1"36echo " optimized | optimized1"37echo " profiled | profiled1"38echo " product | product1"39exit 140fi4142if [ "${JAVA_HOME-}" = "" -o ! -d "${JAVA_HOME-}" -o ! -d ${JAVA_HOME-}/jre/lib/ ]; then43echo "JAVA_HOME needs to be set to a valid JDK path"44echo "JAVA_HOME: ${JAVA_HOME-}"45exit 146fi4748# Just in case:49JAVA_HOME=`( cd $JAVA_HOME; pwd )`5051if [ "${ALT_BOOTDIR-}" = "" -o ! -d "${ALT_BOOTDIR-}" -o ! -d ${ALT_BOOTDIR-}/jre/lib/ ]; then52ALT_BOOTDIR=${JAVA_HOME}53fi5455# build in current directory by default56if [ "${ALT_OUTPUTDIR-}" = "" -o ! -d "${ALT_OUTPUTDIR-}" ]; then57ALT_OUTPUTDIR=`(pwd)`58fi5960HOTSPOT_SRC=`(dirname $0)`/..61HOTSPOT_SRC=`(cd ${HOTSPOT_SRC}; pwd)`6263for gm in gmake gnumake64do65if [ "${GNUMAKE-}" != "" ]; then break; fi66($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm67done68: ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'}6970# quiet build by default71Quiet="MAKE_VERBOSE="7273# no debug info by default74NoDebugInfo="ENABLE_FULL_DEBUG_SYMBOLS="7576LANG=C7778echo "### ENVIRONMENT SETTINGS:"79export HOTSPOT_SRC ; echo "HOTSPOT_SRC=$HOTSPOT_SRC"80export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME"81export ALT_BOOTDIR ; echo "ALT_BOOTDIR=$ALT_BOOTDIR"82export ALT_OUTPUTDIR ; echo "ALT_OUTPUTDIR=$ALT_OUTPUTDIR"83export GNUMAKE ; echo "GNUMAKE=$GNUMAKE"84export LANG ; echo "LANG=$LANG"85echo "###"8687BuildOptions="$Quiet $NoDebugInfo $*"8889echo \90${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC}91${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC}929394