Defs.gmk revision 4041
3261N/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 0N/A# published by the Free Software Foundation. Oracle designates this 0N/A# particular file as subject to the "Classpath" exception as provided 0N/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, 2362N/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. 0N/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 \ # Select a directory if it exists, or the alternate 2, or the alternate 3, or the alternate 4 # Select a writable directory if it exists and is writable, or the alternate if [ -d "$1" -a -w "$1" ]; then \ # Select a file if it exists, or the alternate 1, or the alternate 2 # Given a line of text, get the version number from it $(shell echo $1 | sed -e 's@[^0-9]*\([0-9][0-9]*\.[0-9][.0-9]*\).*@\1@' ) # Return one part of the version numbers, watch out for non digits. # Macro that returns missing, same, newer, or older $1=version $2=required if [ "$1" = "" -o "$2" = "" ]; then \ elif [ "$1" = "$2" ]; then \ # Make sure certain variables are non-empty at this point # Misc common settings for all workspaces # This determines the version of the product, and the previous version or boot # Default variant is the optimized version of everything # can be OPT or DBG, default is OPT # Determine the extra pattern to add to the release name for debug/fastdebug. # Determine the JDK_IMPORT_VARIANT, so we get the right VM files copied over. # Determine suffix for obj directory or OBJDIR, for .o files. # (by keeping .o files separate, just .o files, they don't clobber each # other, however, the library files will clobber each other). # Depending on the flavor of the build, add a -debug or -fastdebug to the name # These default values are redefined during a release build. # CTE can set JDK_UPDATE_VERSION during the update release # RELEASE is JDK_VERSION and -MILESTONE if MILESTONE is set # FULL_VERSION is RELEASE and -BUILD_NUMBER if BUILD_NUMBER is set # Promoted build location # PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel. # 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 # Create file with source information # The source tips can come from the Mercurial repository, or in the files # $(HGTIP_FILENAME) which contains the tip but is also positioned in the same # directory as the original $(HGDIR) directory. # These should not be := assignments, only used from the root Makefile. # Emit the repo:tip pairs to $@ if [
"$${i}" =
"IGNORE" ] ;
then \
# Create the HGTIP_FILENAME file # 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).