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