blob: b64e3b52a136a931d3230425feebadcd5fad802b [file] [log] [blame]
#
# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Sun designates this
# particular file as subject to the "Classpath" exception as provided
# by Sun in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
#
# Shared sanity settings file. Fills in the variable ALL_SETTINGS.
#
# On Windows in particular, it can happen that quotes get into the PATH
# variable. This is very bad, and must be caught early or you can
# see errors like: sh: -c: line 0: syntax error near unexpected token
#
ifneq ($(PATH), $(subst ",,$(PATH)))
dummy1:=$(error ERROR: PATH variable contains double quotes, fix your PATH.)
endif
ifneq ($(PATH), $(subst ',,$(PATH)))
dummy1:=$(error ERROR: PATH variable contains single quotes, fix your PATH.)
endif
# Used to add a heading to ALL_SETTINGS
define addHeading
"\n$1:\n"
endef
# Used to add a line to ALL_SETTINGS for an optional value
# (need if test for windows which has issues with ; characters in values)
define addOptionalSetting
$(if $($1)," $1 = $($1)\n"," $1 = $($1)\n")
endef
# Used to add a line to ALL_SETTINGS for something that must have a value
define addRequiredSetting
$(if $($1)," $1 = $($1)\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk]))
endef
# Used to add a line to ALL_SETTINGS for something that must have a value
define addRequiredVersionSetting
$(if $($1)," $1 = $($1) [requires at least $(REQUIRED_$1)]\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk]))
endef
# Used to add a series of lines to ALL_SETTINGS
define addAltSetting
" $1 = $($1)\n ALT_$1 = $(ALT_$1)\n"
endef
# Variable that contains a string of all information
# Make sure this is a 'do it now' variable.
ALL_SETTINGS:=$(call addHeading,Bootstrap Settings)
ALL_SETTINGS+=$(call addAltSetting,BOOTDIR)
ALL_SETTINGS+=$(call addRequiredVersionSetting,BOOT_VER)
ALL_SETTINGS+=$(call addAltSetting,OUTPUTDIR)
ALL_SETTINGS+=$(call addRequiredSetting,ABS_OUTPUTDIR)
ALL_SETTINGS+=$(call addHeading,Build Tool Settings)
ALL_SETTINGS+=$(call addAltSetting,SLASH_JAVA)
ALL_SETTINGS+=$(call addRequiredSetting,VARIANT)
ALL_SETTINGS+=$(call addAltSetting,JDK_DEVTOOLS_DIR)
ALL_SETTINGS+=$(call addOptionalSetting,ANT_HOME)
ALL_SETTINGS+=$(call addAltSetting,UNIXCOMMAND_PATH)
ALL_SETTINGS+=$(call addAltSetting,COMPILER_PATH)
ALL_SETTINGS+=$(call addAltSetting,DEVTOOLS_PATH)
ifeq ($(PLATFORM),linux)
ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH)
ALL_SETTINGS+=$(call addAltSetting,USRBIN_PATH)
ifndef OPENJDK
ALL_SETTINGS+=$(call addAltSetting,GCC29_COMPILER_PATH)
endif
endif
ifeq ($(PLATFORM),solaris)
ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH)
ifndef OPENJDK
ALL_SETTINGS+=$(call addAltSetting,GCC_COMPILER_PATH)
endif
endif
ifeq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addAltSetting,MSVCRT_DLL_PATH)
ifneq ($(MSVCRNN_DLL),)
ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH)
endif
ALL_SETTINGS+=$(call addAltSetting,MSDEVTOOLS_PATH)
endif
ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_NAME)
ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_VERSION)
ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER)
ifeq ($(PLATFORM),solaris)
ifeq ($(ARCH_DATA_MODEL), 32)
ifndef OPENJDK
ALL_SETTINGS+=$(call addRequiredVersionSetting,GCC_VER)
endif
endif
endif
ALL_SETTINGS+=$(call addRequiredVersionSetting,ZIP_VER)
ALL_SETTINGS+=$(call addRequiredVersionSetting,UNZIP_VER)
ifeq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addRequiredVersionSetting,LINK_VER)
endif
ALL_SETTINGS+=$(call addRequiredVersionSetting,ANT_VER)
ALL_SETTINGS+=$(call addRequiredSetting,TEMPDIR)
ALL_SETTINGS+=$(call addHeading,Build Directives)
ALL_SETTINGS+=$(call addOptionalSetting,OPENJDK)
ALL_SETTINGS+=$(call addOptionalSetting,USE_HOTSPOT_INTERPRETER_MODE)
ALL_SETTINGS+=$(call addOptionalSetting,PEDANTIC)
ALL_SETTINGS+=$(call addOptionalSetting,DEV_ONLY)
ALL_SETTINGS+=$(call addOptionalSetting,NO_DOCS)
ALL_SETTINGS+=$(call addOptionalSetting,NO_IMAGES)
ALL_SETTINGS+=$(call addOptionalSetting,TOOLS_ONLY)
ALL_SETTINGS+=$(call addOptionalSetting,INSANE)
ALL_SETTINGS+=$(call addRequiredSetting,COMPILE_APPROACH)
ifeq ($(COMPILE_APPROACH), parallel)
ALL_SETTINGS+=$(call addAltSetting,PARALLEL_COMPILE_JOBS)
endif
ALL_SETTINGS+=$(call addOptionalSetting,FASTDEBUG)
ALL_SETTINGS+=$(call addRequiredSetting,COMPILER_WARNINGS_FATAL)
ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_WARNING_LEVEL)
ALL_SETTINGS+=$(call addRequiredSetting,INCREMENTAL_BUILD)
ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHEST_OPT)
ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHER_OPT)
ALL_SETTINGS+=$(call addOptionalSetting,CC_LOWER_OPT)
ALL_SETTINGS+=$(call addOptionalSetting,CXXFLAGS)
ALL_SETTINGS+=$(call addOptionalSetting,CFLAGS)
ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVA_CMD)
ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVAC_CMD)
ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAR_CMD)
ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JARSIGNER_CMD)
# These don't print out well with windows due to the ';' characters
ifneq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addOptionalSetting,JAVAC_CMD)
ALL_SETTINGS+=$(call addOptionalSetting,JAVAH_CMD)
ALL_SETTINGS+=$(call addOptionalSetting,JAVADOC_CMD)
endif
ALL_SETTINGS+=$(call addHeading,Build Platform Settings)
ALL_SETTINGS+=$(call addRequiredSetting,USER)
ALL_SETTINGS+=$(call addRequiredSetting,PLATFORM)
ALL_SETTINGS+=$(call addRequiredSetting,ARCH)
ALL_SETTINGS+=$(call addRequiredSetting,LIBARCH)
ALL_SETTINGS+=$(call addRequiredSetting,ARCH_FAMILY)
ALL_SETTINGS+=$(call addRequiredSetting,ARCH_DATA_MODEL)
ALL_SETTINGS+=$(call addRequiredSetting,ARCHPROP)
ifeq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_ARCHITECTURE)
ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_IDENTIFIER)
ifdef USING_CYGWIN
ALL_SETTINGS+=$(call addRequiredSetting,USING_CYGWIN)
ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER)
ALL_SETTINGS+=$(call addRequiredSetting,CYGPATH_CMD)
else
ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER)
ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD)
endif
endif
ifeq ($(PLATFORM),linux)
ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION)
endif
ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION)
ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME)
ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_VERSION)
ALL_SETTINGS+=$(call addRequiredSetting,TEMP_FREE_SPACE)
ALL_SETTINGS+=$(call addRequiredSetting,FREE_SPACE)
ALL_SETTINGS+=$(call addRequiredSetting,MB_OF_MEMORY)
ALL_SETTINGS+=$(call addHeading,GNU Make Settings)
ALL_SETTINGS+=$(call addRequiredSetting,MAKE)
ALL_SETTINGS+=$(call addRequiredVersionSetting,MAKE_VER)
ALL_SETTINGS+=$(call addOptionalSetting,MAKECMDGOALS)
ALL_SETTINGS+=$(call addOptionalSetting,MAKEFLAGS)
ALL_SETTINGS+=$(call addRequiredSetting,SHELL)
ALL_SETTINGS+=$(call addHeading,Target Build Versions)
ALL_SETTINGS+=$(call addRequiredSetting,JDK_VERSION)
ALL_SETTINGS+=$(call addOptionalSetting,MILESTONE)
ALL_SETTINGS+=$(call addOptionalSetting,RELEASE)
ALL_SETTINGS+=$(call addRequiredSetting,FULL_VERSION)
ALL_SETTINGS+=$(call addOptionalSetting,BUILD_NUMBER)
ALL_SETTINGS+=$(call addHeading,External File/Binary Locations)
ALL_SETTINGS+=$(call addRequiredSetting,USRJDKINSTANCES_PATH)
ALL_SETTINGS+=$(call addAltSetting,BUILD_JDK_IMPORT_PATH)
ALL_SETTINGS+=$(call addAltSetting,JDK_IMPORT_PATH)
ALL_SETTINGS+=$(call addAltSetting,LANGTOOLS_DIST)
ALL_SETTINGS+=$(call addAltSetting,CORBA_DIST)
ALL_SETTINGS+=$(call addAltSetting,JAXP_DIST)
ALL_SETTINGS+=$(call addAltSetting,JAXWS_DIST)
ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_DOCS_IMPORT_PATH)
ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_IMPORT_PATH)
ifeq ($(ARCH_DATA_MODEL), 32)
ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_CLIENT_PATH)
endif
ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_SERVER_PATH)
ifeq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_LIB_PATH)
ALL_SETTINGS+=$(call addRequiredSetting,DXSDK_VER)
ALL_SETTINGS+=$(call addAltSetting,DXSDK_PATH)
ALL_SETTINGS+=$(call addAltSetting,DXSDK_INCLUDE_PATH)
ALL_SETTINGS+=$(call addAltSetting,DXSDK_LIB_PATH)
ifndef OPENJDK
ALL_SETTINGS+=$(call addAltSetting,DEPLOY_MSSDK)
ALL_SETTINGS+=$(call addAltSetting,INSTALL_MSSDK)
ALL_SETTINGS+=$(call addAltSetting,WSCRIPT)
ALL_SETTINGS+=$(call addAltSetting,MSICERT)
ALL_SETTINGS+=$(call addAltSetting,MSITRAN)
ALL_SETTINGS+=$(call addAltSetting,MSIVAL2)
endif
endif
ALL_SETTINGS+=$(call addAltSetting,CACERTS_FILE)
ifndef OPENJDK
ALL_SETTINGS+=$(call addAltSetting,MOZILLA_HEADERS_PATH)
endif
ifneq ($(PLATFORM),windows)
ALL_SETTINGS+=$(call addAltSetting,CUPS_HEADERS_PATH)
endif
ifdef OPENJDK
ALL_SETTINGS+=$(call addHeading,OpenJDK-specific settings)
ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH)
ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH)
ALL_SETTINGS+=$(call addHeading,OPENJDK Import Binary Plug Settings)
ALL_SETTINGS+=$(call addOptionalSetting,IMPORT_BINARY_PLUGS)
ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_JARFILE)
ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_PATH)
ALL_SETTINGS+=$(call addAltSetting,BUILD_BINARY_PLUGS_PATH)
else
ALL_SETTINGS+=$(call addHeading,OPENJDK Export Binary Plug Settings)
ALL_SETTINGS+=$(call addOptionalSetting,PLUG_EXPORT_DIRNAME)
endif
ALL_SETTINGS+=$(call addOptionalSetting,PLUG_LIBRARY_NAMES)
ifdef OPENJDK
ALL_SETTINGS+=$(call addHeading,Previous JDK Settings)
ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_PATH)
ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_VERSION)
ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_FILE)
ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JRE_FILE)
ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_IMAGE)
endif