author | ohair |
Wed, 10 Sep 2008 09:48:41 -0700 | |
changeset 1162 | 0eb72b6aea56 |
parent 889 | 6549643c008c |
child 1163 | 0de695c3558f |
permissions | -rw-r--r-- |
2 | 1 |
# |
888
c7009cf0001f
6728492: typo in copyrights in some files touched by the d3d pipeline port
tdv
parents:
887
diff
changeset
|
2 |
# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. |
2 | 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 |
# WARNING: This file is shared with other workspaces. |
|
28 |
# |
|
29 |
||
30 |
# |
|
31 |
# Shared sanity rules for the JDK builds. |
|
32 |
# |
|
33 |
||
34 |
.SUFFIXES: .hdiffs |
|
35 |
||
36 |
# All files created during sanity checking |
|
37 |
||
38 |
SANITY_FILES = $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE) |
|
39 |
||
40 |
# How to say "The Release Engineering people use this" |
|
41 |
THE_OFFICIAL_USES=The official $(PLATFORM) builds use |
|
42 |
||
43 |
# How to say "You are using:" |
|
44 |
YOU_ARE_USING=You appear to be using |
|
45 |
||
46 |
# Settings and rules to validate the JDK build environment. |
|
47 |
||
48 |
ifeq ($(PLATFORM), solaris) |
|
49 |
FREE_SPACE := $(shell $(DF) -b $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$2;}') |
|
50 |
TEMP_FREE_SPACE := $(shell $(DF) -b $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$2;}') |
|
51 |
REQ_PATCH_LIST = $(JDK_TOPDIR)/make/PatchList.solaris |
|
52 |
ifeq ($(ARCH_FAMILY), sparc) |
|
53 |
PATCH_POSITION = $$4 |
|
54 |
else |
|
55 |
PATCH_POSITION = $$6 |
|
56 |
endif |
|
57 |
endif |
|
58 |
||
59 |
ifeq ($(PLATFORM), linux) |
|
60 |
FREE_SPACE := $(shell $(DF) --sync -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}') |
|
61 |
TEMP_FREE_SPACE := $(shell $(DF) --sync -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}') |
|
62 |
ifeq ($(ARCH), amd64) |
|
63 |
LINUX_VERSION := $(shell \ |
|
64 |
if [ -r "$(LINUX_VERSION_INFO)" ] ; then \ |
|
65 |
$(CAT) $(LINUX_VERSION_INFO) | $(TAIL) -1 | $(NAWK) '{ print $$3; }';\ |
|
66 |
else \ |
|
67 |
$(ECHO) "Unknown linux"; \ |
|
68 |
fi ) |
|
69 |
else |
|
70 |
LINUX_VERSION := $(shell \ |
|
71 |
if [ -r "$(LINUX_VERSION_INFO)" ] ; then \ |
|
72 |
$(NAWK) '{ print $$4" "$$5; }' $(LINUX_VERSION_INFO) ; \ |
|
73 |
else \ |
|
74 |
$(ECHO) "Unknown linux"; \ |
|
75 |
fi ) |
|
76 |
endif |
|
77 |
ifneq ($(ARCH), ia64) |
|
78 |
# dummy program that outputs ALSA's version (created in target sane-alsa-versioncheck) |
|
79 |
ALSA_VERSION_CHECK = $(TEMPDIR)/alsaversioncheck |
|
80 |
ALSA_VERSION = `if [ -f "$(ALSA_VERSION_CHECK)" ] ; then $(ALSA_VERSION_CHECK) ; fi` |
|
81 |
endif |
|
82 |
endif |
|
83 |
||
84 |
ifeq ($(PLATFORM), windows) |
|
85 |
FREE_SPACE := $(shell $(DF) -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}') |
|
86 |
TEMP_FREE_SPACE := $(shell $(DF) -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}') |
|
799
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
87 |
# Localized systeminfo has localized labels, but not localized values. |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
88 |
_WINDOWS_VERSION := \ |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
89 |
$(shell systeminfo 2> $(DEV_NULL) | grep 'Microsoft' | grep 'Windows' | \ |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
90 |
cut -d':' -f2) |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
91 |
ifeq ($(_WINDOWS_VERSION),) |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
92 |
_WINDOWS_VERSION := Windows 2000 or Unknown (no systeminfo utility) |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
93 |
endif |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
94 |
WINDOWS_VERSION := $(strip $(_WINDOWS_VERSION)) |
887 | 95 |
DXSDK_VER := $(shell $(EGREP) DIRECT3D_VERSION $(DXSDK_INCLUDE_PATH)/d3d9.h 2>&1 | \ |
2 | 96 |
$(EGREP) "\#define" | $(NAWK) '{print $$3}') |
97 |
endif |
|
98 |
||
99 |
# Get the version numbers of what we are using |
|
100 |
_MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1) |
|
101 |
_ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip') |
|
102 |
_UNZIP_VER :=$(shell $(UNZIP) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^UnZip') |
|
103 |
_BOOT_VER :=$(shell $(BOOTDIR)/bin/java -version 2>&1 | $(HEAD) -n 1) |
|
104 |
MAKE_VER :=$(call GetVersion,"$(_MAKE_VER)") |
|
105 |
ZIP_VER :=$(call GetVersion,"$(_ZIP_VER)") |
|
106 |
UNZIP_VER :=$(call GetVersion,"$(_UNZIP_VER)") |
|
107 |
BOOT_VER :=$(call GetVersion,"$(_BOOT_VER)") |
|
108 |
||
140
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
2
diff
changeset
|
109 |
REQUIRED_ANT_VER := 1.6.3 |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
2
diff
changeset
|
110 |
ifeq ($(ANT_HOME),) |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
2
diff
changeset
|
111 |
_ANT_VER:=$(shell JAVACMD="$(BOOTDIR)/bin/java" $(ANT) -version 2>&1 ) |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
2
diff
changeset
|
112 |
else |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
2
diff
changeset
|
113 |
_ANT_VER:=$(shell JAVACMD="$(BOOTDIR)/bin/java" ANT_HOME="$(ANT_HOME)" $(ANT) -version 2>&1 ) |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
2
diff
changeset
|
114 |
endif |
3d601b5affa3
6654458: /java/devtools findbugs doesn't work on windows
ohair
parents:
2
diff
changeset
|
115 |
ANT_VER:=$(call GetVersion,"$(_ANT_VER)") |
2 | 116 |
|
117 |
ifdef ALT_BINDIR |
|
118 |
ALT_BINDIR_VERSION := $(shell $(ALT_BINDIR)/java$(EXE_SUFFIX) -version 2>&1 | $(NAWK) -F'"' '{ print $$2 }') |
|
119 |
ALT_BINDIR_OK := $(shell $(ECHO) $(ALT_BINDIR_VERSION) | $(EGREP) -c '^$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)') |
|
120 |
endif |
|
121 |
||
122 |
INSTALL_PATCHES_FILE = $(TEMPDIR)/installed.patches |
|
123 |
||
124 |
# Get ALL_SETTINGS defined |
|
125 |
include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk |
|
126 |
||
127 |
.PHONY: \ |
|
128 |
sane-copyrightyear\ |
|
129 |
sane-settings \ |
|
130 |
sane-insane \ |
|
131 |
sane-build_number \ |
|
132 |
sane-os_version \ |
|
133 |
sane-memory_check \ |
|
134 |
sane-windows \ |
|
135 |
sane-locale \ |
|
136 |
sane-linux \ |
|
137 |
sane-cygwin \ |
|
138 |
sane-cygwin-shell \ |
|
139 |
sane-mks \ |
|
140 |
sane-arch_data_model \ |
|
141 |
sane-os_patch_level \ |
|
142 |
sane-classpath \ |
|
143 |
sane-java_home \ |
|
144 |
sane-fonts \ |
|
145 |
sane-binary-plugs \ |
|
146 |
sane-variant \ |
|
147 |
sane-ld_library_path \ |
|
148 |
sane-ld_library_path_64 \ |
|
149 |
sane-ld_options \ |
|
150 |
sane-ld_run_path \ |
|
151 |
sane-makeflags \ |
|
152 |
sane-alt_outputdir \ |
|
153 |
sane-outputdir \ |
|
154 |
sane-alt_bootdir \ |
|
155 |
sane-bootdir \ |
|
156 |
sane-cups \ |
|
157 |
sane-devtools_path \ |
|
158 |
sane-compiler_path \ |
|
159 |
sane-unixcommand_path \ |
|
160 |
sane-usrbin_path \ |
|
161 |
sane-unixccs_path \ |
|
162 |
sane-docs_import \ |
|
163 |
sane-math_iso \ |
|
164 |
sane-libCrun \ |
|
165 |
sane-odbcdir \ |
|
166 |
sane-msdevtools_path \ |
|
167 |
sane-hotspot_binaries \ |
|
168 |
sane-hotspot_import \ |
|
169 |
sane-hotspot_import_dir \ |
|
170 |
sane-hotspot_import_include \ |
|
171 |
sane-compiler \ |
|
172 |
sane-link \ |
|
173 |
sane-cacerts \ |
|
174 |
sane-alsa-versioncheck \ |
|
175 |
sane-alsa-headers \ |
|
176 |
sane-ant_version \ |
|
177 |
sane-zip_version \ |
|
178 |
sane-unzip_version \ |
|
179 |
sane-msvcrt_path \ |
|
180 |
sane-freetype |
|
181 |
||
182 |
###################################################### |
|
183 |
# check for COPYRIGHT_YEAR variable |
|
184 |
###################################################### |
|
185 |
sane-copyrightyear: |
|
186 |
ifdef ALT_COPYRIGHT_YEAR |
|
187 |
@$(ECHO) "WARNING: ALT_COPYRIGHT_YEAR but not the current year\n" \ |
|
188 |
" will be used for copyright year.\n " \ |
|
189 |
"" >>$(WARNING_FILE) |
|
190 |
endif |
|
191 |
||
192 |
###################################################### |
|
193 |
# check for INSANE variable |
|
194 |
###################################################### |
|
195 |
sane-insane: |
|
196 |
ifdef INSANE |
|
197 |
@$(ECHO) "WARNING: You are building in 'INSANE' mode. You \n" \ |
|
198 |
" should not use this mode, and in fact, \n" \ |
|
199 |
" it may be removed at any time. If you \n" \ |
|
200 |
" have build problems as a result of using \n" \ |
|
201 |
" INSANE mode, then you should not expect \n" \ |
|
202 |
" assistance from anyone with the problems \n" \ |
|
203 |
" or consequences you experience. \n" \ |
|
204 |
"" >> $(WARNING_FILE) |
|
205 |
endif |
|
206 |
||
207 |
###################################################### |
|
208 |
# check for GNU Make version |
|
209 |
###################################################### |
|
210 |
MAKE_CHECK :=$(call CheckVersions,$(MAKE_VER),$(REQUIRED_MAKE_VER)) |
|
211 |
sane-make: |
|
212 |
@if [ "$(MAKE_CHECK)" != "same" -a "$(MAKE_CHECK)" != "newer" ]; then \ |
|
213 |
$(ECHO) "WARNING: The version of make being used is older than \n" \ |
|
214 |
" the required version of '$(REQUIRED_MAKE_VER)'. \n" \ |
|
215 |
" The version of make found was '$(MAKE_VER)'. \n" \ |
|
216 |
"" >> $(WARNING_FILE) ; \ |
|
217 |
fi |
|
218 |
||
219 |
###################################################### |
|
220 |
# Check the BUILD_NUMBER to make sure it contains bNN |
|
221 |
###################################################### |
|
222 |
sane-build_number: |
|
223 |
@if [ "`$(ECHO) $(BUILD_NUMBER) | $(SED) 's@.*b[0-9][0-9]*.*@bNN@'`" != "bNN" ] ; then \ |
|
224 |
$(ECHO) "WARNING: The BUILD_NUMBER needs to contain b[0-9][0-9]*. Currently BUILD_NUMBER=$(BUILD_NUMBER). \n" \ |
|
225 |
" This has been known to cause build failures. \n" \ |
|
226 |
"" >> $(WARNING_FILE) ; \ |
|
227 |
fi |
|
228 |
||
229 |
###################################################### |
|
230 |
# Check the ARCH_DATA_MODEL setting |
|
231 |
###################################################### |
|
232 |
sane-arch_data_model: |
|
233 |
@if [ "$(ARCH_DATA_MODEL)" != 32 -a "$(ARCH_DATA_MODEL)" != 64 ]; then \ |
|
234 |
$(ECHO) "ERROR: The setting of ARCH_DATA_MODEL must be 32 or 64.\n" \ |
|
235 |
" $(YOU_ARE_USING) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL). \n" \ |
|
236 |
"" >> $(ERROR_FILE) ; \ |
|
237 |
fi |
|
238 |
||
239 |
###################################################### |
|
240 |
# Check the OS version (windows and linus have release name checks) |
|
241 |
# NOTE: OPENJDK explicitly does not check for OS release information. |
|
242 |
# Unless we know for sure that it will not build somewhere, we cannot |
|
243 |
# generate a fatal sanity error, and a warning about the official |
|
244 |
# build platform just becomes clutter. |
|
245 |
###################################################### |
|
246 |
OS_CHECK :=$(call CheckVersions,$(OS_VERSION),$(REQUIRED_OS_VERSION)) |
|
247 |
sane-os_version:: sane-arch_data_model sane-memory_check sane-locale sane-os_patch_level |
|
248 |
ifndef OPENJDK |
|
249 |
@if [ "$(OS_CHECK)" = "missing" ]; then \ |
|
250 |
$(ECHO) "ERROR: The $(PLATFORM) OS version is undefined (Try: uname -r). \n" \ |
|
251 |
"" >> $(ERROR_FILE) ; \ |
|
252 |
fi |
|
253 |
@if [ "$(OS_CHECK)" != "same" ]; then \ |
|
254 |
$(ECHO) "WARNING: $(THE_OFFICIAL_USES) OS version $(REQUIRED_OS_VERSION). \n" \ |
|
255 |
" $(YOU_ARE_USING) OS version $(OS_VERSION). \n" \ |
|
256 |
"" >> $(WARNING_FILE) ; \ |
|
257 |
fi |
|
258 |
ifeq ($(PLATFORM), windows) |
|
799
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
259 |
@if [ "$(findstring $(REQUIRED_WINDOWS_VERSION),$(WINDOWS_VERSION))" = "" ]; then \ |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
260 |
$(ECHO) "WARNING: $(YOU_ARE_USING) an unknown version of Windows. \n" \ |
5abd62136d35
6695765: Remove winver.exe completely from jdk sources
ohair
parents:
715
diff
changeset
|
261 |
" The required version is $(REQUIRED_WINDOWS_VERSION). \n" \ |
2 | 262 |
" $(YOU_ARE_USING) $(WINDOWS_VERSION) \n" \ |
263 |
"" >> $(WARNING_FILE) ; \ |
|
264 |
fi |
|
265 |
endif # windows |
|
266 |
ifeq ($(PLATFORM), linux) |
|
267 |
@if [ `$(ECHO) "$(LINUX_VERSION)" | $(EGREP) -c '$(REQUIRED_LINUX_VER)'` -ne 1 ]; then \ |
|
268 |
$(ECHO) "WARNING: The build is being done on Linux $(LINUX_VERSION). \n" \ |
|
269 |
" $(THE_OFFICIAL_USES) Linux $(REQUIRED_LINUX_VER), \n" \ |
|
270 |
" specifically Linux $(REQUIRED_LINUX_FULLVER). \n" \ |
|
271 |
" The version found was '$(OS_VERSION)'. \n" \ |
|
272 |
"" >> $(WARNING_FILE) ; \ |
|
273 |
fi |
|
274 |
endif # linux |
|
275 |
endif # OPENJDK |
|
276 |
||
277 |
ifeq ($(PLATFORM), windows) |
|
278 |
sane-os_version:: sane-cygwin sane-mks sane-cygwin-shell |
|
279 |
endif |
|
280 |
||
281 |
###################################################### |
|
282 |
# Check the memory available on this machine |
|
283 |
###################################################### |
|
284 |
sane-memory_check: |
|
285 |
@if [ "$(LOW_MEMORY_MACHINE)" = "true" ]; then \ |
|
286 |
$(ECHO) "WARNING: This machine appears to only have $(MB_OF_MEMORY)Mb of physical memory, \n" \ |
|
287 |
" builds on this machine could be slow. \n" \ |
|
288 |
"" >> $(WARNING_FILE) ; \ |
|
289 |
fi |
|
290 |
||
291 |
###################################################### |
|
292 |
# Check the locale (value of LC_ALL, not being empty or ==C can be a problem) |
|
293 |
###################################################### |
|
294 |
sane-locale: |
|
295 |
ifneq ($(PLATFORM), windows) |
|
296 |
@if [ "$(LC_ALL)" != "" -a "$(LC_ALL)" != "C" ]; then \ |
|
297 |
$(ECHO) "WARNING: LC_ALL has been set to $(LC_ALL), this can cause build failures. \n" \ |
|
298 |
" Try setting LC_ALL to \"C\". \n" \ |
|
299 |
"" >> $(WARNING_FILE) ; \ |
|
300 |
fi |
|
301 |
@if [ "$(LANG)" != "" -a "$(LANG)" != "C" ]; then \ |
|
302 |
$(ECHO) "WARNING: LANG has been set to $(LANG), this can cause build failures. \n" \ |
|
303 |
" Try setting LANG to \"C\". \n" \ |
|
304 |
"" >> $(WARNING_FILE) ; \ |
|
305 |
fi |
|
306 |
endif |
|
307 |
||
308 |
###################################################### |
|
309 |
# Check the Windows cygwin version |
|
310 |
###################################################### |
|
311 |
ifeq ($(PLATFORM), windows) |
|
312 |
CYGWIN_CHECK :=$(call CheckVersions,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER)) |
|
313 |
sane-cygwin: |
|
314 |
ifdef USING_CYGWIN |
|
315 |
@if [ "$(CYGWIN_CHECK)" = "missing" ]; then \ |
|
316 |
$(ECHO) "ERROR: The CYGWIN version is undefined. \n" \ |
|
317 |
" $(THE_OFFICIAL_USES) CYGWIN $(REQUIRED_CYGWIN_VER). \n" \ |
|
318 |
"" >> $(ERROR_FILE) ; \ |
|
319 |
fi |
|
320 |
@if [ "$(CYGWIN_CHECK)" = "older" ]; then \ |
|
321 |
$(ECHO) "ERROR: The build cannot be done on CYGWIN $(CYGWIN_VER). \n" \ |
|
322 |
" Use CYGWIN $(REQUIRED_CYGWIN_VER) or higher. \n" \ |
|
323 |
"" >> $(ERROR_FILE) ; \ |
|
324 |
fi |
|
325 |
endif |
|
326 |
endif |
|
327 |
||
328 |
###################################################### |
|
329 |
# Check the cygwin shell is used, not cmd.exe |
|
330 |
###################################################### |
|
331 |
ifeq ($(PLATFORM), windows) |
|
332 |
sane-cygwin-shell: |
|
333 |
ifdef USING_CYGWIN |
|
334 |
@if [ "$(SHLVL)" = "" -a "$(_)" = "" ]; then \ |
|
335 |
$(ECHO) "ERROR: You are using an unsupported shell. \n" \ |
|
336 |
" Use either sh, bash, ksh, zsh, or tcsh. \n" \ |
|
337 |
" Using the cmd.exe utility is not supported. \n" \ |
|
338 |
" If you still want to try your current shell, \n" \ |
|
339 |
" please export SHLVL=1 when running $(MAKE). \n" \ |
|
340 |
"" >> $(ERROR_FILE) ; \ |
|
341 |
fi |
|
342 |
endif |
|
343 |
endif |
|
344 |
||
345 |
###################################################### |
|
346 |
# Check the Windows mks version |
|
347 |
###################################################### |
|
348 |
ifeq ($(PLATFORM), windows) |
|
349 |
MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER)) |
|
350 |
sane-mks: |
|
351 |
ifndef USING_CYGWIN |
|
352 |
@if [ "$(MKS_CHECK)" = "missing" ]; then \ |
|
353 |
$(ECHO) "ERROR: The MKS version is undefined. \n" \ |
|
354 |
" $(THE_OFFICIAL_USES) MKS $(REQUIRED_MKS_VER). \n" \ |
|
355 |
"" >> $(ERROR_FILE) ; \ |
|
356 |
fi |
|
357 |
@if [ "$(MKS_CHECK)" = "older" ]; then \ |
|
358 |
$(ECHO) "ERROR: The build cannot be done on MKS $(MKS_VER). \n" \ |
|
359 |
" Use MKS $(REQUIRED_MKS_VER) or higher. \n" \ |
|
360 |
"" >> $(ERROR_FILE) ; \ |
|
361 |
fi |
|
362 |
endif |
|
363 |
endif |
|
364 |
||
365 |
###################################################### |
|
366 |
# Get list of installed patches (this file has a particular format) |
|
367 |
###################################################### |
|
368 |
$(INSTALL_PATCHES_FILE): |
|
369 |
@$(prep-target) |
|
370 |
ifeq ($(PLATFORM), solaris) |
|
371 |
ifeq ($(OS_VERSION),$(REQUIRED_OS_VERSION)) |
|
372 |
$(SHOWREV) -p > $@ 2>&1 |
|
373 |
endif |
|
374 |
endif |
|
375 |
@$(ECHO) "" >> $@ |
|
376 |
||
377 |
###################################################### |
|
378 |
# Check list of Solaris patches |
|
379 |
###################################################### |
|
380 |
sane-os_patch_level: $(INSTALL_PATCHES_FILE) |
|
381 |
ifeq ($(PLATFORM), solaris) |
|
382 |
ifeq ($(OS_VERSION),$(REQUIRED_OS_VERSION)) |
|
383 |
@$(NAWK) 'BEGIN { \ |
|
384 |
readingInstallPatches = 0; \ |
|
385 |
requiredCount = 0; \ |
|
386 |
installCount = 0; \ |
|
387 |
} \ |
|
388 |
{ \ |
|
389 |
if (readingInstallPatches) { \ |
|
390 |
if ($$1=="Patch:") { \ |
|
391 |
ns = split($$2,parts,"-"); \ |
|
392 |
installPatchNo[installCount]=parts[1]; \ |
|
393 |
installPatchRev[installCount]=parts[2]; \ |
|
394 |
installCount++; \ |
|
395 |
} \ |
|
396 |
} \ |
|
397 |
\ |
|
398 |
if (!readingInstallPatches) { \ |
|
399 |
if (index($$1,"#") != 0) continue; \ |
|
400 |
if (match($$1,"BUILD") > 0 \ |
|
401 |
&& $$2 == $(OS_VERSION) \ |
|
402 |
&& ($$7 == "REQ" || $$7 == "req") \ |
|
403 |
&& $(PATCH_POSITION) != "none" \ |
|
404 |
&& $(PATCH_POSITION) != "NONE") { \ |
|
405 |
ns = split($(PATCH_POSITION),parts,"-"); \ |
|
406 |
requiredPatchNo[requiredCount]=parts[1]; \ |
|
407 |
requiredPatchRev[requiredCount]=parts[2]; \ |
|
408 |
requiredCount++; \ |
|
409 |
} \ |
|
410 |
} \ |
|
411 |
} \ |
|
412 |
END { \ |
|
413 |
errorCount=0; \ |
|
414 |
for (i=0; i<requiredCount; i++) { \ |
|
415 |
foundMatch = 0; \ |
|
416 |
for (j=0; j<installCount; j++) { \ |
|
417 |
if (installPatchNo[j] == requiredPatchNo[i] \ |
|
418 |
&& installPatchRev[j] >= requiredPatchRev[i]) { \ |
|
419 |
foundMatch = 1; \ |
|
420 |
break; \ |
|
421 |
} \ |
|
422 |
} \ |
|
423 |
if ( foundMatch == 0) { \ |
|
424 |
printf("WARNING: Your solaris install is missing the required patch %s-%s\n", requiredPatchNo[i], requiredPatchRev[i] ); \ |
|
425 |
printf(" Please update your your system patches or build on a different machine.\n\n" ); \ |
|
426 |
errorCount++; \ |
|
427 |
} \ |
|
428 |
} \ |
|
429 |
}' $(REQ_PATCH_LIST) readingInstallPatches=1 $(INSTALL_PATCHES_FILE) >> $(WARNING_FILE) |
|
430 |
endif |
|
431 |
endif # PLATFORM |
|
432 |
||
433 |
###################################################### |
|
434 |
# CLASSPATH cannot be set, unless you are insane. |
|
435 |
###################################################### |
|
436 |
sane-classpath: |
|
437 |
ifdef CLASSPATH |
|
438 |
@$(ECHO) "ERROR: Your CLASSPATH environment variable is set. This will \n" \ |
|
439 |
" most likely cause the build to fail. Please unset it \n" \ |
|
440 |
" and start your build again. \n" \ |
|
441 |
"" >> $(ERROR_FILE) |
|
442 |
endif |
|
443 |
||
444 |
###################################################### |
|
445 |
# JAVA_HOME cannot be set, unless you are insane. |
|
446 |
###################################################### |
|
447 |
sane-java_home: |
|
448 |
ifdef JAVA_HOME |
|
449 |
@$(ECHO) "ERROR: Your JAVA_HOME environment variable is set. This will \n" \ |
|
450 |
" most likely cause the build to fail. Please unset it \n" \ |
|
451 |
" and start your build again. \n" \ |
|
452 |
"" >> $(ERROR_FILE) |
|
453 |
endif |
|
454 |
||
455 |
###################################################### |
|
456 |
# Make sure the fonts are there |
|
457 |
# Exceptions are when explicitly building OPENJDK, or |
|
458 |
# when the entire CLOSED_SRC dir is excluded, so we are |
|
459 |
# implicitly building OPENJDK |
|
460 |
###################################################### |
|
461 |
FONT_FILE=$(CLOSED_SRC)/share/lib/fonts/LucidaTypewriterRegular.ttf |
|
462 |
sane-fonts: |
|
463 |
ifndef OPENJDK |
|
464 |
@if [ -d $(CLOSED_SRC) ] ; then \ |
|
465 |
if [ ! -f $(FONT_FILE) ] ; then \ |
|
466 |
$(ECHO) "ERROR: Missing $(FONT_FILE). \n" \ |
|
467 |
" Verify you have downloaded and overlayed on the source area all the binary files. \n" \ |
|
468 |
"" >> $(ERROR_FILE); \ |
|
469 |
fi \ |
|
470 |
fi |
|
471 |
endif |
|
472 |
||
473 |
###################################################### |
|
474 |
# If building OPENJDK check pre-built binaries are |
|
475 |
# available for binary plug source components. |
|
476 |
###################################################### |
|
477 |
ifdef OPENJDK |
|
478 |
sane-binary-plugs: |
|
479 |
@if [ ! -d "$(BINARY_PLUGS_PATH)" ]; then \ |
|
480 |
$(ECHO) "ERROR: Can't locate pre-built libraries. \n" \ |
|
481 |
" Please check your access to \n" \ |
|
482 |
" $(BINARY_PLUGS_PATH) \n" \ |
|
483 |
" and/or check your value of ALT_BINARY_PLUGS_PATH. \n" \ |
|
484 |
"" >> $(ERROR_FILE); \ |
|
485 |
fi |
|
486 |
endif |
|
487 |
||
488 |
###################################################### |
|
489 |
# VARIANT must be set to DBG or OPT |
|
490 |
###################################################### |
|
491 |
sane-variant: |
|
492 |
@if [ "$(VARIANT)" != DBG -a "$(VARIANT)" != OPT ] ; then \ |
|
493 |
$(ECHO) "ERROR: Your VARIANT environment variable is set to $(VARIANT). \n" \ |
|
494 |
" Needs to be set to DBG or OPT \n" \ |
|
495 |
"" >> $(ERROR_FILE); \ |
|
496 |
fi |
|
497 |
||
498 |
###################################################### |
|
499 |
# LD_LIBRARY_PATH should not be set, unless you are insane. |
|
500 |
###################################################### |
|
501 |
sane-ld_library_path: |
|
502 |
ifdef LD_LIBRARY_PATH |
|
503 |
@$(ECHO) "ERROR: Your LD_LIBRARY_PATH environment variable is set. This may \n" \ |
|
504 |
" produce binaries binaries incorrectly. Please unset it \n" \ |
|
505 |
" and start your build again. \n" \ |
|
506 |
"" >> $(ERROR_FILE) |
|
507 |
endif |
|
508 |
||
509 |
###################################################### |
|
510 |
# LD_LIBRARY_PATH_64 should not be set, unless you are insane. |
|
511 |
###################################################### |
|
512 |
sane-ld_library_path_64: |
|
513 |
ifdef LD_LIBRARY_PATH_64 |
|
514 |
@$(ECHO) "ERROR: Your LD_LIBRARY_PATH_64 environment variable is set. This may \n" \ |
|
515 |
" produce binaries binaries incorrectly. Please unset it \n" \ |
|
516 |
" and start your build again. \n" \ |
|
517 |
"" >> $(ERROR_FILE) |
|
518 |
endif |
|
519 |
||
520 |
###################################################### |
|
521 |
# LD_OPTIONS should not be set, unless you are insane. |
|
522 |
###################################################### |
|
523 |
sane-ld_options: |
|
524 |
ifdef LD_OPTIONS |
|
525 |
@$(ECHO) "ERROR: Your LD_OPTIONS environment variable is set. This may \n" \ |
|
526 |
" produce binaries binaries incorrectly. Please unset it \n" \ |
|
527 |
" and start your build again. \n" \ |
|
528 |
"" >> $(ERROR_FILE) |
|
529 |
endif |
|
530 |
||
531 |
###################################################### |
|
532 |
# LD_RUN_PATH should not be set, unless you are insane. |
|
533 |
###################################################### |
|
534 |
sane-ld_run_path: |
|
535 |
ifdef LD_RUN_PATH |
|
536 |
@$(ECHO) "ERROR: Your LD_RUN_PATH environment variable is set. This may \n" \ |
|
537 |
" produce binaries binaries incorrectly. Please unset it \n" \ |
|
538 |
" produce binaries binaries incorrectly. Please unset it \n" \ |
|
539 |
" and start your build again. \n" \ |
|
540 |
"" >> $(ERROR_FILE) |
|
541 |
endif |
|
542 |
||
543 |
###################################################### |
|
544 |
# MAKEFLAGS cannot be set, unless you are insane. |
|
545 |
###################################################### |
|
546 |
ifeq ($(PLATFORM), windows) |
|
547 |
ifdef USING_CYGWIN |
|
548 |
REAL_MAKEFLAGS:=$(subst --unix,,$(MAKEFLAGS)) |
|
549 |
else |
|
550 |
REAL_MAKEFLAGS:=$(MAKEFLAGS) |
|
551 |
endif |
|
552 |
else |
|
553 |
REAL_MAKEFLAGS:=$(MAKEFLAGS) |
|
554 |
endif |
|
555 |
sane-makeflags: |
|
556 |
# ifneq ($(strip $(REAL_MAKEFLAGS)),) |
|
557 |
ifeq ($(origin MAKEFLAGS),environment) |
|
558 |
@# |
|
559 |
@# it is unacceptable to have the-e or --environment-overrides value in MAKEFLAGS |
|
560 |
@# |
|
561 |
@if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(e|--environment-overrides)( |$$)'` -ne 0 ]; then \ |
|
562 |
$(ECHO) "ERROR: Either the build was started with the flag -e or \n" \ |
|
563 |
" --environment-overrides, or the MAKEFLAGS environment \n" \ |
|
564 |
" variable has this value set. This will cause any \n" \ |
|
565 |
" environment variables you have defined to override \n" \ |
|
566 |
" the values defined by the makefiles. This practice is \n" \ |
|
567 |
" not recommemded by the authors of GNU Make, and \n" \ |
|
568 |
" will lead to an improper build. \n" \ |
|
569 |
" Please fix and restart the build. \n" \ |
|
570 |
"" >> $(ERROR_FILE) ; \ |
|
571 |
fi |
|
572 |
@# |
|
573 |
@# it is unacceptable to havethe -i or --ignore-errors value in MAKEFLAGS |
|
574 |
@# |
|
575 |
@if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(i|--ignore-errors)( |$$)'` -ne 0 ]; then \ |
|
576 |
$(ECHO) "ERROR: Either the build was started with the flag -i or \n" \ |
|
577 |
" --ignore-errors, or the MAKEFLAGS environment \n" \ |
|
578 |
" variable has this value set. 1111 You will be unable \n" \ |
|
579 |
" to determine if the build is broken or not. \n" \ |
|
580 |
" Please fix and restart the build. \n" \ |
|
581 |
"" >> $(ERROR_FILE) ; \ |
|
582 |
fi |
|
583 |
@# |
|
584 |
@# it is unacceptable to have the -I or --include-dir value in MAKEFLAGS |
|
585 |
@# |
|
586 |
@if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(I|--include-dir)( |$$)'` -ne 0 ]; then \ |
|
587 |
$(ECHO) "ERROR: Either the build was started with the flag -I or \n" \ |
|
588 |
" --include-dir, or the MAKEFLAGS environment \n" \ |
|
589 |
" variable has this value set. This will render your \n" \ |
|
590 |
" build questionable as not all the rules and depenencies \n" \ |
|
591 |
" are captured by the build. \n" \ |
|
592 |
" Please fix and restart the build. \n" \ |
|
593 |
"" >> $(ERROR_FILE) ; \ |
|
594 |
fi |
|
595 |
@# |
|
596 |
@# it is unacceptable to have the -k or --keep-going value in MAKEFLAGS: |
|
597 |
@# |
|
598 |
@if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(k|--keep-going)( |$$)'` -ne 0 ]; then \ |
|
599 |
$(ECHO) "ERROR: Either the build was started with the flag -k or \n" \ |
|
600 |
" --keep-going, or the MAKEFLAGS environment \n" \ |
|
601 |
" variable has this value set. 222 You will be unable \n" \ |
|
602 |
" to determine if the build is broken or not. \n" \ |
|
603 |
" Please fix and restart the build. \n" \ |
|
604 |
"" >> $(ERROR_FILE) ; \ |
|
605 |
fi |
|
606 |
@# |
|
607 |
@# it is unacceptable to have the -o or --assume-old or --old-filevalue in MAKEFLAGS: |
|
608 |
@# Note - this rule never gets invoked because it is processed out |
|
609 |
@# in GNU Make startup |
|
610 |
@# |
|
611 |
@if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(o|--assume-old|--old-file)( |$$)'` -ne 0 ]; then \ |
|
612 |
$(ECHO) "ERROR: Either the build was started with the flag -o or \n" \ |
|
613 |
" --assume-old or --old-file, or the MAKEFLAGS environment \n" \ |
|
614 |
" variable has this value set. This could prevent the \n" \ |
|
615 |
" build from executing rules it should, thus rendering a \n" \ |
|
616 |
" questionable result. \n" \ |
|
617 |
" Please fix and restart the build. \n" \ |
|
618 |
"" >> $(ERROR_FILE) ; \ |
|
619 |
fi |
|
620 |
@# |
|
621 |
@# it is unacceptable to have the -r or --nobuiltin-rules value in MAKEFLAGS |
|
622 |
@# |
|
623 |
@if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(r|--no-builtin-rules)( |$$)'` -ne 0 ]; then \ |
|
624 |
$(ECHO) "ERROR: Either the build was started with the flag -r or \n" \ |
|
625 |
" --no-builtin-rules, or the MAKEFLAGS environment \n" \ |
|
626 |
" variable has this value set. This may break the build \n" \ |
|
627 |
" by not allowing builtin rules that may be required. \n" \ |
|
628 |
" Please fix and restart the build. \n" \ |
|
629 |
"" >> $(ERROR_FILE) ; \ |
|
630 |
fi |
|
631 |
@# |
|
632 |
@# it is unacceptable to have the -t or --touch value in MAKEFLAGS |
|
633 |
@# Note - this rule never gets invoked because it is processed out |
|
634 |
@# in GNU Make startup |
|
635 |
@# |
|
636 |
@if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(t|--touch)( |$$)'` -ne 0 ]; then \ |
|
637 |
$(ECHO) "ERROR: Either the build was started with the flag -t or \n" \ |
|
638 |
" --touch, or the MAKEFLAGS environment \n" \ |
|
639 |
" variable has this value set. This will leave the \n" \ |
|
640 |
" build in a unclear state and could lead to not executing \n" \ |
|
641 |
" rules which should be executed. \n" \ |
|
642 |
" Please fix and restart the build. \n" \ |
|
643 |
"" >> $(ERROR_FILE) ; \ |
|
644 |
fi |
|
645 |
@# |
|
646 |
@# show what is in MAKEFLAGS so the user is aware... |
|
647 |
@# |
|
648 |
@$(ECHO) "WARNING: Your MAKEFLAGS environment variable is set. \n" \ |
|
649 |
" You should be very careful about the values set here. \n" \ |
|
650 |
"\n" \ |
|
651 |
" MAKEFLAGS is set to =>$(MAKEFLAGS)<= \n" \ |
|
652 |
"" >> $(WARNING_FILE) |
|
653 |
endif |
|
654 |
||
655 |
###################################################### |
|
656 |
# if specified, ALT_OUTPUTDIR must point to non-relative path if set |
|
657 |
###################################################### |
|
658 |
sane-alt_outputdir: |
|
659 |
ifdef ALT_OUTPUTDIR |
|
660 |
@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \ |
|
661 |
$(ECHO) "ERROR: ALT_OUTPUTDIR must be an Absolute Path Name, \n" \ |
|
662 |
" not a Relative Path Name. \n" \ |
|
663 |
"" >> $(ERROR_FILE) ; \ |
|
664 |
fi |
|
665 |
ifeq ($(PLATFORM), windows) |
|
666 |
@if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)'` -ne 1 ]; then \ |
|
667 |
$(ECHO) "ERROR: On windows, ALT_OUTPUTDIR must contain the drive letter. \n" \ |
|
668 |
"" >> $(ERROR_FILE) ; \ |
|
669 |
fi |
|
670 |
endif |
|
671 |
endif |
|
672 |
||
673 |
###################################################### |
|
674 |
# OUTPUTDIR tests |
|
675 |
###################################################### |
|
676 |
sane-outputdir: |
|
677 |
@# |
|
678 |
@# OUTPUTDIR must be a directory... |
|
679 |
@# |
|
680 |
@if [ ! -d "$(OUTPUTDIR)" ]; then \ |
|
681 |
$(ECHO) "ERROR: OUTPUTDIR must be an existing directory. The current \n" \ |
|
682 |
" value of OUTPUTDIR is \n" \ |
|
683 |
" $(OUTPUTDIR) \n" \ |
|
684 |
" Please check your value of ALT_OUTPUTDIR. \n" \ |
|
685 |
"" >> $(ERROR_FILE) ; \ |
|
686 |
fi |
|
687 |
@# |
|
688 |
@# OUTPUTDIR must be writeable by user... |
|
689 |
@# |
|
690 |
@if [ ! -w "$(OUTPUTDIR)" ]; then \ |
|
691 |
$(ECHO) "ERROR: You must have write permissions to OUTPUTDIR. The \n" \ |
|
692 |
" current value of OUTPUTDIR is \n" \ |
|
693 |
" $(OUTPUTDIR) \n" \ |
|
694 |
" Either obtain these permissions or set ALT_OUTPUTDIR. \n" \ |
|
695 |
"" >> $(ERROR_FILE) ; \ |
|
696 |
fi |
|
697 |
@# |
|
698 |
@# OUTPUTDIR must have enough free space... |
|
699 |
@# |
|
700 |
@if [ $(FREE_SPACE) -lt $(REQUIRED_FREE_SPACE) ]; then \ |
|
701 |
$(ECHO) "WARNING: You may not have enough free space in your OUTPUTDIR. The \n" \ |
|
702 |
" current value of OUTPUTDIR is \n" \ |
|
703 |
" $(OUTPUTDIR) \n" \ |
|
704 |
" You need "$(REQUIRED_FREE_SPACE)" Kbytes free on this device to build \n" \ |
|
705 |
" and it appears that only "$(FREE_SPACE)" Kbytes are free. \n" \ |
|
706 |
" Either obtain more space or set ALT_OUTPUTDIR to a larger disk. \n" \ |
|
707 |
"" >> $(WARNING_FILE) ; \ |
|
708 |
fi |
|
709 |
||
710 |
###################################################### |
|
711 |
# if specified, ALT_BOOTDIR must point to non-relative path if set |
|
712 |
###################################################### |
|
713 |
sane-alt_bootdir: |
|
714 |
ifdef ALT_BOOTDIR |
|
715 |
@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \ |
|
716 |
$(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \ |
|
717 |
" not a Relative Path Name. \n" \ |
|
718 |
" The current value of ALT_BOOTDIR is \n" \ |
|
719 |
" $(ALT_BOOTDIR) \n" \ |
|
720 |
" Please fix this and continue your build. \n" \ |
|
721 |
"" >> $(ERROR_FILE) ; \ |
|
722 |
fi |
|
723 |
endif |
|
724 |
||
725 |
###################################################### |
|
726 |
# BOOTDIR must point to a valid JDK. |
|
727 |
###################################################### |
|
728 |
BOOT_CHECK :=$(call CheckVersions,$(BOOT_VER),$(REQUIRED_BOOT_VER)) |
|
729 |
sane-bootdir: |
|
730 |
@if [ "$(BOOT_CHECK)" != "same" -a "$(BOOT_CHECK)" != "newer" ]; then \ |
|
731 |
$(ECHO) "ERROR: Your BOOTDIR environment variable does not point \n" \ |
|
732 |
" to a valid JDK for bootstrapping this build. \n" \ |
|
733 |
" A JDK $(JDK_MINOR_VERSION) $(MARKET_NAME) build must be bootstrapped using \n" \ |
|
734 |
" JDK $(PREVIOUS_JDK_VERSION) fcs (or later). \n" \ |
|
735 |
" Apparently, your bootstrap JDK is version $(BOOT_VER) \n" \ |
|
736 |
" Please update your ALT_BOOTDIR setting and start your build again. \n" \ |
|
737 |
"" >> $(ERROR_FILE) ; \ |
|
738 |
fi |
|
739 |
||
740 |
###################################################### |
|
741 |
# CACERTS_FILE must be absoulte path and readable |
|
742 |
###################################################### |
|
743 |
sane-cacerts: |
|
744 |
ifdef ALT_CACERTS_FILE |
|
745 |
@if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \ |
|
746 |
$(ECHO) "ERROR: ALT_CACERTS_FILE must be an Absolute Path Name, \n" \ |
|
747 |
" not a Relative Path Name. \n" \ |
|
748 |
" The current value of ALT_CACERTS_FILE is \n" \ |
|
749 |
" $(ALT_CACERTS_FILE) \n" \ |
|
750 |
" Please fix this and continue your build. \n" \ |
|
751 |
"" >> $(ERROR_FILE) ; \ |
|
752 |
fi |
|
753 |
endif |
|
754 |
@# |
|
755 |
@# CACERTS_FILE must be readable |
|
756 |
@# |
|
757 |
@if [ ! -r "$(subst \,/,$(CACERTS_FILE))" ]; then \ |
|
758 |
$(ECHO) "ERROR: You do not have access to a valid cacerts file. \n" \ |
|
759 |
" Please check your access to \n" \ |
|
760 |
" $(subst \,/,$(CACERTS_FILE)) \n" \ |
|
761 |
" and/or check your value of ALT_CACERTS_FILE. \n" \ |
|
762 |
"" >> $(ERROR_FILE) ; \ |
|
763 |
fi |
|
764 |
@# |
|
765 |
@# CACERTS_FILE must be a file |
|
766 |
@# |
|
767 |
@if [ -d "$(subst \,/,$(CACERTS_FILE))" ]; then \ |
|
768 |
$(ECHO) "ERROR: You do not have access to a valid cacerts file.\n" \ |
|
769 |
" The value of CACERTS_FILE must point to a normal file.\n" \ |
|
770 |
" Please check your access to \n" \ |
|
771 |
" $(subst \,/,$(CACERTS_FILE)) \n" \ |
|
772 |
" and/or check your value of ALT_CACERTS_FILE. \n" \ |
|
773 |
"" >> $(ERROR_FILE) ; \ |
|
774 |
fi |
|
775 |
||
776 |
||
777 |
###################################################### |
|
778 |
# Check for availability of FreeType (OpenJDK specific) |
|
779 |
###################################################### |
|
780 |
||
781 |
ifdef OPENJDK |
|
782 |
||
305
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
783 |
# The freetypecheck Makefile prints out "Failed" if not good enough |
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
784 |
$(TEMPDIR)/freetypeinfo: FRC |
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
785 |
@$(prep-target) |
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
786 |
@(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \ |
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
787 |
$(ECHO) "Failed to build freetypecheck." ) > $@ |
2 | 788 |
|
305
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
789 |
sane-freetype: $(TEMPDIR)/freetypeinfo |
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
790 |
@if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \ |
2 | 791 |
$(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \ |
305
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
792 |
" or higher is required. \n" \ |
9b905a071b0e
6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents:
142
diff
changeset
|
793 |
"`$(CAT) $<` \n" >> $(ERROR_FILE) ; \ |
2 | 794 |
fi |
795 |
||
796 |
else |
|
797 |
#do nothing (not OpenJDK) |
|
798 |
sane-freetype: |
|
799 |
endif |
|
800 |
||
801 |
###################################################### |
|
802 |
# CUPS_HEADERS_PATH must be valid |
|
803 |
###################################################### |
|
804 |
sane-cups: |
|
805 |
ifneq ($(PLATFORM), windows) |
|
806 |
@if [ ! -r $(CUPS_HEADERS_PATH)/cups/cups.h ]; then \ |
|
807 |
$(ECHO) "ERROR: You do not have access to valid Cups header files. \n" \ |
|
808 |
" Please check your access to \n" \ |
|
809 |
" $(CUPS_HEADERS_PATH)/cups/cups.h \n" \ |
|
810 |
" and/or check your value of ALT_CUPS_HEADERS_PATH, \n" \ |
|
811 |
" CUPS is frequently pre-installed on many systems, \n" \ |
|
812 |
" or may be downloaded from http://www.cups.org \n" \ |
|
813 |
"" >> $(ERROR_FILE) ; \ |
|
814 |
fi |
|
815 |
endif |
|
816 |
||
817 |
###################################################### |
|
818 |
# Check for existence of DEVTOOLS_PATH |
|
819 |
###################################################### |
|
820 |
sane-devtools_path: |
|
821 |
@if [ "$(DEVTOOLS_PATH)" != "" -a ! -r "$(DEVTOOLS_PATH)" ]; then \ |
|
822 |
$(ECHO) "ERROR: You do not have a valid DEVTOOLS_PATH setting. \n" \ |
|
823 |
" Please check your access to \n" \ |
|
824 |
" $(DEVTOOLS_PATH) \n" \ |
|
825 |
" and/or check your value of ALT_DEVTOOLS_PATH. \n" \ |
|
826 |
"" >> $(ERROR_FILE) ; \ |
|
827 |
fi |
|
828 |
||
829 |
###################################################### |
|
830 |
# Check for existence of MS_RUNTIME_LIBRARIES |
|
831 |
###################################################### |
|
832 |
sane-msvcrt_path: |
|
833 |
ifeq ($(PLATFORM), windows) |
|
834 |
@if [ ! -r "$(MSVCRT_DLL_PATH)/msvcrt.dll" ]; then \ |
|
835 |
$(ECHO) "ERROR: You do not have access to msvcrt.dll. \n" \ |
|
836 |
" Please check your access to \n" \ |
|
837 |
" $(MSVCRT_DLL_PATH) \n" \ |
|
838 |
" and/or check your value of ALT_MSVCRT_DLL_PATH. \n" \ |
|
839 |
"" >> $(ERROR_FILE) ; \ |
|
840 |
fi |
|
841 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
842 |
ifeq ($(COMPILER_VERSION), VS2003) |
|
843 |
@if [ ! -r "$(MSVCR71_DLL_PATH)/msvcr71.dll" ]; then \ |
|
844 |
$(ECHO) "ERROR: You do not have access to msvcr71.dll. \n" \ |
|
845 |
" Please check your access to \n" \ |
|
846 |
" $(MSVCR71_DLL_PATH) \n" \ |
|
847 |
" and/or check your value of ALT_MSVCR71_DLL_PATH. \n" \ |
|
848 |
"" >> $(ERROR_FILE) ; \ |
|
849 |
fi |
|
850 |
endif |
|
851 |
endif |
|
852 |
endif |
|
853 |
||
854 |
###################################################### |
|
855 |
# Check for existence of COMPILER_PATH |
|
856 |
###################################################### |
|
857 |
sane-compiler_path: |
|
858 |
@if [ "$(COMPILER_PATH)" != "" -a ! -r "$(COMPILER_PATH)" ]; then \ |
|
859 |
$(ECHO) "ERROR: You do not have a valid COMPILER_PATH setting. \n" \ |
|
860 |
" Please check your access to \n" \ |
|
861 |
" $(COMPILER_PATH) \n" \ |
|
862 |
" and/or check your value of ALT_COMPILER_PATH. \n" \ |
|
863 |
"" >> $(ERROR_FILE) ; \ |
|
864 |
fi |
|
865 |
||
866 |
###################################################### |
|
867 |
# Check for existence of UNIXCOMMAND_PATH |
|
868 |
###################################################### |
|
869 |
sane-unixcommand_path: |
|
870 |
@if [ "$(UNIXCOMMAND_PATH)" != "" -a ! -r "$(UNIXCOMMAND_PATH)" ]; then \ |
|
871 |
$(ECHO) "ERROR: You do not have a valid UNIXCOMMAND_PATH setting. \n" \ |
|
872 |
" Please check your access to \n" \ |
|
873 |
" $(UNIXCOMMAND_PATH) \n" \ |
|
874 |
" and/or check your value of ALT_UNIXCOMMAND_PATH. \n" \ |
|
875 |
"" >> $(ERROR_FILE) ; \ |
|
876 |
fi |
|
877 |
ifeq ($(PLATFORM), windows) |
|
878 |
@for utility in cpio ar file m4 ; do \ |
|
879 |
if [ ! -r "`$(WHICH) $${utility}`" ]; then \ |
|
880 |
$(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \ |
|
881 |
" directory $(UNIXCOMMAND_PATH). \n" \ |
|
882 |
" The utilities cpio, ar, file, and m4 are required. \n" \ |
|
883 |
"" >> $(WARNING_FILE) ; \ |
|
884 |
fi; \ |
|
885 |
done |
|
886 |
endif |
|
887 |
||
888 |
###################################################### |
|
889 |
# Check for existence of USRBIN_PATH on linux |
|
890 |
###################################################### |
|
891 |
sane-usrbin_path: |
|
892 |
ifeq ($(PLATFORM), linux) |
|
893 |
@if [ "$(USRBIN_PATH)" != "" -a ! -r "$(USRBIN_PATH)" ]; then \ |
|
894 |
$(ECHO) "ERROR: You do not have a valid USRBIN_PATH setting. \n" \ |
|
895 |
" Please check your access to \n" \ |
|
896 |
" $(USRBIN_PATH) \n" \ |
|
897 |
" and/or check your value of ALT_USRBIN_PATH. \n" \ |
|
898 |
"" >> $(ERROR_FILE) ; \ |
|
899 |
fi |
|
900 |
endif |
|
901 |
||
902 |
###################################################### |
|
903 |
# Check for existence of UNIXCCS_PATH on solaris |
|
904 |
###################################################### |
|
905 |
sane-unixccs_path: |
|
906 |
ifeq ($(PLATFORM), solaris) |
|
907 |
@if [ "$(UNIXCCS_PATH)" != "" -a ! -r "$(UNIXCCS_PATH)" ]; then \ |
|
908 |
$(ECHO) "ERROR: You do not have a valid UNIXCCS_PATH setting. \n" \ |
|
909 |
" Please check your access to \n" \ |
|
910 |
" $(UNIXCCS_PATH) \n" \ |
|
911 |
" and/or check your value of ALT_UNIXCCS_PATH. \n" \ |
|
912 |
"" >> $(ERROR_FILE) ; \ |
|
913 |
fi |
|
914 |
endif |
|
915 |
||
916 |
###################################################### |
|
917 |
# Verify the docs directory exists |
|
918 |
###################################################### |
|
919 |
sane-docs_import: |
|
920 |
@if [ ! -d "$(HOTSPOT_DOCS_IMPORT_PATH)" ]; then \ |
|
921 |
$(ECHO) "WARNING: The directory HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_DOCS_IMPORT_PATH) \n" \ |
|
922 |
" does not exist, check your value of ALT_HOTSPOT_DOCS_IMPORT_PATH. \n" \ |
|
923 |
"" >> $(WARNING_FILE) ; \ |
|
924 |
fi |
|
925 |
||
926 |
###################################################### |
|
927 |
# Check for possible problem regarding __fabsf, math_iso.h and the libm patch. |
|
928 |
# Hotspot should have been changed in Mustang 6.0 Build 47 to not depend |
|
929 |
# on __fabsf, this is just checking that fact now. |
|
930 |
###################################################### |
|
931 |
sane-math_iso: |
|
932 |
ifeq ($(PLATFORM), solaris) |
|
933 |
@if [ -f $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \ |
|
934 |
if [ "`$(NM) $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) | $(GREP) __fabsf`" != "" ]; then \ |
|
935 |
$(ECHO) "WARNING: This version of hotspot relies on __fabsf \n" \ |
|
936 |
" which is not always available on Solaris 8 and 9 machines \n" \ |
|
937 |
" unless they have the latest libm patch and the file \n" \ |
|
938 |
" /usr/include/iso/math_iso.h which can trigger this dependency.\n" \ |
|
939 |
" Hotspot should NOT be dependent on this extern, check the \n" \ |
|
940 |
" version of the hotspot library you are using. \n" \ |
|
941 |
"" >> $(WARNING_FILE) ; \ |
|
942 |
fi; \ |
|
943 |
fi |
|
944 |
endif |
|
945 |
||
946 |
###################################################### |
|
947 |
# Check for possible patch problem regarding /usr/lib/libCrun.so |
|
948 |
###################################################### |
|
949 |
sane-libCrun: |
|
950 |
ifeq ($(PLATFORM), solaris) |
|
951 |
@if [ "`$(NM) /usr/lib/libCrun.so.1 | $(GREP) __1c2n6FIpv_0_`" = "" ]; then \ |
|
952 |
$(ECHO) "WARNING: The file /usr/lib/libCrun.so.1 is missing the extern \n" \ |
|
953 |
" __1c2n6FIpv_0_ which indicates that the system is missing \n" \ |
|
954 |
" a required Solaris patch, or you are using a pre-FCS release \n" \ |
|
955 |
" of Solaris 10. You need the latest /usr/lib/libCrun.so.1 \n" \ |
|
956 |
" which comes with the FCS release of Solaris 10 and available \n" \ |
|
957 |
" through the latest Solaris 8 or 9 C++ runtime patches. \n" \ |
|
958 |
"" >> $(WARNING_FILE) ; \ |
|
959 |
fi |
|
960 |
endif |
|
961 |
||
962 |
###################################################### |
|
963 |
# Check for existence of MSDEVTOOLS_PATH on windows |
|
964 |
###################################################### |
|
965 |
sane-msdevtools_path: |
|
966 |
ifeq ($(PLATFORM), windows) |
|
967 |
@if [ "$(MSDEVTOOLS_PATH)" != "" -a ! -r "$(MSDEVTOOLS_PATH)" ]; then \ |
|
968 |
$(ECHO) "ERROR: You do not have a valid MSDEVTOOLS_PATH setting. \n" \ |
|
969 |
" Please check your access to \n" \ |
|
970 |
" $(MSDEVTOOLS_PATH) \n" \ |
|
971 |
" and/or check your value of ALT_MSDEVTOOLS_PATH. \n" \ |
|
972 |
"" >> $(ERROR_FILE) ; \ |
|
973 |
fi |
|
974 |
endif |
|
975 |
||
976 |
###################################################### |
|
977 |
# Check for existence of Hotspot binaries |
|
978 |
###################################################### |
|
979 |
sane-hotspot_binaries: |
|
980 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
981 |
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \ |
|
982 |
$(ECHO) "ERROR: HOTSPOT_CLIENT_PATH does not point to a valid HotSpot VM. \n" \ |
|
983 |
" Please check your access to \n" \ |
|
984 |
" $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \ |
|
985 |
" and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ |
|
986 |
"" >> $(ERROR_FILE) ; \ |
|
987 |
fi |
|
988 |
endif |
|
989 |
@if [ ! -r $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \ |
|
990 |
$(ECHO) "ERROR: HOTSPOT_SERVER_PATH does not point to a valid HotSpot VM. \n" \ |
|
991 |
" Please check your access to \n" \ |
|
992 |
" $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \ |
|
993 |
" and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ |
|
994 |
"" >> $(ERROR_FILE) ; \ |
|
995 |
fi |
|
996 |
@# |
|
997 |
@# Check value of HOTSPOT_LIB_PATH |
|
998 |
@# |
|
999 |
ifeq ($(PLATFORM), windows) |
|
1000 |
@if [ ! -r $(HOTSPOT_LIB_PATH)/jvm.lib ]; then \ |
|
1001 |
$(ECHO) "ERROR: HOTSPOT_LIB_PATH does not point to a valid HotSpot library. \n" \ |
|
1002 |
" Please check your access to \n" \ |
|
1003 |
" $(HOTSPOT_LIB_PATH)/jvm.lib \n" \ |
|
1004 |
" and/or check your value of ALT_HOTSPOT_LIB_PATH. \n" \ |
|
1005 |
"" >> $(ERROR_FILE) ; \ |
|
1006 |
fi |
|
1007 |
@# |
|
1008 |
@# Check for the .map files - its OK if they are not there.. |
|
1009 |
@# |
|
1010 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
1011 |
@# There is no 64-bit HotSpot client VM |
|
1012 |
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.map ]; then \ |
|
1013 |
$(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .map files. \n" \ |
|
1014 |
" These files are optional and aid in the debugging of the JVM. \n" \ |
|
1015 |
" Please check your access to \n" \ |
|
1016 |
" $(HOTSPOT_CLIENT_PATH)/jvm.map \n" \ |
|
1017 |
" and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ |
|
1018 |
"" >> $(WARNING_FILE) ; \ |
|
1019 |
fi |
|
1020 |
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.pdb ]; then \ |
|
1021 |
$(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .pdb files. \n" \ |
|
1022 |
" These files are optional and aid in the debugging of the JVM. \n" \ |
|
1023 |
" Please check your access to \n" \ |
|
1024 |
" $(HOTSPOT_CLIENT_PATH)/jvm.pdb \n" \ |
|
1025 |
" and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \ |
|
1026 |
"" >> $(WARNING_FILE) ; \ |
|
1027 |
fi |
|
1028 |
endif |
|
1029 |
@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.map ]; then \ |
|
1030 |
$(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .map files. \n" \ |
|
1031 |
" These files are optional and aid in the debugging of the JVM. \n" \ |
|
1032 |
" Please check your access to \n" \ |
|
1033 |
" $(HOTSPOT_SERVER_PATH)/jvm.map \n" \ |
|
1034 |
" and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ |
|
1035 |
"" >> $(WARNING_FILE) ; \ |
|
1036 |
fi |
|
1037 |
@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.pdb ]; then \ |
|
1038 |
$(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .pdb files. \n" \ |
|
1039 |
" These files are optional and aid in the debugging of the JVM. \n" \ |
|
1040 |
" Please check your access to \n" \ |
|
1041 |
" $(HOTSPOT_SERVER_PATH)/jvm.pdb \n" \ |
|
1042 |
" and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \ |
|
1043 |
"" >> $(WARNING_FILE) ; \ |
|
1044 |
fi |
|
1045 |
endif |
|
1046 |
||
1047 |
||
1048 |
###################################################### |
|
1049 |
# Check for existence of misc Hotspot imported files |
|
1050 |
###################################################### |
|
1051 |
HOTSPOT_INCLUDE_FILE_LIST = jvmti.h |
|
1052 |
#HOTSPOT_INCLUDE_FILE_LIST += jni.h jni_md.h |
|
1053 |
#HOTSPOT_INCLUDE_FILE_LIST += jvm.h jvm_md.h |
|
1054 |
#HOTSPOT_INCLUDE_FILE_LIST += jmm.h |
|
1055 |
TMP_SDK_INCLUDE_FILE_LIST=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.h) |
|
1056 |
TMP_SDK_INCLUDE_FILE_DIFFS=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.hdiffs) |
|
1057 |
||
1058 |
# These include files must have a pattern: 'version: MAJOR.MINOR.MICRO' |
|
1059 |
# where MACRO, MINOR, and MICRO are numbers, e.g. 1.0.1, 0.2.90, etc. |
|
1060 |
# The critical version we are checking is MAJOR.MINOR, we print all three |
|
1061 |
# when we detect an error. |
|
1062 |
||
1063 |
TMP_SDK_INCLUDE_FIND_VERSION= $(EGREP) 'version:' |
|
1064 |
TMP_SDK_INCLUDE_GET_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \ |
|
1065 |
$(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9].*@\1@' |
|
1066 |
TMP_SDK_INCLUDE_GET_FULL_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \ |
|
1067 |
$(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*@\1@' |
|
1068 |
||
1069 |
# Compare an interface file (Rule creates 2 temp files: %.h and %.h.IMPORT) |
|
1070 |
# Files jvm.h, jvm_md.h and jmm.h are special in that they are not publicly |
|
1071 |
# exported but do represent VM interfaces used by the rest of the jdk. |
|
1072 |
# So these 3 will not be found in a promoted build and can only |
|
1073 |
# be checked when this represents a full control build (i.e. the |
|
1074 |
# HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory). |
|
1075 |
$(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h |
|
1076 |
@$(install-file) |
|
1077 |
@$(RM) $@.IMPORT |
|
1078 |
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \ |
|
1079 |
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \ |
|
1080 |
elif [ "$(@F)" != "jvm.h" -a "$(@F)" != "jmm.h" ] ; then \ |
|
1081 |
$(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \ |
|
1082 |
" Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \ |
|
1083 |
"" >> $(WARNING_FILE) ; \ |
|
1084 |
$(CP) $< $@.IMPORT; \ |
|
1085 |
else \ |
|
1086 |
$(CP) $< $@.IMPORT; \ |
|
1087 |
fi |
|
1088 |
||
1089 |
$(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h |
|
1090 |
@$(install-file) |
|
1091 |
@$(RM) $@.IMPORT |
|
1092 |
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \ |
|
1093 |
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \ |
|
1094 |
elif [ "$(@F)" != "jvm_md.h" ] ; then \ |
|
1095 |
$(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \ |
|
1096 |
" Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \ |
|
1097 |
"" >> $(WARNING_FILE) ; \ |
|
1098 |
$(CP) $< $@.IMPORT; \ |
|
1099 |
else \ |
|
1100 |
$(CP) $< $@.IMPORT; \ |
|
1101 |
fi |
|
1102 |
||
1103 |
# Compares the two tempfiles: %.h and %.h.IMPORT, answer in %.hdiffs |
|
1104 |
# Note: Putting anything into the hdiffs file will trigger generic IMPORT |
|
1105 |
# warning message in hotspot_import_include. |
|
1106 |
# First checks the major.minor versions, the micro number can differ. |
|
1107 |
# Second checks the full version. |
|
1108 |
# Lastly does a full diff if the full version differs or it has no version |
|
1109 |
$(TEMPDIR)/%.hdiffs: $(TEMPDIR)/%.h |
|
1110 |
@$(prep-target) |
|
1111 |
@$(TOUCH) $@ |
|
1112 |
@if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_VERSION)`" != \ |
|
1113 |
"`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_VERSION)`" ] ; then \ |
|
1114 |
$(ECHO) "WARNING: The file $(<F) is not the same interface as the VM version.\n " \ |
|
1115 |
" this workspace has $(<F) `$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` and \n " \ |
|
1116 |
" HOTSPOT_IMPORT_PATH contains $(<F) `$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` \n" \ |
|
1117 |
"" >> $(WARNING_FILE) ; \ |
|
1118 |
$(ECHO) "Version mis-match" > $@ ; \ |
|
1119 |
fi |
|
1120 |
@if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" != \ |
|
1121 |
"`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" ] ; then \ |
|
1122 |
$(RM) $<.filtered $<.IMPORT.filtered; \ |
|
1123 |
$(EGREP) -v 'VERSION' $< > $<.filtered; \ |
|
1124 |
$(EGREP) -v 'VERSION' $<.IMPORT > $<.IMPORT.filtered; \ |
|
1125 |
($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \ |
|
1126 |
elif [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_FIND_VERSION)`" = "" ] ; then \ |
|
1127 |
$(RM) $<.filtered $<.IMPORT.filtered; \ |
|
1128 |
$(EGREP) -v '@\(#\)' $< > $<.filtered; \ |
|
1129 |
$(EGREP) -v '@\(#\)' $<.IMPORT > $<.IMPORT.filtered; \ |
|
1130 |
($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \ |
|
1131 |
fi |
|
1132 |
||
1133 |
# Verify all imported hotspot files |
|
1134 |
sane-hotspot_import:: sane-hotspot_import_dir sane-hotspot_import_include |
|
1135 |
||
1136 |
# Verify the base directory exists |
|
1137 |
sane-hotspot_import_dir: |
|
1138 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS) |
|
1139 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_LIST) |
|
1140 |
@if [ ! -d "$(HOTSPOT_IMPORT_PATH)" ]; then \ |
|
1141 |
$(ECHO) "WARNING: The directory HOTSPOT_IMPORT_PATH=$(HOTSPOT_IMPORT_PATH) \n" \ |
|
1142 |
" does not exist, check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \ |
|
1143 |
"" >> $(WARNING_FILE) ; \ |
|
1144 |
fi |
|
1145 |
||
1146 |
# Verify hotspot include files |
|
1147 |
sane-hotspot_import_include: $(TMP_SDK_INCLUDE_FILE_LIST) $(TMP_SDK_INCLUDE_FILE_DIFFS) |
|
1148 |
@if [ "`$(CAT) $(TMP_SDK_INCLUDE_FILE_DIFFS)`" != "" ] ; then \ |
|
1149 |
$(ECHO) "WARNING: Possible HotSpot VM interface conflict. \n" \ |
|
1150 |
" HOTSPOT_IMPORT_PATH is used to import files from the VM build. \n" \ |
|
1151 |
" It is also used to verify that any copied files are consistent between \n" \ |
|
1152 |
" these two components. It has been detected that one or more of the \n" \ |
|
1153 |
" VM interface files inside this workspace may not match the interfaces \n" \ |
|
1154 |
" exported by the VM, or the VM versions could not be found. \n" \ |
|
1155 |
" The list of VM interface files is: \n" \ |
|
1156 |
" $(HOTSPOT_INCLUDE_FILE_LIST). \n" \ |
|
1157 |
" This workspace has copies of these files at: \n" \ |
|
1158 |
" $(SHARE_SRC)/javavm/export and $(PLATFORM_SRC)/javavm/export \n" \ |
|
1159 |
" for build purposes, and they should contain the same interfaces \n" \ |
|
1160 |
" as the VM versions imported from: \n" \ |
|
1161 |
" \$$(HOTSPOT_IMPORT_PATH)/include \n" \ |
|
1162 |
" (i.e. $(HOTSPOT_IMPORT_PATH)/include) \n" \ |
|
1163 |
" If an interface indeed doesn't match, then the use of this interface \n" \ |
|
1164 |
" at JDK runtime could cause serious errors. \n" \ |
|
1165 |
"" >> $(WARNING_FILE) ; \ |
|
1166 |
for i in $(TMP_SDK_INCLUDE_FILE_DIFFS); do \ |
|
1167 |
if [ -s $$i ] ; then \ |
|
1168 |
$(ECHO) " " >> $(WARNING_FILE); \ |
|
1169 |
$(ECHO) "VM Interface Differences: $$i" >> $(WARNING_FILE); \ |
|
1170 |
$(CAT) $$i >> $(WARNING_FILE); \ |
|
1171 |
$(ECHO) " " >> $(WARNING_FILE); \ |
|
1172 |
fi; \ |
|
1173 |
done; \ |
|
1174 |
fi |
|
1175 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS) |
|
1176 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_LIST) |
|
1177 |
||
1178 |
# The JDI-SA feature is not currently released on some platforms. |
|
1179 |
# See the Defs-<arch>.gmk files. |
|
1180 |
||
1181 |
ifeq ($(INCLUDE_SA), true) |
|
1182 |
# Verify that hotspot Serviceability Agent files are present. To keep |
|
1183 |
# it simple, we will just check for one of them. The others have arch |
|
1184 |
# dependent paths. |
|
1185 |
||
1186 |
sane-hotspot_import:: |
|
1187 |
@if [ ! -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \ |
|
1188 |
$(ECHO) "WARNING: File $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar does not exist.\n" \ |
|
1189 |
" The JDI binding for the Serviceability Agent will not be included in the build.\n" \ |
|
1190 |
" Please check your access to\n" \ |
|
1191 |
" $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar\n" \ |
|
1192 |
" and/or check your value of ALT_HOTSPOT_IMPORT_PATH.\n" \ |
|
1193 |
"" >> $(WARNING_FILE) ; \ |
|
1194 |
fi |
|
1195 |
endif |
|
1196 |
||
1197 |
###################################################### |
|
1198 |
# Check the ant version |
|
1199 |
###################################################### |
|
1200 |
ANT_CHECK :=$(call CheckVersions,$(ANT_VER),$(REQUIRED_ANT_VER)) |
|
1201 |
sane-ant_version: |
|
1202 |
@if [ "$(ANT_CHECK)" != "same" \ |
|
1203 |
-a "$(ANT_CHECK)" != "newer" ]; then \ |
|
1204 |
$(ECHO) "WARNING: The version of ant being used is older than \n" \ |
|
1205 |
" the required version of '$(REQUIRED_ANT_VER)'. \n" \ |
|
1206 |
" The version of ant found was '$(ANT_VER)'. \n" \ |
|
1207 |
"" >> $(WARNING_FILE) ; \ |
|
1208 |
fi |
|
1209 |
||
1210 |
###################################################### |
|
1211 |
# Check the zip file version |
|
1212 |
###################################################### |
|
1213 |
ZIP_CHECK :=$(call CheckVersions,$(ZIP_VER),$(REQUIRED_ZIP_VER)) |
|
1214 |
sane-zip_version: sane-unzip_version |
|
1215 |
@if [ "$(ZIP_CHECK)" != "same" -a "$(ZIP_CHECK)" != "newer" ]; then \ |
|
1216 |
$(ECHO) "WARNING: The version of zip being used is older than \n" \ |
|
1217 |
" the required version of '$(REQUIRED_ZIP_VER)'. \n" \ |
|
1218 |
" The version of zip found was '$(ZIP_VER)'. \n" \ |
|
1219 |
"" >> $(WARNING_FILE) ; \ |
|
1220 |
fi |
|
1221 |
||
1222 |
###################################################### |
|
1223 |
# Check the unzip file version |
|
1224 |
###################################################### |
|
1225 |
UNZIP_CHECK :=$(call CheckVersions,$(UNZIP_VER),$(REQUIRED_UNZIP_VER)) |
|
1226 |
sane-unzip_version: |
|
1227 |
@if [ "$(UNZIP_CHECK)" != "same" -a "$(UNZIP_CHECK)" != "newer" ]; then \ |
|
1228 |
$(ECHO) "WARNING: The version of unzip being used is older than \n" \ |
|
1229 |
" the required version of '$(REQUIRED_UNZIP_VER)'. \n" \ |
|
1230 |
" The version of unzip found was '$(UNZIP_VER)'. \n" \ |
|
1231 |
"" >> $(WARNING_FILE) ; \ |
|
1232 |
fi |
|
1233 |
||
1234 |
###################################################### |
|
1235 |
# Check for windows DirectX sdk directory |
|
1236 |
###################################################### |
|
1237 |
sane-dxsdk: |
|
1238 |
ifeq ($(PLATFORM), windows) |
|
887 | 1239 |
@if [ ! -r $(DXSDK_INCLUDE_PATH)/d3d9.h ]; then \ |
2 | 1240 |
$(ECHO) "ERROR: You do not have access to a valid DirectX SDK Include dir.\n" \ |
1241 |
" The value of DXSDK_INCLUDE_PATH must point a valid DX SDK dir.\n" \ |
|
1242 |
" Please check your access to \n" \ |
|
1243 |
" $(DXSDK_INCLUDE_PATH) \n" \ |
|
1244 |
" and/or check your value of ALT_DXSDK_PATH or ALT_DXSDK_INCLUDE_PATH.\n" \ |
|
1245 |
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \ |
|
1246 |
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \ |
|
1247 |
" Or http://www.microsoft.com/directx\n" \ |
|
1248 |
"" >> $(ERROR_FILE) ; \ |
|
1249 |
else \ |
|
1250 |
if [ ! "$(DXSDK_VER)" = "$(REQUIRED_DXSDK_VER)" ]; then \ |
|
1251 |
$(ECHO) "ERROR: The DirectX SDK must be version $(REQUIRED_DXSDK_VER).\n" \ |
|
1252 |
" $(YOU_ARE_USING) DirectX SDK version: $(DXSDK_VER)\n" \ |
|
1253 |
" The DirectX SDK was obtained from the following location: \n" \ |
|
1254 |
" $(DXSDK_PATH) \n" \ |
|
1255 |
" Please change your DirectX SDK. \n" \ |
|
1256 |
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \ |
|
1257 |
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \ |
|
1258 |
" Or http://www.microsoft.com/directx\n" \ |
|
1259 |
"" >> $(ERROR_FILE) ; \ |
|
1260 |
else \ |
|
1261 |
if [ -r $(DXSDK_INCLUDE_PATH)/basetsd.h ]; then \ |
|
1262 |
if [ `$(EGREP) -c __int3264 $(DXSDK_INCLUDE_PATH)/basetsd.h` -ne 0 ]; then \ |
|
1263 |
$(ECHO) "WARNING: The DirectX SDK Include directory contains a newer basetsd.h,\n" \ |
|
1264 |
" which may indicate that you're using an incorrect version of DirectX SDK.\n" \ |
|
1265 |
" This may result in a build failure.\n" \ |
|
1266 |
" The DirectX SDK Include dir was obtained from the following location:\n" \ |
|
1267 |
" $(DXSDK_INCLUDE_PATH) \n" \ |
|
887 | 1268 |
" Please change your DirectX SDK to version 9 (Summer 2004 Update or newer).\n" \ |
2 | 1269 |
" Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \ |
1270 |
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \ |
|
1271 |
" Or http://www.microsoft.com/directx\n" \ |
|
1272 |
"" >> $(WARNING_FILE) ; \ |
|
1273 |
fi \ |
|
1274 |
fi \ |
|
1275 |
fi \ |
|
1276 |
fi |
|
1277 |
endif |
|
1278 |
||
1279 |
###################################################### |
|
1280 |
# Check the linker version(s) |
|
1281 |
###################################################### |
|
1282 |
ifeq ($(PLATFORM), windows) |
|
1283 |
LINK_CHECK :=$(call CheckVersions,$(LINK_VER),$(REQUIRED_LINK_VER)) |
|
1284 |
endif |
|
1285 |
sane-link: |
|
1286 |
ifdef LINK_VER |
|
1287 |
@if [ "$(LINK_CHECK)" = "missing" ]; then \ |
|
1288 |
$(ECHO) "ERROR: The Linker version is undefined. \n" \ |
|
1289 |
"" >> $(ERROR_FILE) ; \ |
|
1290 |
fi |
|
1291 |
@if [ "$(LINK_CHECK)" != "same" ]; then \ |
|
1292 |
$(ECHO) "WARNING: To build Java 2 SDK $(JDK_VERSION) you need : \n" \ |
|
1293 |
" $(COMPILER_VERSION) - link.exe version \"$(REQUIRED_LINK_VER)\" \n" \ |
|
1294 |
" Specifically the $(COMPILER_NAME) link.exe. \n " \ |
|
1295 |
" $(YOU_ARE_USING) Linker version \"$(LINK_VER)\" \n" \ |
|
1296 |
"" >> $(WARNING_FILE) ; \ |
|
1297 |
fi |
|
1298 |
endif |
|
1299 |
||
1300 |
###################################################### |
|
1301 |
# Check the compiler version(s) |
|
1302 |
###################################################### |
|
1303 |
CC_CHECK :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER)) |
|
1304 |
ifeq ($(PLATFORM), solaris) |
|
1305 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
1306 |
GCC_CHECK :=$(call CheckVersions,$(GCC_VER),$(REQUIRED_GCC_VER)) |
|
1307 |
endif |
|
1308 |
endif |
|
1309 |
sane-compiler: sane-link |
|
1310 |
@if [ "$(CC_CHECK)" = "missing" ]; then \ |
|
1311 |
$(ECHO) "ERROR: The Compiler version is undefined. \n" \ |
|
1312 |
"" >> $(ERROR_FILE) ; \ |
|
1313 |
fi |
|
1314 |
ifndef OPENJDK |
|
1315 |
@if [ "$(CC_CHECK)" != "same" ]; then \ |
|
1316 |
$(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \ |
|
308
33a1639d64a5
6482134: JDK 6 build error on Windows, Visual Studio .NET on Japanese locale
ohair
parents:
305
diff
changeset
|
1317 |
" Specifically the $(COMPILER_NAME) compiler. \n " \ |
2 | 1318 |
" $(YOU_ARE_USING) compiler version: $(CC_VER) \n" \ |
1319 |
" The compiler was obtained from the following location: \n" \ |
|
1320 |
" $(COMPILER_PATH) \n" \ |
|
1321 |
"" >> $(WARNING_FILE) ; \ |
|
1322 |
fi |
|
1323 |
ifdef GCC_CHECK |
|
1324 |
@if [ "$(GCC_CHECK)" != "same" ]; then \ |
|
1325 |
$(ECHO) "WARNING: The $(PLATFORM) GCC compiler must be version $(REQUIRED_GCC_VER) \n" \ |
|
1326 |
" $(YOU_ARE_USING) compiler version: $(GCC_VER) \n" \ |
|
1327 |
" The compiler was obtained from the following location: \n" \ |
|
1328 |
" $(GCC_COMPILER_PATH) \n" \ |
|
1329 |
" Please change your compiler. \n" \ |
|
1330 |
"" >> $(WARNING_FILE) ; \ |
|
1331 |
fi |
|
1332 |
endif |
|
1333 |
ifeq ($(PLATFORM), windows) |
|
1334 |
ifeq ($(ARCH_DATA_MODEL), 64) |
|
1335 |
ifneq ($(COMPILER_VERSION), VS2005) |
|
1336 |
@$(ECHO) "WARNING: Should be using VS2005 compiler on 64bit platform. \n" \ |
|
1337 |
"" >> $(WARNING_FILE) |
|
1338 |
endif |
|
1339 |
endif |
|
1340 |
endif |
|
1341 |
endif |
|
1342 |
||
1343 |
###################################################### |
|
1344 |
# Check that ALSA headers and libs are installed and |
|
1345 |
# that the header has the right version. We only |
|
1346 |
# need /usr/include/alsa/*.h and /usr/lib/libasound.so |
|
1347 |
###################################################### |
|
1348 |
||
1349 |
ifdef ALSA_VERSION_CHECK |
|
1350 |
$(ALSA_VERSION_CHECK): $(ALSA_VERSION_CHECK).c |
|
1351 |
@$(prep-target) |
|
1352 |
@$(CC) -lasound -o $@ $< |
|
1353 |
||
1354 |
$(ALSA_VERSION_CHECK).c: |
|
1355 |
@$(prep-target) |
|
1356 |
@$(ECHO) "#include <alsa/asoundlib.h>\n" \ |
|
1357 |
"int main(char** argv, int argc) {\n" \ |
|
1358 |
" printf(\"%s\", SND_LIB_VERSION_STR);\n" \ |
|
1359 |
" return 0;\n" \ |
|
1360 |
"}\n" \ |
|
1361 |
> $@ |
|
1362 |
endif |
|
1363 |
||
1364 |
sane-alsa-versioncheck: $(ALSA_VERSION_CHECK) |
|
1365 |
sane-alsa-headers: sane-alsa-versioncheck |
|
1366 |
ifdef ALSA_VERSION_CHECK |
|
1367 |
@if [ -f "$(ALSA_VERSION_CHECK)" ]; then \ |
|
1368 |
if [ `$(ALSA_VERSION_CHECK) | $(EGREP) -c '$(REQUIRED_ALSA_VERSION)'` -ne 1 ] ; then \ |
|
1369 |
$(ECHO) "ERROR: The ALSA version must be 0.9.1 or higher. \n" \ |
|
1370 |
" You have the following ALSA version installed: $(ALSA_VERSION) \n" \ |
|
1371 |
" Please reinstall ALSA (drivers and lib). You can download \n" \ |
|
1372 |
" the source distribution from http://www.alsa-project.org \n" \ |
|
1373 |
" or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ |
|
1374 |
"" >> $(ERROR_FILE) ; \ |
|
1375 |
fi \ |
|
1376 |
else \ |
|
1377 |
$(ECHO) "ERROR: You seem to not have installed ALSA 0.9.1 or higher. \n" \ |
|
1378 |
" Please install ALSA (drivers and lib). You can download the \n" \ |
|
1379 |
" source distribution from http://www.alsa-project.org or go to \n" \ |
|
1380 |
" http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ |
|
1381 |
"" >> $(ERROR_FILE) ; \ |
|
1382 |
fi |
|
1383 |
endif |
|
1384 |
||
1385 |
# If a sanity file doesn't exist, just make sure it's dir exists |
|
1386 |
$(SANITY_FILES): |
|
1387 |
-@$(prep-target) |
|
1388 |
||
1389 |
###################################################### |
|
1390 |
# dump out the variable settings... |
|
1391 |
###################################################### |
|
1392 |
sane-settings:: sane-alsa-versioncheck |
|
1393 |
@$(ECHO) >> $(MESSAGE_FILE) |
|
1394 |
@$(ECHO) $(ALL_SETTINGS) >> $(MESSAGE_FILE) |
|
1395 |
@$(ECHO) >> $(MESSAGE_FILE) |
|
1396 |
||
1397 |
###################################################### |
|
1398 |
# Check for existence of DEPLOY_MSSDK on windows |
|
1399 |
###################################################### |
|
1400 |
sane-mssdk_path: |
|
1401 |
ifeq ($(PLATFORM), windows) |
|
1402 |
@if [ -z "$(DEPLOY_MSSDK)" ]; then \ |
|
1403 |
$(ECHO) "WARNING: Your DEPLOY_MSSDK setting is empty.\n" \ |
|
1404 |
" It is recommended to set ALT_DEPLOY_MSSDK.\n" \ |
|
1405 |
"" >> $(WARNING_FILE) ; \ |
|
1406 |
fi |
|
1407 |
@if [ ! -r "$(DEPLOY_MSSDK)" ]; then \ |
|
1408 |
$(ECHO) "ERROR: You do not have a valid DEPLOY_MSSDK setting. \n" \ |
|
1409 |
" Please check your access to \n" \ |
|
1410 |
" $(DEPLOY_MSSDK) \n" \ |
|
1411 |
" and/or check your value of ALT_DEPLOY_MSSDK. \n" \ |
|
1412 |
"" >> $(ERROR_FILE) ; \ |
|
1413 |
fi |
|
1414 |
endif |
|
1415 |
||
1416 |
###################################################### |
|
1417 |
# Check for existence of INSTALL_MSSDK on windows |
|
1418 |
###################################################### |
|
1419 |
sane-install-mssdk_path: |
|
1420 |
ifeq ($(PLATFORM), windows) |
|
1421 |
@if [ -z "$(INSTALL_MSSDK)" ]; then \ |
|
1422 |
$(ECHO) "WARNING: Your INSTALL_MSSDK setting is empty.\n" \ |
|
1423 |
" It is recommended to set ALT_INSTALL_MSSDK.\n" \ |
|
1424 |
"" >> $(WARNING_FILE) ; \ |
|
1425 |
fi |
|
1426 |
@if [ ! -r "$(INSTALL_MSSDK)" ]; then \ |
|
1427 |
$(ECHO) "ERROR: You do not have a valid INSTALL_MSSDK setting. \n" \ |
|
1428 |
" Please check your access to \n" \ |
|
1429 |
" $(INSTALL_MSSDK) \n" \ |
|
1430 |
" and/or check your value of ALT_INSTALL_MSSDK. \n" \ |
|
1431 |
"" >> $(ERROR_FILE) ; \ |
|
1432 |
fi |
|
1433 |
endif |
|
1434 |
||
1435 |
###################################################### |
|
1436 |
# Check for existence of INSTALL_MSIVAL2 on windows |
|
1437 |
###################################################### |
|
1438 |
sane-install-msival2_path: |
|
1439 |
ifeq ($(PLATFORM), windows) |
|
1440 |
@if [ -z "$(INSTALL_MSIVAL2)" ]; then \ |
|
1441 |
$(ECHO) "WARNING: Your INSTALL_MSIVAL2 setting is empty.\n" \ |
|
1442 |
" It is recommended to set ALT_INSTALL_MSIVAL2.\n" \ |
|
1443 |
"" >> $(WARNING_FILE) ; \ |
|
1444 |
fi |
|
1445 |
@if [ ! -r "$(INSTALL_MSIVAL2)" ]; then \ |
|
1446 |
$(ECHO) "ERROR: You do not have a valid INSTALL_MSIVAL2 setting. \n" \ |
|
1447 |
" Please check your access to \n" \ |
|
1448 |
" $(INSTALL_MSIVAL2) \n" \ |
|
1449 |
" and/or check your value of ALT_INSTALL_MSIVAL2. \n" \ |
|
1450 |
"" >> $(ERROR_FILE) ; \ |
|
1451 |
fi |
|
1452 |
endif |
|
1453 |
||
1454 |
###################################################### |
|
1455 |
# Check the Solaris GNU c++ compiler for solaris plugin |
|
1456 |
###################################################### |
|
1457 |
sane-gcc-compiler: |
|
1458 |
ifeq ($(PLATFORM), solaris) |
|
1459 |
ifndef OPENJDK |
|
1460 |
@if [ -r $(GCC_COMPILER_PATH) ]; then \ |
|
1461 |
if [ ! "$(GCC_VER)" = 2.95.2 ]; then \ |
|
1462 |
$(ECHO) "ERROR: The Solaris GCC compiler version must be 2.95.2. \n" \ |
|
1463 |
" You are using the following compiler version: $(GCC_VER) \n" \ |
|
1464 |
" The compiler was obtained from the following location: \n" \ |
|
1465 |
" $(GCC_COMPILER_PATH) \n" \ |
|
1466 |
" Please change your compiler. \n" \ |
|
1467 |
"" >> $(ERROR_FILE) ; \ |
|
1468 |
fi \ |
|
1469 |
else \ |
|
1470 |
$(ECHO) "ERROR: You do not have a valid GCC_COMPILER_PATH setting. \n" \ |
|
1471 |
" Please check your access to \n" \ |
|
1472 |
" $(GCC_COMPILER_PATH) \n" \ |
|
1473 |
" and/or check your value of ALT_GCC_COMPILER_PATH. \n" \ |
|
1474 |
" This will affect you if you build the plugin target. \n" \ |
|
1475 |
"" >> $(ERROR_FILE) ; \ |
|
1476 |
fi |
|
1477 |
endif |
|
1478 |
||
1479 |
ifeq ($(PLATFORM), linux) |
|
1480 |
ifdef ALT_GCC29_COMPILER_PATH |
|
1481 |
@if [ ! -x $(ALT_GCC29_COMPILER_PATH)/bin/gcc ]; then \ |
|
1482 |
$(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \ |
|
1483 |
" Please check your access to \n" \ |
|
1484 |
" $(ALT_GCC29_COMPILER_PATH)/bin/gcc \n" \ |
|
1485 |
" This will affect you if you build the plugin target. \n" \ |
|
1486 |
"" >> $(ERROR_FILE) ; \ |
|
1487 |
fi |
|
1488 |
endif |
|
1489 |
ifdef ALT_GCC29_PLUGIN_LIB_PATH |
|
1490 |
@if [ ! -r $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so ]; then \ |
|
1491 |
$(ECHO) "Error: You do not have a valid ALT_GCC29_PLUGIN_LIB_PATH setting. \n" \ |
|
1492 |
" Please check your access to \n" \ |
|
1493 |
" $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so \n" \ |
|
1494 |
" This will affect you if you build the plugin target, specifically for gcc 2.9 version of OJI plugin library. \n" \ |
|
1495 |
"" >> $(ERROR_FILE) ; \ |
|
1496 |
fi |
|
1497 |
else |
|
1498 |
@if [ ! -r $(GCC29_COMPILER_PATH) ]; then \ |
|
1499 |
$(ECHO) "ERROR: You do not have a valid GCC29_COMPILER_PATH setting. \n" \ |
|
1500 |
" Please check your access to \n" \ |
|
1501 |
" $(GCC29_COMPILER_PATH) \n" \ |
|
1502 |
" and/or check your value of ALT_GCC29_COMPILER_PATH. \n" \ |
|
1503 |
" This will affect you if you build the plugin target. \n" \ |
|
1504 |
"" >> $(ERROR_FILE) ; \ |
|
1505 |
fi |
|
1506 |
endif |
|
1507 |
endif |
|
1508 |
endif |
|
1509 |
||
1510 |
||
1511 |
###################################################### |
|
1512 |
# MOZILLA_HEADERS_PATH must be valid |
|
1513 |
###################################################### |
|
1514 |
sane-mozilla: |
|
1515 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
1516 |
ifdef ALT_MOZILLA_HEADERS_PATH |
|
1517 |
@if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \ |
|
1518 |
$(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \ |
|
1519 |
" not a Relative Path Name. \n" \ |
|
1520 |
" The current value of ALT_MOZILLA_HEADERS_PATH is \n" \ |
|
1521 |
" $(ALT_MOZILLA_HEADERS_PATH) \n" \ |
|
1522 |
" Please fix this and continue your build. \n" \ |
|
1523 |
"" >> $(ERROR_FILE) ; \ |
|
1524 |
fi |
|
1525 |
endif |
|
1526 |
@# |
|
1527 |
@# MOZILLA_HEADERS_PATH must be valid.... |
|
1528 |
@# |
|
1529 |
ifeq ($(PLATFORM), windows) |
|
1530 |
@if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18.win32/java/bool.h ]; then \ |
|
1531 |
$(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \ |
|
1532 |
" Please check your access to \n" \ |
|
1533 |
" $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18.win32/java/bool.h \n" \ |
|
1534 |
" and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \ |
|
1535 |
" and on Windows, ALT_JDK_JAVA_DRIVE. \n" \ |
|
1536 |
"" >> $(ERROR_FILE) ; \ |
|
1537 |
fi |
|
1538 |
else |
|
1539 |
@if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18/java/bool.h ]; then \ |
|
1540 |
$(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \ |
|
1541 |
" Please check your access to \n" \ |
|
1542 |
" $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18/java/bool.h \n" \ |
|
1543 |
" and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \ |
|
1544 |
"" >> $(ERROR_FILE) ; \ |
|
1545 |
fi |
|
1546 |
endif |
|
1547 |
endif |
|
1548 |
||
1549 |
||
142
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1550 |
###################################################### |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1551 |
# SECURITY_BASELINE_142 test |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1552 |
###################################################### |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1553 |
security_baseline_142: |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1554 |
ifeq ($(PLATFORM), windows) |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1555 |
@if [ -z "$(SECURITY_BASELINE_142)" ]; then \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1556 |
$(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1557 |
" Setting it to the default value of 1.4.2_10.\n" \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1558 |
" It is recommended to set SECURITY_BASELINE_142.\n" \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1559 |
"" >> $(WARNING_FILE) ; \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1560 |
fi |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1561 |
endif |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1562 |
|
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1563 |
###################################################### |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1564 |
# SECURITY_BASELINE_150 test |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1565 |
###################################################### |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1566 |
security_baseline_150: |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1567 |
ifeq ($(PLATFORM), windows) |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1568 |
@if [ -z "$(SECURITY_BASELINE_150)" ]; then \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1569 |
$(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1570 |
" Setting it to the default value of 1.5.0_07.\n" \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1571 |
" It is recommended to set SECURITY_BASELINE_150.\n" \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1572 |
"" >> $(WARNING_FILE) ; \ |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1573 |
fi |
f78032e8a30b
6627817: Remove ^M characters in all files (Makefiles too)
ohair
parents:
140
diff
changeset
|
1574 |
endif |
2 | 1575 |
|
1576 |
||
1577 |
###################################################### |
|
1578 |
# this should be the last rule in any target's sanity rule. |
|
1579 |
###################################################### |
|
1580 |
sane-lastrule: |
|
1581 |
ifndef EXTERNALSANITYCONTROL |
|
1582 |
@if [ -r $(MESSAGE_FILE) ]; then \ |
|
1583 |
$(CAT) $(MESSAGE_FILE) ; \ |
|
1584 |
fi |
|
1585 |
@if [ -r $(WARNING_FILE) ]; then \ |
|
1586 |
$(CAT) $(WARNING_FILE) ; \ |
|
1587 |
fi |
|
1588 |
@if [ "x$(INSANE)" != x ]; then \ |
|
1589 |
$(ECHO) "INSANE mode requested. \n" \ |
|
1590 |
"Sanity will not force a build termination, even with errors.\n" \ |
|
1591 |
"" >> $(ERROR_FILE); \ |
|
1592 |
fi |
|
1593 |
@if [ -r $(ERROR_FILE) ]; then \ |
|
1594 |
if [ "x$(INSANE)" = x ]; then \ |
|
1595 |
$(ECHO) "Exiting because of the above error(s). \n" \ |
|
1596 |
"">> $(ERROR_FILE); \ |
|
1597 |
fi ; \ |
|
1598 |
$(CAT) $(ERROR_FILE) ; \ |
|
1599 |
if [ "x$(INSANE)" = x ]; then \ |
|
1600 |
exit 1 ; \ |
|
1601 |
fi ; \ |
|
1602 |
fi |
|
1603 |
ifdef PEDANTIC |
|
1604 |
@if [ -r $(WARNING_FILE) ]; then \ |
|
1605 |
$(ECHO) "PEDANTIC mode requested. \n" \ |
|
1606 |
"Exiting because of the above warning(s). \n" \ |
|
1607 |
"" >> $(ERROR_FILE); \ |
|
1608 |
$(CAT) $(ERROR_FILE) ; \ |
|
1609 |
exit 1 ; \ |
|
1610 |
fi |
|
1611 |
endif # PEDANTIC |
|
1612 |
@if [ ! -r $(ERROR_FILE) ]; then \ |
|
1613 |
$(ECHO) "Sanity check passed." ; \ |
|
1614 |
fi |
|
1615 |
endif # EXTERNALSANITYCONTROL |
|
1616 |