annotate make/build.sh @ 9295:05be144c3f45

8135209: Avoid abutting string literals and identifiers Summary: Add spaces between string literals and identifiers. Reviewed-by: brutisso, pliden
author kbarrett
date Wed, 09 Sep 2015 14:31:12 -0400
parents bab5cbf74b5f
children c030d25ae04e
rev   line source
duke@0 1 #! /bin/sh
duke@0 2 #
kvn@4444 3 # Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
duke@0 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 5 #
duke@0 6 # This code is free software; you can redistribute it and/or modify it
duke@0 7 # under the terms of the GNU General Public License version 2 only, as
duke@0 8 # published by the Free Software Foundation.
duke@0 9 #
duke@0 10 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 13 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 14 # accompanied this code).
duke@0 15 #
duke@0 16 # You should have received a copy of the GNU General Public License version
duke@0 17 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 19 #
trims@1472 20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 21 # or visit www.oracle.com if you need additional information or have any
trims@1472 22 # questions.
duke@0 23 #
duke@0 24 #
duke@0 25
duke@0 26 # Make sure the variable JAVA_HOME is set before running this script.
duke@0 27
duke@0 28 set -u
duke@0 29
duke@0 30
kvn@4444 31 if [ $# -lt 1 ]; then
kvn@4444 32 echo "Usage : $0 BuildTarget [LP64=1] [BuildOptions]"
kvn@4444 33 echo " Server VM | Client VM"
kvn@4444 34 echo "BuildTarget : debug | debug1"
kvn@4444 35 echo " fastdebug | fastdebug1"
kvn@4444 36 echo " jvmg | jvmg1"
kvn@4444 37 echo " optimized | optimized1"
kvn@4444 38 echo " profiled | profiled1"
kvn@4444 39 echo " product | product1"
duke@0 40 exit 1
duke@0 41 fi
duke@0 42
kvn@8373 43 if [ "${JAVA_HOME-}" = "" -o ! -d "${JAVA_HOME-}" ]; then
kvn@4444 44 echo "JAVA_HOME needs to be set to a valid JDK path"
kvn@4444 45 echo "JAVA_HOME: ${JAVA_HOME-}"
kvn@4444 46 exit 1
duke@0 47 fi
duke@0 48
duke@0 49 # Just in case:
kvn@4444 50 JAVA_HOME=`( cd $JAVA_HOME; pwd )`
duke@0 51
kvn@4444 52 if [ "${ALT_BOOTDIR-}" = "" -o ! -d "${ALT_BOOTDIR-}" -o ! -d ${ALT_BOOTDIR-}/jre/lib/ ]; then
kvn@4444 53 ALT_BOOTDIR=${JAVA_HOME}
duke@0 54 fi
duke@0 55
kvn@4444 56 # build in current directory by default
kvn@4444 57 if [ "${ALT_OUTPUTDIR-}" = "" -o ! -d "${ALT_OUTPUTDIR-}" ]; then
kvn@4444 58 ALT_OUTPUTDIR=`(pwd)`
kvn@4444 59 fi
duke@0 60
kvn@4444 61 HOTSPOT_SRC=`(dirname $0)`/..
kvn@4444 62 HOTSPOT_SRC=`(cd ${HOTSPOT_SRC}; pwd)`
duke@0 63
duke@0 64 for gm in gmake gnumake
duke@0 65 do
duke@0 66 if [ "${GNUMAKE-}" != "" ]; then break; fi
duke@0 67 ($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm
duke@0 68 done
duke@0 69 : ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'}
duke@0 70
kvn@4444 71 # quiet build by default
kvn@4444 72 Quiet="MAKE_VERBOSE="
kvn@4444 73
kvn@4444 74 # no debug info by default
kvn@4444 75 NoDebugInfo="ENABLE_FULL_DEBUG_SYMBOLS="
kvn@4444 76
kvn@4444 77 LANG=C
duke@0 78
duke@0 79 echo "### ENVIRONMENT SETTINGS:"
kvn@4444 80 export HOTSPOT_SRC ; echo "HOTSPOT_SRC=$HOTSPOT_SRC"
duke@0 81 export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME"
kvn@4444 82 export ALT_BOOTDIR ; echo "ALT_BOOTDIR=$ALT_BOOTDIR"
kvn@4444 83 export ALT_OUTPUTDIR ; echo "ALT_OUTPUTDIR=$ALT_OUTPUTDIR"
duke@0 84 export GNUMAKE ; echo "GNUMAKE=$GNUMAKE"
kvn@4444 85 export LANG ; echo "LANG=$LANG"
duke@0 86 echo "###"
duke@0 87
kvn@4444 88 BuildOptions="$Quiet $NoDebugInfo $*"
duke@0 89
duke@0 90 echo \
kvn@4444 91 ${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC}
kvn@4444 92 ${GNUMAKE} -f ${HOTSPOT_SRC}/make/Makefile $BuildOptions GAMMADIR=${HOTSPOT_SRC}