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