|
1 # |
|
2 # Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. |
|
3 # 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 # |
|
34 ifneq ($(PATH), $(subst ",,$(PATH))) |
|
35 dummy1:=$(error ERROR: PATH variable contains double quotes, fix your PATH.) |
|
36 endif |
|
37 ifneq ($(PATH), $(subst ',,$(PATH))) |
|
38 dummy1:=$(error ERROR: PATH variable contains single quotes, fix your PATH.) |
|
39 endif |
|
40 |
|
41 # Used to add a heading to ALL_SETTINGS |
|
42 define addHeading |
|
43 "\n$1:\n" |
|
44 endef |
|
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) |
|
48 define addOptionalSetting |
|
49 $(if $($1)," $1 = $($1)\n"," $1 = $($1)\n") |
|
50 endef |
|
51 |
|
52 # Used to add a line to ALL_SETTINGS for something that must have a value |
|
53 define addRequiredSetting |
|
54 $(if $($1)," $1 = $($1)\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk])) |
|
55 endef |
|
56 |
|
57 # Used to add a line to ALL_SETTINGS for something that must have a value |
|
58 define addRequiredVersionSetting |
|
59 $(if $($1)," $1 = $($1) [requires at least $(REQUIRED_$1)]\n",$(warning WARNING: $1 should not be empty [Sanity-Settings.gmk])) |
|
60 endef |
|
61 |
|
62 # Used to add a series of lines to ALL_SETTINGS |
|
63 define addAltSetting |
|
64 " $1 = $($1)\n ALT_$1 = $(ALT_$1)\n" |
|
65 endef |
|
66 |
|
67 # Variable that contains a string of all information |
|
68 |
|
69 # Make sure this is a 'do it now' variable. |
|
70 ALL_SETTINGS:=$(call addHeading,Bootstrap Settings) |
|
71 ALL_SETTINGS+=$(call addAltSetting,BOOTDIR) |
|
72 ALL_SETTINGS+=$(call addRequiredVersionSetting,BOOT_VER) |
|
73 ALL_SETTINGS+=$(call addAltSetting,OUTPUTDIR) |
|
74 ALL_SETTINGS+=$(call addRequiredSetting,ABS_OUTPUTDIR) |
|
75 |
|
76 |
|
77 ALL_SETTINGS+=$(call addHeading,Build Tool Settings) |
|
78 ALL_SETTINGS+=$(call addAltSetting,SLASH_JAVA) |
|
79 ALL_SETTINGS+=$(call addRequiredSetting,VARIANT) |
|
80 ALL_SETTINGS+=$(call addAltSetting,JDK_DEVTOOLS_DIR) |
|
81 ALL_SETTINGS+=$(call addOptionalSetting,ANT_HOME) |
|
82 ALL_SETTINGS+=$(call addOptionalSetting,FINDBUGS_HOME) |
|
83 ALL_SETTINGS+=$(call addAltSetting,UNIXCOMMAND_PATH) |
|
84 ALL_SETTINGS+=$(call addAltSetting,COMPILER_PATH) |
|
85 ALL_SETTINGS+=$(call addAltSetting,DEVTOOLS_PATH) |
|
86 ifeq ($(PLATFORM),linux) |
|
87 ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH) |
|
88 ALL_SETTINGS+=$(call addAltSetting,USRBIN_PATH) |
|
89 ifndef OPENJDK |
|
90 ALL_SETTINGS+=$(call addAltSetting,GCC29_COMPILER_PATH) |
|
91 endif |
|
92 endif |
|
93 ifeq ($(PLATFORM),solaris) |
|
94 ALL_SETTINGS+=$(call addAltSetting,UNIXCCS_PATH) |
|
95 ifndef OPENJDK |
|
96 ALL_SETTINGS+=$(call addAltSetting,GCC_COMPILER_PATH) |
|
97 endif |
|
98 endif |
|
99 ifeq ($(PLATFORM),windows) |
|
100 ALL_SETTINGS+=$(call addAltSetting,MSVCRT_DLL_PATH) |
|
101 ifeq ($(ARCH_DATA_MODEL), 32) |
|
102 ALL_SETTINGS+=$(call addAltSetting,MSVCR71_DLL_PATH) |
|
103 endif |
|
104 ALL_SETTINGS+=$(call addAltSetting,MSDEVTOOLS_PATH) |
|
105 endif |
|
106 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_NAME) |
|
107 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_VERSION) |
|
108 ALL_SETTINGS+=$(call addRequiredVersionSetting,CC_VER) |
|
109 ifeq ($(PLATFORM),solaris) |
|
110 ifeq ($(ARCH_DATA_MODEL), 32) |
|
111 ifndef OPENJDK |
|
112 ALL_SETTINGS+=$(call addRequiredVersionSetting,GCC_VER) |
|
113 endif |
|
114 endif |
|
115 endif |
|
116 ALL_SETTINGS+=$(call addRequiredVersionSetting,ZIP_VER) |
|
117 ALL_SETTINGS+=$(call addRequiredVersionSetting,UNZIP_VER) |
|
118 ifeq ($(PLATFORM),windows) |
|
119 ALL_SETTINGS+=$(call addRequiredVersionSetting,LINK_VER) |
|
120 endif |
|
121 ALL_SETTINGS+=$(call addRequiredVersionSetting,ANT_VER) |
|
122 ALL_SETTINGS+=$(call addRequiredVersionSetting,FINDBUGS_VER) |
|
123 ALL_SETTINGS+=$(call addRequiredSetting,TEMPDIR) |
|
124 |
|
125 |
|
126 ALL_SETTINGS+=$(call addHeading,Build Directives) |
|
127 ALL_SETTINGS+=$(call addOptionalSetting,OPENJDK) |
|
128 ALL_SETTINGS+=$(call addOptionalSetting,USE_HOTSPOT_INTERPRETER_MODE) |
|
129 ALL_SETTINGS+=$(call addOptionalSetting,PEDANTIC) |
|
130 ALL_SETTINGS+=$(call addOptionalSetting,DEV_ONLY) |
|
131 ALL_SETTINGS+=$(call addOptionalSetting,NO_DOCS) |
|
132 ALL_SETTINGS+=$(call addOptionalSetting,NO_IMAGES) |
|
133 ALL_SETTINGS+=$(call addOptionalSetting,TOOLS_ONLY) |
|
134 ALL_SETTINGS+=$(call addOptionalSetting,INSANE) |
|
135 ALL_SETTINGS+=$(call addRequiredSetting,COMPILE_APPROACH) |
|
136 ifeq ($(COMPILE_APPROACH), parallel) |
|
137 ALL_SETTINGS+=$(call addAltSetting,PARALLEL_COMPILE_JOBS) |
|
138 endif |
|
139 ALL_SETTINGS+=$(call addOptionalSetting,FASTDEBUG) |
|
140 ALL_SETTINGS+=$(call addRequiredSetting,COMPILER_WARNINGS_FATAL) |
|
141 ALL_SETTINGS+=$(call addOptionalSetting,COMPILER_WARNING_LEVEL) |
|
142 ALL_SETTINGS+=$(call addRequiredSetting,INCREMENTAL_BUILD) |
|
143 ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHEST_OPT) |
|
144 ALL_SETTINGS+=$(call addOptionalSetting,CC_HIGHER_OPT) |
|
145 ALL_SETTINGS+=$(call addOptionalSetting,CC_LOWER_OPT) |
|
146 ALL_SETTINGS+=$(call addOptionalSetting,CXXFLAGS) |
|
147 ALL_SETTINGS+=$(call addOptionalSetting,CFLAGS) |
|
148 |
|
149 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVA_CMD) |
|
150 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAVAC_CMD) |
|
151 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JAR_CMD) |
|
152 ALL_SETTINGS+=$(call addOptionalSetting,BOOT_JARSIGNER_CMD) |
|
153 |
|
154 # These don't print out well with windows due to the ';' characters |
|
155 ifneq ($(PLATFORM),windows) |
|
156 ALL_SETTINGS+=$(call addOptionalSetting,JAVAC_CMD) |
|
157 ALL_SETTINGS+=$(call addOptionalSetting,JAVAH_CMD) |
|
158 ALL_SETTINGS+=$(call addOptionalSetting,JAVADOC_CMD) |
|
159 endif |
|
160 |
|
161 ALL_SETTINGS+=$(call addHeading,Build Platform Settings) |
|
162 ALL_SETTINGS+=$(call addRequiredSetting,USER) |
|
163 ALL_SETTINGS+=$(call addRequiredSetting,PLATFORM) |
|
164 ALL_SETTINGS+=$(call addRequiredSetting,ARCH) |
|
165 ALL_SETTINGS+=$(call addRequiredSetting,LIBARCH) |
|
166 ALL_SETTINGS+=$(call addRequiredSetting,ARCH_FAMILY) |
|
167 ALL_SETTINGS+=$(call addRequiredSetting,ARCH_DATA_MODEL) |
|
168 ALL_SETTINGS+=$(call addRequiredSetting,ARCHPROP) |
|
169 ifeq ($(PLATFORM),windows) |
|
170 ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_ARCHITECTURE) |
|
171 ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_IDENTIFIER) |
|
172 ALL_SETTINGS+=$(call addRequiredSetting,WINDOWS_VERSION) |
|
173 ALL_SETTINGS+=$(call addRequiredSetting,WINDOWS_NT_VERSION_STRING) |
|
174 ifdef USING_CYGWIN |
|
175 ALL_SETTINGS+=$(call addRequiredSetting,USING_CYGWIN) |
|
176 ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER) |
|
177 ALL_SETTINGS+=$(call addRequiredSetting,CYGPATH_CMD) |
|
178 else |
|
179 ALL_SETTINGS+=$(call addRequiredVersionSetting,MKS_VER) |
|
180 ALL_SETTINGS+=$(call addOptionalSetting,DOSNAME_CMD) |
|
181 endif |
|
182 endif |
|
183 ifeq ($(PLATFORM),linux) |
|
184 ALL_SETTINGS+=$(call addRequiredSetting,LINUX_VERSION) |
|
185 ifneq ($(ARCH), ia64) |
|
186 ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION) |
|
187 endif |
|
188 endif |
|
189 ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION) |
|
190 ALL_SETTINGS+=$(call addRequiredSetting,OS_NAME) |
|
191 ALL_SETTINGS+=$(call addRequiredSetting,TEMP_FREE_SPACE) |
|
192 ALL_SETTINGS+=$(call addRequiredSetting,FREE_SPACE) |
|
193 ALL_SETTINGS+=$(call addRequiredSetting,MB_OF_MEMORY) |
|
194 |
|
195 |
|
196 ALL_SETTINGS+=$(call addHeading,GNU Make Settings) |
|
197 ALL_SETTINGS+=$(call addRequiredSetting,MAKE) |
|
198 ALL_SETTINGS+=$(call addRequiredVersionSetting,MAKE_VER) |
|
199 ALL_SETTINGS+=$(call addOptionalSetting,MAKECMDGOALS) |
|
200 ALL_SETTINGS+=$(call addOptionalSetting,MAKEFLAGS) |
|
201 ALL_SETTINGS+=$(call addRequiredSetting,SHELL) |
|
202 |
|
203 |
|
204 ALL_SETTINGS+=$(call addHeading,Target Build Versions) |
|
205 ALL_SETTINGS+=$(call addRequiredSetting,JDK_VERSION) |
|
206 ALL_SETTINGS+=$(call addOptionalSetting,MILESTONE) |
|
207 ALL_SETTINGS+=$(call addOptionalSetting,RELEASE) |
|
208 ALL_SETTINGS+=$(call addRequiredSetting,FULL_VERSION) |
|
209 ALL_SETTINGS+=$(call addOptionalSetting,BUILD_NUMBER) |
|
210 |
|
211 |
|
212 ALL_SETTINGS+=$(call addHeading,External File/Binary Locations) |
|
213 ALL_SETTINGS+=$(call addRequiredSetting,USRJDKINSTANCES_PATH) |
|
214 ALL_SETTINGS+=$(call addAltSetting,BUILD_JDK_IMPORT_PATH) |
|
215 ALL_SETTINGS+=$(call addAltSetting,JDK_IMPORT_PATH) |
|
216 ALL_SETTINGS+=$(call addAltSetting,LANGTOOLS_DIST) |
|
217 ALL_SETTINGS+=$(call addAltSetting,CORBA_DIST) |
|
218 ALL_SETTINGS+=$(call addAltSetting,JAXP_DIST) |
|
219 ALL_SETTINGS+=$(call addAltSetting,JAXWS_DIST) |
|
220 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_DOCS_IMPORT_PATH) |
|
221 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_IMPORT_PATH) |
|
222 ifeq ($(ARCH_DATA_MODEL), 32) |
|
223 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_CLIENT_PATH) |
|
224 endif |
|
225 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_SERVER_PATH) |
|
226 ifeq ($(PLATFORM),windows) |
|
227 ALL_SETTINGS+=$(call addAltSetting,HOTSPOT_LIB_PATH) |
|
228 ALL_SETTINGS+=$(call addRequiredSetting,DXSDK_VER) |
|
229 ALL_SETTINGS+=$(call addAltSetting,DXSDK_PATH) |
|
230 ALL_SETTINGS+=$(call addAltSetting,DXSDK_INCLUDE_PATH) |
|
231 ALL_SETTINGS+=$(call addAltSetting,DXSDK_LIB_PATH) |
|
232 ifndef OPENJDK |
|
233 ALL_SETTINGS+=$(call addAltSetting,DEPLOY_MSSDK) |
|
234 ALL_SETTINGS+=$(call addAltSetting,INSTALL_MSSDK) |
|
235 ALL_SETTINGS+=$(call addAltSetting,WSCRIPT) |
|
236 ALL_SETTINGS+=$(call addAltSetting,MSICERT) |
|
237 ALL_SETTINGS+=$(call addAltSetting,MSITRAN) |
|
238 ALL_SETTINGS+=$(call addAltSetting,MSIVAL2) |
|
239 endif |
|
240 endif |
|
241 ALL_SETTINGS+=$(call addAltSetting,CACERTS_FILE) |
|
242 ifndef OPENJDK |
|
243 ALL_SETTINGS+=$(call addAltSetting,MOZILLA_HEADERS_PATH) |
|
244 endif |
|
245 ifneq ($(PLATFORM),windows) |
|
246 ALL_SETTINGS+=$(call addAltSetting,CUPS_HEADERS_PATH) |
|
247 endif |
|
248 |
|
249 ifdef OPENJDK |
|
250 ALL_SETTINGS+=$(call addHeading,OpenJDK-specific settings) |
|
251 ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH) |
|
252 ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH) |
|
253 ALL_SETTINGS+=$(call addHeading,OPENJDK Import Binary Plug Settings) |
|
254 ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_JARFILE) |
|
255 ALL_SETTINGS+=$(call addAltSetting,BINARY_PLUGS_PATH) |
|
256 ALL_SETTINGS+=$(call addAltSetting,BUILD_BINARY_PLUGS_PATH) |
|
257 else |
|
258 ALL_SETTINGS+=$(call addHeading,OPENJDK Export Binary Plug Settings) |
|
259 ALL_SETTINGS+=$(call addOptionalSetting,PLUG_EXPORT_DIRNAME) |
|
260 endif |
|
261 ALL_SETTINGS+=$(call addOptionalSetting,PLUG_LIBRARY_NAMES) |
|
262 |
|
263 ifdef OPENJDK |
|
264 ALL_SETTINGS+=$(call addHeading,Previous JDK Settings) |
|
265 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_PATH) |
|
266 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_VERSION) |
|
267 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JDK_FILE) |
|
268 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_JRE_FILE) |
|
269 ALL_SETTINGS+=$(call addAltSetting,PREVIOUS_RELEASE_IMAGE) |
|
270 endif |
|
271 |