Defs.gmk revision 3909
4622N/A# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 4622N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4622N/A# This code is free software; you can redistribute it and/or modify it 4622N/A# under the terms of the GNU General Public License version 2 only, as 4622N/A# published by the Free Software Foundation. Oracle designates this 4622N/A# particular file as subject to the "Classpath" exception as provided 4622N/A# by Oracle in the LICENSE file that accompanied this code. 4622N/A# This code is distributed in the hope that it will be useful, but WITHOUT 4622N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4622N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4622N/A# version 2 for more details (a copy is included in the LICENSE file that 4622N/A# You should have received a copy of the GNU General Public License version 4622N/A# 2 along with this work; if not, write to the Free Software Foundation, 4622N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4622N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4622N/A# Definitions for all platforms. 4622N/A# Normally the convention is that these alternate definitions of 4622N/A# primary make variables are never defined inside the Makefiles anywhere 4622N/A# but are defined via environment variables or set on the make command 4622N/A# line. So you should never see an ALT_* variable defined in any 4622N/A# makefiles, just used. This is the convention and there are some 4622N/A# exceptions, either mistakes or unusual circumstances. 4622N/A# The naming convention for the default value of one of these variables 4622N/A# that has an ALT_* override capability is to name the default value with a 4622N/A# leading underscore (_). So for XXX you would have: 4622N/A# ALT_XXX any override the user is providing if any 4622N/A# XXX the final value, either the default _XXX or the ALT_XXX value. 4622N/A# On Directory names. In very rare cases should the Windows directory 4622N/A# names use the backslash, please use the C:/ style of windows paths. 4622N/A# Avoid duplicating the // characters in paths, this has known to cause 4622N/A# strange problems with jar and other utilities, e.g. /a//b/ != /a/b/. 4622N/A# Some of these variables have an explicit trailing / character, but in 4622N/A# general, they should NOT have the trailing / character. 4622N/A# Get shared system utilities macros defined 4622N/A# Assumes ARCH, PLATFORM, ARCH_VM_SUBDIR, JDK_TOPDIR, etc. have been defined. 4622N/A# NOTE: Just use the shell's cd and pwd here, more reliable at sanity time. 4622N/A# Checks an ALT value for spaces (should be one word), 4622N/A# warns and returns Check_ALT_$1 if spaces 4622N/A# Checks an ALT value for empty, warns and returns Check_ALT_$1 if empty 4622N/A# Checks any value for empty, warns and returns $2 if empty 4622N/A$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, will use '$2'")$2) 4622N/A# Prefix for a utility prefix path, if empty leave alone, otherwise end with a / 4622N/A# Select a directory if it exists, or the alternate 2 or the alternate 3 4622N/A# Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4 4622N/A# Select a writable directory if it exists and is writable, or the alternate 4622N/A if [ -d "$1" -a -w "$1" ]; then \ 4622N/A# Select a file if it exists, or the alternate 1, or the alternate 2 4622N/A# Given a line of text, get the version number from it 4622N/A$(shell echo $1 | sed -e 's@[^0-9]*\([0-9][0-9]*\.[0-9][.0-9]*\).*@\1@' ) 4622N/A# Return one part of the version numbers, watch out for non digits. 4622N/A# Macro that returns missing, same, newer, or older $1=version $2=required 4622N/A if [ "$1" = "" -o "$2" = "" ]; then \ 4622N/A elif [ "$1" = "$2" ]; then \ 4622N/A# Make sure certain variables are non-empty at this point 4622N/A# Misc common settings for all workspaces 4622N/A# This determines the version of the product, and the previous version or boot 4622N/A# Default variant is the optimized version of everything 4622N/A# can be OPT or DBG, default is OPT 4622N/A# Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over. 4622N/A# Determine suffix for obj directory or OBJDIR, for .o files. 4622N/A# (by keeping .o files separate, just .o files, they don't clobber each 4622N/A# other, however, the library files will clobber each other). 4622N/A# Depending on the flavor of the build, add a -debug or -fastdebug to the name 4622N/A# These default values are redefined during a release build. 4622N/A# CTE can set JDK_UPDATE_VERSION during the update release 4622N/A# RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set 4622N/A# FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set 4622N/A# PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel. 4622N/A# If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set # Recommended setting: 2 seems to be ideal for single cpu machines, # 2 times the number of CPU's is a basic formula, # but probably not more than 4 if the machine is # being shared by others, or the machine is limited # Previous JDK release (version of BOOTDIR version) # Version with _ instead of . in number # Include any private definitions for this set of workspaces # OUTPUTDIR: Location of all output for the build # Assumes this is absolute (checks later) # Default: Get "build" parent directory, which should always exist # Check for spaces and null value # Get platform specific settings # NB: OUTPUTDIR must be defined. Otherwise hotspot import detection will not work correctly # On other hand this must be included early as it provides platform specific defines such as FullPath # Get platform specific settings (defines COMPILER_PATH) # HOTSPOT_DOCS_IMPORT_PATH: Path to hotspot docs files to import into the docs generation # These are the same on all platforms but require the above platform include 1st # BOOTDIR: Bootstrap JDK, previous released JDK. # _BOOTDIR1 and _BOOTDIR2 picked by platform # Platform may optionally define _BOOTDIR3 as well. # PREVIOUS_FCS_RE_AREA: re path to where previous release binaries/bundles are # PREVIOUS_RELEASE_IMAGE: Previous install image to compare against # Explicit image provided, no bundle access needed # PREVIOUS_RELEASE_PATH: path to where previous release bundles are # Depending on if we have access to these bundles # Use images in re area or BOOTDIR (which is normally the previous release) # Get names of and paths to bundles # PREVIOUS_JDK_FILE: filename of install bundle for previous JDK # PREVIOUS_JRE_FILE: filename of install bundle for previous JRE # Indicate we are using an image comparison # CACERTS_FILE: if OPENJDK is false and the internal version of the file # (that is, non-empty) is available, use it, otherwise use an # We put this variable here for sanity checks and in case another # components will need to know which cacerts file is being used. # When signing the JCE framework and provider, we could be using built # bits on a read-only filesystem. If so, this test will fail and crash # Create the output directory and make sure it exists and is writable # Define absolute path if needed and check for spaces and null value #Could not define this at the same time as _OUTPUTDIRNAME as FullPath is not defined at that point # Make doubly sure this is a full path # NOTE: ISA_DIR is usually empty, on Solaris it might be /sparcv9 or /amd64 # MOZILLA_HEADERS_PATH: path to mozilla header files for plugin # CUPS_HEADERS_PATH: path to Cups headers files for Unix printing # There are few problems with ant we need to workaround: # However, this directory is not unique enough and two separate ant processes # can easily end up using the exact same temp directory. This may lead to weird build failures # To workaround this we will define tmp dir explicitly # 2) ant attempts to detect JDK location based on java.exe location # This is fragile as developer may have JRE first on the PATH. # To workaround this we will specify JAVA_HOME explicitly # Get the compiler specific settings (will run the compiler to find out) # NOTE: COMPILER_PATH must be set by this time. # Up until we include this file, we don't know what specific compiler # version is actually being used (i.e. what is in PATH or COMPILER_PATH).