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