annotate make/common/shared/Sanity-Settings.gmk @ 1225:4b922e8fef3b

Merge
author yan
date Tue, 28 Apr 2009 13:41:11 -0700
parents 964cc8eb3232 7f45fcc04f8e
children 4fef42eb432c 7e7153da24ef
rev   line source
duke@0 1 #
ohair@542 2 # Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation. Sun designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
duke@0 9 # by Sun in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
duke@0 21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 22 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 23 # have any questions.
duke@0 24 #
duke@0 25
duke@0 26 #
duke@0 27 # Shared sanity settings file. Fills in the variable ALL_SETTINGS.
duke@0 28 #
duke@0 29
duke@0 30 # On Windows in particular, it can happen that quotes get into the PATH
duke@0 31 # variable. This is very bad, and must be caught early or you can
duke@0 32 # see errors like: sh: -c: line 0: syntax error near unexpected token
duke@0 33 #
duke@0 34 ifneq ($(PATH), $(subst ",,$(PATH)))
duke@0 35 dummy1:=$(error ERROR: PATH variable contains double quotes, fix your PATH.)
duke@0 36 endif
duke@0 37 ifneq ($(PATH), $(subst ',,$(PATH)))
duke@0 38 dummy1:=$(error ERROR: PATH variable contains single quotes, fix your PATH.)
duke@0 39 endif
duke@0 40
duke@0 41 # Used to add a heading to ALL_SETTINGS
duke@0 42 define addHeading
duke@0 43 "\n$1:\n"
duke@0 44 endef
duke@0 45
duke@0 46 # Used to add a line to ALL_SETTINGS for an optional value
duke@0 47 # (need if test for windows which has issues with ; characters in values)
duke@0 48 define addOptionalSetting
duke@0 49 $(if $($1)," $1 = $($1)\n"," $1 = $($1)\n")
duke@0 50 endef
duke@0 51
duke@0 52 # Used to add a line to ALL_SETTINGS for something that must have a value
duke@0 53 define addRequiredSetting
duke@0 54 $(if $($1)," $1 = $($1)\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk]))
duke@0 55 endef
duke@0 56
duke@0 57 # Used to add a line to ALL_SETTINGS for something that must have a value
duke@0 58 define addRequiredVersionSetting
duke@0 59 $(if $($1)," $1 = $($1) [requires at least $(REQUIRED_$1)]\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk]))
duke@0 60 endef
duke@0 61
duke@0 62 # Used to add a series of lines to ALL_SETTINGS
duke@0 63 define addAltSetting
duke@0 64 " $1 = $($1)\n ALT_$1 = $(ALT_$1)\n"
duke@0 65 endef
duke@0 66
duke@0 67 # Variable that contains a string of all information
duke@0 68
duke@0 69 # Make sure this is a 'do it now' variable.
duke@0 70 ALL_SETTINGS:=$(call addHeading,Bootstrap Settings)
duke@0 71 ALL_SETTINGS+=$(call addAltSetting,BOOTDIR)
duke@0 72 ALL_SETTINGS+=$(call addRequiredVersionSetting,BOOT_VER)
duke@0 73 ALL_SETTINGS+=$(call addAltSetting,OUTPUTDIR)
duke@0 74 ALL_SETTINGS+=$(call addRequiredSetting,ABS_OUTPUTDIR)
duke@0 75
duke@0 76
duke@0 77 ALL_SETTINGS+=$(call addHeading,Build Tool Settings)
duke@0 78 ALL_SETTINGS+=$(call addAltSetting,SLASH_JAVA)
duke@0 79 ALL_SETTINGS+=$(call addRequiredSetting,VARIANT)
duke@0 80 ALL_SETTINGS+=$(call addAltSetting,JDK_DEVTOOLS_DIR)
duke@0 81 ALL_SETTINGS+=$(call addOptionalSetting,ANT_HOME)
duke@0 82 ALL_SETTINGS+=$(call addAltSetting,UNIXCOMMAND_PATH)
duke@0 83 ALL_SETTINGS+=$(call addAltSetting,COMPILER_PATH)
duke@0 84 ALL_SETTINGS+=$(call addAltSetting,DEVTOOLS_PATH)
duke@0 85 ifeq ($(PLATFORM),linux)
duke@0 86 ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH)
duke@0 87 ALL_SETTINGS+=$(call addAltSetting,USRBIN_PATH)
duke@0 88 ifndef OPENJDK
duke@0 89 ALL_SETTINGS+=$(call addAltSetting,GCC29_COMPILER_PATH)
duke@0 90 endif
duke@0 91 endif
duke@0 92 ifeq ($(PLATFORM),solaris)
duke@0 93 ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH)
duke@0 94 ifndef OPENJDK
duke@0 95 ALL_SETTINGS+=$(call addAltSetting,GCC_COMPILER_PATH)
duke@0 96 endif
duke@0 97 endif
duke@0 98 ifeq ($(PLATFORM),windows)
duke@0 99 ALL_SETTINGS+=$(call addAltSetting,MSVCRT_DLL_PATH)
ohair@992 100 ifneq ($(MSVCRNN_DLL),)
tbell@823 101 ALL_SETTINGS+=$(call addAltSetting,MSVCRNN_DLL_PATH)
duke@0 102 endif
duke@0 103 ALL_SETTINGS+=$(call addAltSetting,MSDEVTOOLS_PATH)
duke@0 104 endif
duke@0 105 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_NAME)
duke@0 106 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_VERSION)
duke@0 107 ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER)
duke@0 108 ifeq ($(PLATFORM),solaris)
duke@0 109 ifeq ($(ARCH_DATA_MODEL), 32)
duke@0 110 ifndef OPENJDK
duke@0 111 ALL_SETTINGS+=$(call addRequiredVersionSetting,GCC_VER)
duke@0 112 endif
duke@0 113 endif
duke@0 114 endif
duke@0 115 ALL_SETTINGS+=$(call addRequiredVersionSetting,ZIP_VER)
duke@0 116 ALL_SETTINGS+=$(call addRequiredVersionSetting,UNZIP_VER)
duke@0 117 ifeq ($(PLATFORM),windows)
duke@0 118 ALL_SETTINGS+=$(call addRequiredVersionSetting,LINK_VER)
duke@0 119 endif
duke@0 120 ALL_SETTINGS+=$(call addRequiredVersionSetting,ANT_VER)
duke@0 121 ALL_SETTINGS+=$(call addRequiredSetting,TEMPDIR)
duke@0 122
duke@0 123
duke@0 124 ALL_SETTINGS+=$(call addHeading,Build Directives)
duke@0 125 ALL_SETTINGS+=$(call addOptionalSetting,OPENJDK)
duke@0 126 ALL_SETTINGS+=$(call addOptionalSetting,USE_HOTSPOT_INTERPRETER_MODE)
duke@0 127 ALL_SETTINGS+=$(call addOptionalSetting,PEDANTIC)
duke@0 128 ALL_SETTINGS+=$(call addOptionalSetting,DEV_ONLY)
duke@0 129 ALL_SETTINGS+=$(call addOptionalSetting,NO_DOCS)
duke@0 130 ALL_SETTINGS+=$(call addOptionalSetting,NO_IMAGES)
duke@0 131 ALL_SETTINGS+=$(call addOptionalSetting,TOOLS_ONLY)
duke@0 132 ALL_SETTINGS+=$(call addOptionalSetting,INSANE)
duke@0 133 ALL_SETTINGS+=$(call addRequiredSetting,COMPILE_APPROACH)
duke@0 134 ifeq ($(COMPILE_APPROACH), parallel)
duke@0 135 ALL_SETTINGS+=$(call addAltSetting,PARALLEL_COMPILE_JOBS)
duke@0 136 endif
duke@0 137 ALL_SETTINGS+=$(call addOptionalSetting,FASTDEBUG)
duke@0 138 ALL_SETTINGS+=$(call addRequiredSetting,COMPILER_WARNINGS_FATAL)
duke@0 139 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_WARNING_LEVEL)
duke@0 140 ALL_SETTINGS+=$(call addRequiredSetting,INCREMENTAL_BUILD)
duke@0 141 ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHEST_OPT)
duke@0 142 ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHER_OPT)
duke@0 143 ALL_SETTINGS+=$(call addOptionalSetting,CC_LOWER_OPT)
duke@0 144 ALL_SETTINGS+=$(call addOptionalSetting,CXXFLAGS)
duke@0 145 ALL_SETTINGS+=$(call addOptionalSetting,CFLAGS)
duke@0 146
duke@0 147 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVA_CMD)
duke@0 148 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVAC_CMD)
duke@0 149 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAR_CMD)
duke@0 150 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JARSIGNER_CMD)
duke@0 151
duke@0 152 # These don't print out well with windows due to the ';' characters
duke@0 153 ifneq ($(PLATFORM),windows)
duke@0 154 ALL_SETTINGS+=$(call addOptionalSetting,JAVAC_CMD)
duke@0 155 ALL_SETTINGS+=$(call addOptionalSetting,JAVAH_CMD)
duke@0 156 ALL_SETTINGS+=$(call addOptionalSetting,JAVADOC_CMD)
duke@0 157 endif
duke@0 158
duke@0 159 ALL_SETTINGS+=$(call addHeading,Build Platform Settings)
duke@0 160 ALL_SETTINGS+=$(call addRequiredSetting,USER)
duke@0 161 ALL_SETTINGS+=$(call addRequiredSetting,PLATFORM)
duke@0 162 ALL_SETTINGS+=$(call addRequiredSetting,ARCH)
duke@0 163 ALL_SETTINGS+=$(call addRequiredSetting,LIBARCH)
duke@0 164 ALL_SETTINGS+=$(call addRequiredSetting,ARCH_FAMILY)
duke@0 165 ALL_SETTINGS+=$(call addRequiredSetting,ARCH_DATA_MODEL)
duke@0 166 ALL_SETTINGS+=$(call addRequiredSetting,ARCHPROP)
duke@0 167 ifeq ($(PLATFORM),windows)
duke@0 168 ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_ARCHITECTURE)
duke@0 169 ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_IDENTIFIER)
duke@0 170 ifdef USING_CYGWIN
duke@0 171 ALL_SETTINGS+=$(call addRequiredSetting,USING_CYGWIN)
duke@0 172 ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER)
duke@0 173 ALL_SETTINGS+=$(call addRequiredSetting,CYGPATH_CMD)
duke@0 174 else
duke@0 175 ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER)
duke@0 176 ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD)
duke@0 177 endif
duke@0 178 endif
duke@0 179 ifeq ($(PLATFORM),linux)
ohair@964 180 ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION)
duke@0 181 endif
duke@0 182 ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION)
ohair@964 183 ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME)
ohair@964 184 ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_VERSION)
duke@0 185 ALL_SETTINGS+=$(call addRequiredSetting,TEMP_FREE_SPACE)
duke@0 186 ALL_SETTINGS+=$(call addRequiredSetting,FREE_SPACE)
duke@0 187 ALL_SETTINGS+=$(call addRequiredSetting,MB_OF_MEMORY)
duke@0 188
duke@0 189
duke@0 190 ALL_SETTINGS+=$(call addHeading,GNU Make Settings)
duke@0 191 ALL_SETTINGS+=$(call addRequiredSetting,MAKE)
duke@0 192 ALL_SETTINGS+=$(call addRequiredVersionSetting,MAKE_VER)
duke@0 193 ALL_SETTINGS+=$(call addOptionalSetting,MAKECMDGOALS)
duke@0 194 ALL_SETTINGS+=$(call addOptionalSetting,MAKEFLAGS)
duke@0 195 ALL_SETTINGS+=$(call addRequiredSetting,SHELL)
duke@0 196
duke@0 197
duke@0 198 ALL_SETTINGS+=$(call addHeading,Target Build Versions)
duke@0 199 ALL_SETTINGS+=$(call addRequiredSetting,JDK_VERSION)
duke@0 200 ALL_SETTINGS+=$(call addOptionalSetting,MILESTONE)
duke@0 201 ALL_SETTINGS+=$(call addOptionalSetting,RELEASE)
duke@0 202 ALL_SETTINGS+=$(call addRequiredSetting,FULL_VERSION)
duke@0 203 ALL_SETTINGS+=$(call addOptionalSetting,BUILD_NUMBER)
duke@0 204
duke@0 205
duke@0 206 ALL_SETTINGS+=$(call addHeading,External File/Binary Locations)
duke@0 207 ALL_SETTINGS+=$(call addRequiredSetting,USRJDKINSTANCES_PATH)
duke@0 208 ALL_SETTINGS+=$(call addAltSetting,BUILD_JDK_IMPORT_PATH)
duke@0 209 ALL_SETTINGS+=$(call addAltSetting,JDK_IMPORT_PATH)
duke@0 210 ALL_SETTINGS+=$(call addAltSetting,LANGTOOLS_DIST)
duke@0 211 ALL_SETTINGS+=$(call addAltSetting,CORBA_DIST)
duke@0 212 ALL_SETTINGS+=$(call addAltSetting,JAXP_DIST)
duke@0 213 ALL_SETTINGS+=$(call addAltSetting,JAXWS_DIST)
duke@0 214 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_DOCS_IMPORT_PATH)
duke@0 215 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_IMPORT_PATH)
duke@0 216 ifeq ($(ARCH_DATA_MODEL), 32)
duke@0 217 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_CLIENT_PATH)
duke@0 218 endif
duke@0 219 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_SERVER_PATH)
duke@0 220 ifeq ($(PLATFORM),windows)
duke@0 221 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_LIB_PATH)
duke@0 222 ALL_SETTINGS+=$(call addRequiredSetting,DXSDK_VER)
duke@0 223 ALL_SETTINGS+=$(call addAltSetting,DXSDK_PATH)
duke@0 224 ALL_SETTINGS+=$(call addAltSetting,DXSDK_INCLUDE_PATH)
duke@0 225 ALL_SETTINGS+=$(call addAltSetting,DXSDK_LIB_PATH)
duke@0 226 ifndef OPENJDK
duke@0 227 ALL_SETTINGS+=$(call addAltSetting,DEPLOY_MSSDK)
duke@0 228 ALL_SETTINGS+=$(call addAltSetting,INSTALL_MSSDK)
duke@0 229 ALL_SETTINGS+=$(call addAltSetting,WSCRIPT)
duke@0 230 ALL_SETTINGS+=$(call addAltSetting,MSICERT)
duke@0 231 ALL_SETTINGS+=$(call addAltSetting,MSITRAN)
duke@0 232 ALL_SETTINGS+=$(call addAltSetting,MSIVAL2)
duke@0 233 endif
duke@0 234 endif
duke@0 235 ALL_SETTINGS+=$(call addAltSetting,CACERTS_FILE)
peterz@1223 236 ALL_SETTINGS+=$(call addAltSetting,JIBX_LIBS_PATH)
duke@0 237 ifndef OPENJDK
duke@0 238 ALL_SETTINGS+=$(call addAltSetting,MOZILLA_HEADERS_PATH)
duke@0 239 endif
duke@0 240 ifneq ($(PLATFORM),windows)
duke@0 241 ALL_SETTINGS+=$(call addAltSetting,CUPS_HEADERS_PATH)
duke@0 242 endif
duke@0 243
duke@0 244 ifdef OPENJDK
duke@0 245 ALL_SETTINGS+=$(call addHeading,OpenJDK-specific settings)
duke@0 246 ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH)
duke@0 247 ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH)
duke@0 248 ALL_SETTINGS+=$(call addHeading,OPENJDK Import Binary Plug Settings)
tbell@1021 249 ALL_SETTINGS+=$(call addOptionalSetting,IMPORT_BINARY_PLUGS)
duke@0 250 ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_JARFILE)
duke@0 251 ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_PATH)
duke@0 252 ALL_SETTINGS+=$(call addAltSetting,BUILD_BINARY_PLUGS_PATH)
duke@0 253 else
duke@0 254 ALL_SETTINGS+=$(call addHeading,OPENJDK Export Binary Plug Settings)
duke@0 255 ALL_SETTINGS+=$(call addOptionalSetting,PLUG_EXPORT_DIRNAME)
duke@0 256 endif
duke@0 257 ALL_SETTINGS+=$(call addOptionalSetting,PLUG_LIBRARY_NAMES)
duke@0 258
duke@0 259 ifdef OPENJDK
duke@0 260 ALL_SETTINGS+=$(call addHeading,Previous JDK Settings)
duke@0 261 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_PATH)
duke@0 262 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_VERSION)
duke@0 263 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_FILE)
duke@0 264 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JRE_FILE)
duke@0 265 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_IMAGE)
duke@0 266 endif
duke@0 267