Defs.gmk revision 535
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# This code is free software; you can redistribute it and/or modify it
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# under the terms of the GNU General Public License version 2 only, as
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# published by the Free Software Foundation. Sun designates this
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# particular file as subject to the "Classpath" exception as provided
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# by Sun in the LICENSE file that accompanied this code.
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# This code is distributed in the hope that it will be useful, but WITHOUT
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# version 2 for more details (a copy is included in the LICENSE file that
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# accompanied this code).
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff# You should have received a copy of the GNU General Public License version
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# 2 along with this work; if not, write to the Free Software Foundation,
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff# CA 95054 USA or visit www.sun.com if you need additional information or
691af6c84a00ad5f629ffcfa3b1e42c38da5da4fJeff Conniff# have any questions.
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff# Definitions for all platforms.
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff# Normally the convention is that these alternate definitions of
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff# primary make variables are never defined inside the Makefiles anywhere
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# but are defined via environment variables or set on the make command
2aa0883432cf56a974eb9261afcf6ede4313384cJeff Conniff# line. So you should never see an ALT_* variable defined in any
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# makefiles, just used. This is the convention and there are some
41a8874f3c14857a5a311a43eaf30a123f376771Jeff Conniff# exceptions, either mistakes or unusual circumstances.
df71f95acec70ebddf0ab97cc1e0ff2b70048017Jeff Conniff# The naming convention for the default value of one of these variables
a07ef3db5494f82be2ebfd04f876d8387b9d31f1Jeff Conniff# that has an ALT_* override capability is to name the default value with a
55ffe622a989343b84d634479bbdc3ba88fd5fa9Jeff Conniff# leading underscore (_). So for XXX you would have:
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# _XXX default value
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# ALT_XXX any override the user is providing if any
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# XXX the final value, either the default _XXX or the ALT_XXX value.
# strange problems with jar and other utilities, e.g. /a//b/ != /a/b/.
$(if $(word 2,$($1)),$(warning "WARNING: Value of $1 contains a space: '$($1)', check or set ALT_$1")Check_ALT_$1,$($1))
$(if $($1),$($1),$(warning "WARNING: Value of $1 cannot be empty, check or set ALT_$1")Check_ALT_$1)
$(shell \
$(shell \
$(shell \
# Given a line of text, get the major.minor version number from it
# Given a major.minor.micro version, return the major, minor, or micro number
$(shell \
echo missing; \
echo same; \
echo older; \
echo older; \
echo newer; \
$(call CheckValue,ARCH,),\
$(call CheckValue,ARCH_DATA_MODEL,),\
$(call CheckValue,ARCH_VM_SUBDIR,),\
$(call CheckValue,JDK_TOPDIR,),\
$(call CheckValue,VARIANT,),\
$(call CheckValue,PLATFORM,)
COMPANY_NAME = N/A
$(ECHO) $(JDK_UPDATE_VERSION) | $(NAWK) '{if (substr($$0,1,1)=="0") print substr($$0, 2); else print $$0;}')
USER_RELEASE_SUFFIX := $(shell $(ECHO) "$(CLEAN_USERNAME)_$(BUILD_DATE)" | $(TR) '[:upper:]' '[:lower:]' )
PREVIOUS_JDK_VERSION = $(PREVIOUS_MAJOR_VERSION).$(PREVIOUS_MINOR_VERSION).$(PREVIOUS_MICRO_VERSION)
export PREVIOUS_JDK_VERSION
HOTSPOT_DOCS_IMPORT_PATH :=$(call DirExists,$(HOTSPOT_IMPORT_PATH)/docs,$(PROMOTED_BUILD_BASEDIR)/docs,/NO_DOCS_DIR)
export BOOTDIR
export PREVIOUS_RELEASE_PATH
export PREVIOUS_JDK_FILE
export PREVIOUS_JRE_FILE
_outputdir_error:=$(error "ERROR: Trouble with the absolute path for OUTPUTDIR '$(OUTPUTDIR)', was ALT_OUTPUTDIR '$(ALT_OUTPUTDIR)' an absolute path?")
_outputdir_error:=$(error "ERROR: ABS_OUTPUTDIR '$(ABS_OUTPUTDIR)' is not the same directory as OUTPUTDIR '$(OUTPUTDIR)', '$(_dir1)'!='$(_dir2)'")