2
|
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 |
# 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 |
WINVER=$(JDK_TOPDIR)/make/tools/winver/bin/winver.exe
|
|
86 |
FREE_SPACE := $(shell $(DF) -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
|
|
87 |
TEMP_FREE_SPACE := $(shell $(DF) -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
|
|
88 |
WINDOWS_VERSION := $(shell \
|
|
89 |
if [ -x $(WINVER) ]; then \
|
|
90 |
$(WINVER) ; \
|
|
91 |
else \
|
|
92 |
$(ECHO) "Unknown Windows Version"; \
|
|
93 |
fi)
|
|
94 |
DXSDK_VER := $(shell $(EGREP) DIRECTDRAW_VERSION $(DXSDK_INCLUDE_PATH)/ddraw.h 2>&1 | \
|
|
95 |
$(EGREP) "\#define" | $(NAWK) '{print $$3}')
|
|
96 |
endif
|
|
97 |
|
|
98 |
# Get the version numbers of what we are using
|
|
99 |
_MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1)
|
|
100 |
_ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip')
|
|
101 |
_UNZIP_VER :=$(shell $(UNZIP) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^UnZip')
|
|
102 |
_BOOT_VER :=$(shell $(BOOTDIR)/bin/java -version 2>&1 | $(HEAD) -n 1)
|
|
103 |
MAKE_VER :=$(call GetVersion,"$(_MAKE_VER)")
|
|
104 |
ZIP_VER :=$(call GetVersion,"$(_ZIP_VER)")
|
|
105 |
UNZIP_VER :=$(call GetVersion,"$(_UNZIP_VER)")
|
|
106 |
BOOT_VER :=$(call GetVersion,"$(_BOOT_VER)")
|
|
107 |
|
|
108 |
REQUIRED_ANT_VER := 1.6.3
|
|
109 |
_ANT_VER :=$(shell $(ANT) -version 2>&1 )
|
|
110 |
ANT_VER :=$(call GetVersion,"$(_ANT_VER)")
|
|
111 |
|
|
112 |
REQUIRED_FINDBUGS_VER := 1.1
|
|
113 |
_FINDBUGS_VER :=$(shell $(FINDBUGS) -version 2>&1 )
|
|
114 |
FINDBUGS_VER :=$(call GetVersion,"$(_FINDBUGS_VER)")
|
|
115 |
|
|
116 |
ifdef ALT_BINDIR
|
|
117 |
ALT_BINDIR_VERSION := $(shell $(ALT_BINDIR)/java$(EXE_SUFFIX) -version 2>&1 | $(NAWK) -F'"' '{ print $$2 }')
|
|
118 |
ALT_BINDIR_OK := $(shell $(ECHO) $(ALT_BINDIR_VERSION) | $(EGREP) -c '^$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)')
|
|
119 |
endif
|
|
120 |
|
|
121 |
INSTALL_PATCHES_FILE = $(TEMPDIR)/installed.patches
|
|
122 |
|
|
123 |
# Get ALL_SETTINGS defined
|
|
124 |
include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
|
|
125 |
|
|
126 |
.PHONY: \
|
|
127 |
sane-copyrightyear\
|
|
128 |
sane-settings \
|
|
129 |
sane-insane \
|
|
130 |
sane-build_number \
|
|
131 |
sane-os_version \
|
|
132 |
sane-memory_check \
|
|
133 |
sane-windows \
|
|
134 |
sane-locale \
|
|
135 |
sane-linux \
|
|
136 |
sane-cygwin \
|
|
137 |
sane-cygwin-shell \
|
|
138 |
sane-mks \
|
|
139 |
sane-arch_data_model \
|
|
140 |
sane-os_patch_level \
|
|
141 |
sane-classpath \
|
|
142 |
sane-java_home \
|
|
143 |
sane-fonts \
|
|
144 |
sane-binary-plugs \
|
|
145 |
sane-variant \
|
|
146 |
sane-ld_library_path \
|
|
147 |
sane-ld_library_path_64 \
|
|
148 |
sane-ld_options \
|
|
149 |
sane-ld_run_path \
|
|
150 |
sane-makeflags \
|
|
151 |
sane-alt_outputdir \
|
|
152 |
sane-outputdir \
|
|
153 |
sane-alt_bootdir \
|
|
154 |
sane-bootdir \
|
|
155 |
sane-cups \
|
|
156 |
sane-devtools_path \
|
|
157 |
sane-compiler_path \
|
|
158 |
sane-unixcommand_path \
|
|
159 |
sane-usrbin_path \
|
|
160 |
sane-unixccs_path \
|
|
161 |
sane-docs_import \
|
|
162 |
sane-math_iso \
|
|
163 |
sane-libCrun \
|
|
164 |
sane-odbcdir \
|
|
165 |
sane-msdevtools_path \
|
|
166 |
sane-hotspot_binaries \
|
|
167 |
sane-hotspot_import \
|
|
168 |
sane-hotspot_import_dir \
|
|
169 |
sane-hotspot_import_include \
|
|
170 |
sane-compiler \
|
|
171 |
sane-link \
|
|
172 |
sane-cacerts \
|
|
173 |
sane-alsa-versioncheck \
|
|
174 |
sane-alsa-headers \
|
|
175 |
sane-ant_version \
|
|
176 |
sane-findbugs_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)
|
|
259 |
@if [ "$(WINDOWS_VERSION)" != "$(REQUIRED_WINDOWS_VERSION)" ]; then \
|
|
260 |
$(ECHO) "WARNING: $(YOU_ARE_USING) an unsupported version of $(REQUIRED_WINDOWS_NAME). \n" \
|
|
261 |
" The supported version is $(REQUIRED_WINDOWS_NAME) $(REQUIRED_WINDOWS_VERSION). \n" \
|
|
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 |
|
|
783 |
#name of test program that prints out "Failed" if freetype is not good enough
|
|
784 |
FREETYPE_VERSION_CHECK_NAME = freetype_versioncheck
|
|
785 |
FREETYPE_VERSION_CHECK = $(TEMPDIR)/$(FREETYPE_VERSION_CHECK_NAME)$(EXE_SUFFIX)
|
|
786 |
|
|
787 |
sane-freetype:
|
|
788 |
@-($(CD) $(BUILDDIR)/tools/freetypecheck && \
|
|
789 |
$(MAKE) REQUIRED_FREETYPE_VERSION=$(REQUIRED_FREETYPE_VERSION) \
|
|
790 |
FT_TEST=$(FREETYPE_VERSION_CHECK_NAME) \
|
|
791 |
FT_HEADERS=$(FREETYPE_HEADERS_PATH) \
|
|
792 |
FT_LIB=$(FREETYPE_LIB_PATH) \
|
|
793 |
XARCH=$(XARCH))
|
|
794 |
@if [ ! -r $(FREETYPE_VERSION_CHECK) -o \
|
|
795 |
"`$(FREETYPE_VERSION_CHECK) | $(GREP) Fail`" != "" ]; then \
|
|
796 |
$(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
|
|
797 |
"or higher is required. \n" >> $(ERROR_FILE) ; \
|
|
798 |
fi
|
|
799 |
|
|
800 |
else
|
|
801 |
#do nothing (not OpenJDK)
|
|
802 |
sane-freetype:
|
|
803 |
endif
|
|
804 |
|
|
805 |
######################################################
|
|
806 |
# CUPS_HEADERS_PATH must be valid
|
|
807 |
######################################################
|
|
808 |
sane-cups:
|
|
809 |
ifneq ($(PLATFORM), windows)
|
|
810 |
@if [ ! -r $(CUPS_HEADERS_PATH)/cups/cups.h ]; then \
|
|
811 |
$(ECHO) "ERROR: You do not have access to valid Cups header files. \n" \
|
|
812 |
" Please check your access to \n" \
|
|
813 |
" $(CUPS_HEADERS_PATH)/cups/cups.h \n" \
|
|
814 |
" and/or check your value of ALT_CUPS_HEADERS_PATH, \n" \
|
|
815 |
" CUPS is frequently pre-installed on many systems, \n" \
|
|
816 |
" or may be downloaded from http://www.cups.org \n" \
|
|
817 |
"" >> $(ERROR_FILE) ; \
|
|
818 |
fi
|
|
819 |
endif
|
|
820 |
|
|
821 |
######################################################
|
|
822 |
# Check for existence of DEVTOOLS_PATH
|
|
823 |
######################################################
|
|
824 |
sane-devtools_path:
|
|
825 |
@if [ "$(DEVTOOLS_PATH)" != "" -a ! -r "$(DEVTOOLS_PATH)" ]; then \
|
|
826 |
$(ECHO) "ERROR: You do not have a valid DEVTOOLS_PATH setting. \n" \
|
|
827 |
" Please check your access to \n" \
|
|
828 |
" $(DEVTOOLS_PATH) \n" \
|
|
829 |
" and/or check your value of ALT_DEVTOOLS_PATH. \n" \
|
|
830 |
"" >> $(ERROR_FILE) ; \
|
|
831 |
fi
|
|
832 |
|
|
833 |
######################################################
|
|
834 |
# Check for existence of MS_RUNTIME_LIBRARIES
|
|
835 |
######################################################
|
|
836 |
sane-msvcrt_path:
|
|
837 |
ifeq ($(PLATFORM), windows)
|
|
838 |
@if [ ! -r "$(MSVCRT_DLL_PATH)/msvcrt.dll" ]; then \
|
|
839 |
$(ECHO) "ERROR: You do not have access to msvcrt.dll. \n" \
|
|
840 |
" Please check your access to \n" \
|
|
841 |
" $(MSVCRT_DLL_PATH) \n" \
|
|
842 |
" and/or check your value of ALT_MSVCRT_DLL_PATH. \n" \
|
|
843 |
"" >> $(ERROR_FILE) ; \
|
|
844 |
fi
|
|
845 |
ifeq ($(ARCH_DATA_MODEL), 32)
|
|
846 |
ifeq ($(COMPILER_VERSION), VS2003)
|
|
847 |
@if [ ! -r "$(MSVCR71_DLL_PATH)/msvcr71.dll" ]; then \
|
|
848 |
$(ECHO) "ERROR: You do not have access to msvcr71.dll. \n" \
|
|
849 |
" Please check your access to \n" \
|
|
850 |
" $(MSVCR71_DLL_PATH) \n" \
|
|
851 |
" and/or check your value of ALT_MSVCR71_DLL_PATH. \n" \
|
|
852 |
"" >> $(ERROR_FILE) ; \
|
|
853 |
fi
|
|
854 |
endif
|
|
855 |
endif
|
|
856 |
endif
|
|
857 |
|
|
858 |
######################################################
|
|
859 |
# Check for existence of COMPILER_PATH
|
|
860 |
######################################################
|
|
861 |
sane-compiler_path:
|
|
862 |
@if [ "$(COMPILER_PATH)" != "" -a ! -r "$(COMPILER_PATH)" ]; then \
|
|
863 |
$(ECHO) "ERROR: You do not have a valid COMPILER_PATH setting. \n" \
|
|
864 |
" Please check your access to \n" \
|
|
865 |
" $(COMPILER_PATH) \n" \
|
|
866 |
" and/or check your value of ALT_COMPILER_PATH. \n" \
|
|
867 |
"" >> $(ERROR_FILE) ; \
|
|
868 |
fi
|
|
869 |
|
|
870 |
######################################################
|
|
871 |
# Check for existence of UNIXCOMMAND_PATH
|
|
872 |
######################################################
|
|
873 |
sane-unixcommand_path:
|
|
874 |
@if [ "$(UNIXCOMMAND_PATH)" != "" -a ! -r "$(UNIXCOMMAND_PATH)" ]; then \
|
|
875 |
$(ECHO) "ERROR: You do not have a valid UNIXCOMMAND_PATH setting. \n" \
|
|
876 |
" Please check your access to \n" \
|
|
877 |
" $(UNIXCOMMAND_PATH) \n" \
|
|
878 |
" and/or check your value of ALT_UNIXCOMMAND_PATH. \n" \
|
|
879 |
"" >> $(ERROR_FILE) ; \
|
|
880 |
fi
|
|
881 |
ifeq ($(PLATFORM), windows)
|
|
882 |
@for utility in cpio ar file m4 ; do \
|
|
883 |
if [ ! -r "`$(WHICH) $${utility}`" ]; then \
|
|
884 |
$(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \
|
|
885 |
" directory $(UNIXCOMMAND_PATH). \n" \
|
|
886 |
" The utilities cpio, ar, file, and m4 are required. \n" \
|
|
887 |
"" >> $(WARNING_FILE) ; \
|
|
888 |
fi; \
|
|
889 |
done
|
|
890 |
endif
|
|
891 |
|
|
892 |
######################################################
|
|
893 |
# Check for existence of USRBIN_PATH on linux
|
|
894 |
######################################################
|
|
895 |
sane-usrbin_path:
|
|
896 |
ifeq ($(PLATFORM), linux)
|
|
897 |
@if [ "$(USRBIN_PATH)" != "" -a ! -r "$(USRBIN_PATH)" ]; then \
|
|
898 |
$(ECHO) "ERROR: You do not have a valid USRBIN_PATH setting. \n" \
|
|
899 |
" Please check your access to \n" \
|
|
900 |
" $(USRBIN_PATH) \n" \
|
|
901 |
" and/or check your value of ALT_USRBIN_PATH. \n" \
|
|
902 |
"" >> $(ERROR_FILE) ; \
|
|
903 |
fi
|
|
904 |
endif
|
|
905 |
|
|
906 |
######################################################
|
|
907 |
# Check for existence of UNIXCCS_PATH on solaris
|
|
908 |
######################################################
|
|
909 |
sane-unixccs_path:
|
|
910 |
ifeq ($(PLATFORM), solaris)
|
|
911 |
@if [ "$(UNIXCCS_PATH)" != "" -a ! -r "$(UNIXCCS_PATH)" ]; then \
|
|
912 |
$(ECHO) "ERROR: You do not have a valid UNIXCCS_PATH setting. \n" \
|
|
913 |
" Please check your access to \n" \
|
|
914 |
" $(UNIXCCS_PATH) \n" \
|
|
915 |
" and/or check your value of ALT_UNIXCCS_PATH. \n" \
|
|
916 |
"" >> $(ERROR_FILE) ; \
|
|
917 |
fi
|
|
918 |
endif
|
|
919 |
|
|
920 |
######################################################
|
|
921 |
# Verify the docs directory exists
|
|
922 |
######################################################
|
|
923 |
sane-docs_import:
|
|
924 |
@if [ ! -d "$(HOTSPOT_DOCS_IMPORT_PATH)" ]; then \
|
|
925 |
$(ECHO) "WARNING: The directory HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_DOCS_IMPORT_PATH) \n" \
|
|
926 |
" does not exist, check your value of ALT_HOTSPOT_DOCS_IMPORT_PATH. \n" \
|
|
927 |
"" >> $(WARNING_FILE) ; \
|
|
928 |
fi
|
|
929 |
|
|
930 |
######################################################
|
|
931 |
# Check for possible problem regarding __fabsf, math_iso.h and the libm patch.
|
|
932 |
# Hotspot should have been changed in Mustang 6.0 Build 47 to not depend
|
|
933 |
# on __fabsf, this is just checking that fact now.
|
|
934 |
######################################################
|
|
935 |
sane-math_iso:
|
|
936 |
ifeq ($(PLATFORM), solaris)
|
|
937 |
@if [ -f $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \
|
|
938 |
if [ "`$(NM) $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) | $(GREP) __fabsf`" != "" ]; then \
|
|
939 |
$(ECHO) "WARNING: This version of hotspot relies on __fabsf \n" \
|
|
940 |
" which is not always available on Solaris 8 and 9 machines \n" \
|
|
941 |
" unless they have the latest libm patch and the file \n" \
|
|
942 |
" /usr/include/iso/math_iso.h which can trigger this dependency.\n" \
|
|
943 |
" Hotspot should NOT be dependent on this extern, check the \n" \
|
|
944 |
" version of the hotspot library you are using. \n" \
|
|
945 |
"" >> $(WARNING_FILE) ; \
|
|
946 |
fi; \
|
|
947 |
fi
|
|
948 |
endif
|
|
949 |
|
|
950 |
######################################################
|
|
951 |
# Check for possible patch problem regarding /usr/lib/libCrun.so
|
|
952 |
######################################################
|
|
953 |
sane-libCrun:
|
|
954 |
ifeq ($(PLATFORM), solaris)
|
|
955 |
@if [ "`$(NM) /usr/lib/libCrun.so.1 | $(GREP) __1c2n6FIpv_0_`" = "" ]; then \
|
|
956 |
$(ECHO) "WARNING: The file /usr/lib/libCrun.so.1 is missing the extern \n" \
|
|
957 |
" __1c2n6FIpv_0_ which indicates that the system is missing \n" \
|
|
958 |
" a required Solaris patch, or you are using a pre-FCS release \n" \
|
|
959 |
" of Solaris 10. You need the latest /usr/lib/libCrun.so.1 \n" \
|
|
960 |
" which comes with the FCS release of Solaris 10 and available \n" \
|
|
961 |
" through the latest Solaris 8 or 9 C++ runtime patches. \n" \
|
|
962 |
"" >> $(WARNING_FILE) ; \
|
|
963 |
fi
|
|
964 |
endif
|
|
965 |
|
|
966 |
######################################################
|
|
967 |
# Check for existence of MSDEVTOOLS_PATH on windows
|
|
968 |
######################################################
|
|
969 |
sane-msdevtools_path:
|
|
970 |
ifeq ($(PLATFORM), windows)
|
|
971 |
@if [ "$(MSDEVTOOLS_PATH)" != "" -a ! -r "$(MSDEVTOOLS_PATH)" ]; then \
|
|
972 |
$(ECHO) "ERROR: You do not have a valid MSDEVTOOLS_PATH setting. \n" \
|
|
973 |
" Please check your access to \n" \
|
|
974 |
" $(MSDEVTOOLS_PATH) \n" \
|
|
975 |
" and/or check your value of ALT_MSDEVTOOLS_PATH. \n" \
|
|
976 |
"" >> $(ERROR_FILE) ; \
|
|
977 |
fi
|
|
978 |
endif
|
|
979 |
|
|
980 |
######################################################
|
|
981 |
# Check for existence of Hotspot binaries
|
|
982 |
######################################################
|
|
983 |
sane-hotspot_binaries:
|
|
984 |
ifeq ($(ARCH_DATA_MODEL), 32)
|
|
985 |
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \
|
|
986 |
$(ECHO) "ERROR: HOTSPOT_CLIENT_PATH does not point to a valid HotSpot VM. \n" \
|
|
987 |
" Please check your access to \n" \
|
|
988 |
" $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \
|
|
989 |
" and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
|
|
990 |
"" >> $(ERROR_FILE) ; \
|
|
991 |
fi
|
|
992 |
endif
|
|
993 |
@if [ ! -r $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \
|
|
994 |
$(ECHO) "ERROR: HOTSPOT_SERVER_PATH does not point to a valid HotSpot VM. \n" \
|
|
995 |
" Please check your access to \n" \
|
|
996 |
" $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \
|
|
997 |
" and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
|
|
998 |
"" >> $(ERROR_FILE) ; \
|
|
999 |
fi
|
|
1000 |
@#
|
|
1001 |
@# Check value of HOTSPOT_LIB_PATH
|
|
1002 |
@#
|
|
1003 |
ifeq ($(PLATFORM), windows)
|
|
1004 |
@if [ ! -r $(HOTSPOT_LIB_PATH)/jvm.lib ]; then \
|
|
1005 |
$(ECHO) "ERROR: HOTSPOT_LIB_PATH does not point to a valid HotSpot library. \n" \
|
|
1006 |
" Please check your access to \n" \
|
|
1007 |
" $(HOTSPOT_LIB_PATH)/jvm.lib \n" \
|
|
1008 |
" and/or check your value of ALT_HOTSPOT_LIB_PATH. \n" \
|
|
1009 |
"" >> $(ERROR_FILE) ; \
|
|
1010 |
fi
|
|
1011 |
@#
|
|
1012 |
@# Check for the .map files - its OK if they are not there..
|
|
1013 |
@#
|
|
1014 |
ifeq ($(ARCH_DATA_MODEL), 32)
|
|
1015 |
@# There is no 64-bit HotSpot client VM
|
|
1016 |
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.map ]; then \
|
|
1017 |
$(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .map files. \n" \
|
|
1018 |
" These files are optional and aid in the debugging of the JVM. \n" \
|
|
1019 |
" Please check your access to \n" \
|
|
1020 |
" $(HOTSPOT_CLIENT_PATH)/jvm.map \n" \
|
|
1021 |
" and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
|
|
1022 |
"" >> $(WARNING_FILE) ; \
|
|
1023 |
fi
|
|
1024 |
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.pdb ]; then \
|
|
1025 |
$(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .pdb files. \n" \
|
|
1026 |
" These files are optional and aid in the debugging of the JVM. \n" \
|
|
1027 |
" Please check your access to \n" \
|
|
1028 |
" $(HOTSPOT_CLIENT_PATH)/jvm.pdb \n" \
|
|
1029 |
" and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
|
|
1030 |
"" >> $(WARNING_FILE) ; \
|
|
1031 |
fi
|
|
1032 |
endif
|
|
1033 |
@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.map ]; then \
|
|
1034 |
$(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .map files. \n" \
|
|
1035 |
" These files are optional and aid in the debugging of the JVM. \n" \
|
|
1036 |
" Please check your access to \n" \
|
|
1037 |
" $(HOTSPOT_SERVER_PATH)/jvm.map \n" \
|
|
1038 |
" and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
|
|
1039 |
"" >> $(WARNING_FILE) ; \
|
|
1040 |
fi
|
|
1041 |
@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.pdb ]; then \
|
|
1042 |
$(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .pdb files. \n" \
|
|
1043 |
" These files are optional and aid in the debugging of the JVM. \n" \
|
|
1044 |
" Please check your access to \n" \
|
|
1045 |
" $(HOTSPOT_SERVER_PATH)/jvm.pdb \n" \
|
|
1046 |
" and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
|
|
1047 |
"" >> $(WARNING_FILE) ; \
|
|
1048 |
fi
|
|
1049 |
endif
|
|
1050 |
|
|
1051 |
|
|
1052 |
######################################################
|
|
1053 |
# Check for existence of misc Hotspot imported files
|
|
1054 |
######################################################
|
|
1055 |
HOTSPOT_INCLUDE_FILE_LIST = jvmti.h
|
|
1056 |
#HOTSPOT_INCLUDE_FILE_LIST += jni.h jni_md.h
|
|
1057 |
#HOTSPOT_INCLUDE_FILE_LIST += jvm.h jvm_md.h
|
|
1058 |
#HOTSPOT_INCLUDE_FILE_LIST += jmm.h
|
|
1059 |
TMP_SDK_INCLUDE_FILE_LIST=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.h)
|
|
1060 |
TMP_SDK_INCLUDE_FILE_DIFFS=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.hdiffs)
|
|
1061 |
|
|
1062 |
# These include files must have a pattern: 'version: MAJOR.MINOR.MICRO'
|
|
1063 |
# where MACRO, MINOR, and MICRO are numbers, e.g. 1.0.1, 0.2.90, etc.
|
|
1064 |
# The critical version we are checking is MAJOR.MINOR, we print all three
|
|
1065 |
# when we detect an error.
|
|
1066 |
|
|
1067 |
TMP_SDK_INCLUDE_FIND_VERSION= $(EGREP) 'version:'
|
|
1068 |
TMP_SDK_INCLUDE_GET_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \
|
|
1069 |
$(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9].*@\1@'
|
|
1070 |
TMP_SDK_INCLUDE_GET_FULL_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \
|
|
1071 |
$(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*@\1@'
|
|
1072 |
|
|
1073 |
# Compare an interface file (Rule creates 2 temp files: %.h and %.h.IMPORT)
|
|
1074 |
# Files jvm.h, jvm_md.h and jmm.h are special in that they are not publicly
|
|
1075 |
# exported but do represent VM interfaces used by the rest of the jdk.
|
|
1076 |
# So these 3 will not be found in a promoted build and can only
|
|
1077 |
# be checked when this represents a full control build (i.e. the
|
|
1078 |
# HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
|
|
1079 |
$(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
|
|
1080 |
@$(install-file)
|
|
1081 |
@$(RM) $@.IMPORT
|
|
1082 |
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \
|
|
1083 |
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \
|
|
1084 |
elif [ "$(@F)" != "jvm.h" -a "$(@F)" != "jmm.h" ] ; then \
|
|
1085 |
$(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \
|
|
1086 |
" Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
|
|
1087 |
"" >> $(WARNING_FILE) ; \
|
|
1088 |
$(CP) $< $@.IMPORT; \
|
|
1089 |
else \
|
|
1090 |
$(CP) $< $@.IMPORT; \
|
|
1091 |
fi
|
|
1092 |
|
|
1093 |
$(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
|
|
1094 |
@$(install-file)
|
|
1095 |
@$(RM) $@.IMPORT
|
|
1096 |
@if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \
|
|
1097 |
$(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \
|
|
1098 |
elif [ "$(@F)" != "jvm_md.h" ] ; then \
|
|
1099 |
$(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \
|
|
1100 |
" Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
|
|
1101 |
"" >> $(WARNING_FILE) ; \
|
|
1102 |
$(CP) $< $@.IMPORT; \
|
|
1103 |
else \
|
|
1104 |
$(CP) $< $@.IMPORT; \
|
|
1105 |
fi
|
|
1106 |
|
|
1107 |
# Compares the two tempfiles: %.h and %.h.IMPORT, answer in %.hdiffs
|
|
1108 |
# Note: Putting anything into the hdiffs file will trigger generic IMPORT
|
|
1109 |
# warning message in hotspot_import_include.
|
|
1110 |
# First checks the major.minor versions, the micro number can differ.
|
|
1111 |
# Second checks the full version.
|
|
1112 |
# Lastly does a full diff if the full version differs or it has no version
|
|
1113 |
$(TEMPDIR)/%.hdiffs: $(TEMPDIR)/%.h
|
|
1114 |
@$(prep-target)
|
|
1115 |
@$(TOUCH) $@
|
|
1116 |
@if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_VERSION)`" != \
|
|
1117 |
"`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_VERSION)`" ] ; then \
|
|
1118 |
$(ECHO) "WARNING: The file $(<F) is not the same interface as the VM version.\n " \
|
|
1119 |
" this workspace has $(<F) `$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` and \n " \
|
|
1120 |
" HOTSPOT_IMPORT_PATH contains $(<F) `$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` \n" \
|
|
1121 |
"" >> $(WARNING_FILE) ; \
|
|
1122 |
$(ECHO) "Version mis-match" > $@ ; \
|
|
1123 |
fi
|
|
1124 |
@if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" != \
|
|
1125 |
"`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" ] ; then \
|
|
1126 |
$(RM) $<.filtered $<.IMPORT.filtered; \
|
|
1127 |
$(EGREP) -v 'VERSION' $< > $<.filtered; \
|
|
1128 |
$(EGREP) -v 'VERSION' $<.IMPORT > $<.IMPORT.filtered; \
|
|
1129 |
($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \
|
|
1130 |
elif [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_FIND_VERSION)`" = "" ] ; then \
|
|
1131 |
$(RM) $<.filtered $<.IMPORT.filtered; \
|
|
1132 |
$(EGREP) -v '@\(#\)' $< > $<.filtered; \
|
|
1133 |
$(EGREP) -v '@\(#\)' $<.IMPORT > $<.IMPORT.filtered; \
|
|
1134 |
($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \
|
|
1135 |
fi
|
|
1136 |
|
|
1137 |
# Verify all imported hotspot files
|
|
1138 |
sane-hotspot_import:: sane-hotspot_import_dir sane-hotspot_import_include
|
|
1139 |
|
|
1140 |
# Verify the base directory exists
|
|
1141 |
sane-hotspot_import_dir:
|
|
1142 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS)
|
|
1143 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_LIST)
|
|
1144 |
@if [ ! -d "$(HOTSPOT_IMPORT_PATH)" ]; then \
|
|
1145 |
$(ECHO) "WARNING: The directory HOTSPOT_IMPORT_PATH=$(HOTSPOT_IMPORT_PATH) \n" \
|
|
1146 |
" does not exist, check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
|
|
1147 |
"" >> $(WARNING_FILE) ; \
|
|
1148 |
fi
|
|
1149 |
|
|
1150 |
# Verify hotspot include files
|
|
1151 |
sane-hotspot_import_include: $(TMP_SDK_INCLUDE_FILE_LIST) $(TMP_SDK_INCLUDE_FILE_DIFFS)
|
|
1152 |
@if [ "`$(CAT) $(TMP_SDK_INCLUDE_FILE_DIFFS)`" != "" ] ; then \
|
|
1153 |
$(ECHO) "WARNING: Possible HotSpot VM interface conflict. \n" \
|
|
1154 |
" HOTSPOT_IMPORT_PATH is used to import files from the VM build. \n" \
|
|
1155 |
" It is also used to verify that any copied files are consistent between \n" \
|
|
1156 |
" these two components. It has been detected that one or more of the \n" \
|
|
1157 |
" VM interface files inside this workspace may not match the interfaces \n" \
|
|
1158 |
" exported by the VM, or the VM versions could not be found. \n" \
|
|
1159 |
" The list of VM interface files is: \n" \
|
|
1160 |
" $(HOTSPOT_INCLUDE_FILE_LIST). \n" \
|
|
1161 |
" This workspace has copies of these files at: \n" \
|
|
1162 |
" $(SHARE_SRC)/javavm/export and $(PLATFORM_SRC)/javavm/export \n" \
|
|
1163 |
" for build purposes, and they should contain the same interfaces \n" \
|
|
1164 |
" as the VM versions imported from: \n" \
|
|
1165 |
" \$$(HOTSPOT_IMPORT_PATH)/include \n" \
|
|
1166 |
" (i.e. $(HOTSPOT_IMPORT_PATH)/include) \n" \
|
|
1167 |
" If an interface indeed doesn't match, then the use of this interface \n" \
|
|
1168 |
" at JDK runtime could cause serious errors. \n" \
|
|
1169 |
"" >> $(WARNING_FILE) ; \
|
|
1170 |
for i in $(TMP_SDK_INCLUDE_FILE_DIFFS); do \
|
|
1171 |
if [ -s $$i ] ; then \
|
|
1172 |
$(ECHO) " " >> $(WARNING_FILE); \
|
|
1173 |
$(ECHO) "VM Interface Differences: $$i" >> $(WARNING_FILE); \
|
|
1174 |
$(CAT) $$i >> $(WARNING_FILE); \
|
|
1175 |
$(ECHO) " " >> $(WARNING_FILE); \
|
|
1176 |
fi; \
|
|
1177 |
done; \
|
|
1178 |
fi
|
|
1179 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS)
|
|
1180 |
@$(RM) $(TMP_SDK_INCLUDE_FILE_LIST)
|
|
1181 |
|
|
1182 |
# The JDI-SA feature is not currently released on some platforms.
|
|
1183 |
# See the Defs-<arch>.gmk files.
|
|
1184 |
|
|
1185 |
ifeq ($(INCLUDE_SA), true)
|
|
1186 |
# Verify that hotspot Serviceability Agent files are present. To keep
|
|
1187 |
# it simple, we will just check for one of them. The others have arch
|
|
1188 |
# dependent paths.
|
|
1189 |
|
|
1190 |
sane-hotspot_import::
|
|
1191 |
@if [ ! -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
|
|
1192 |
$(ECHO) "WARNING: File $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar does not exist.\n" \
|
|
1193 |
" The JDI binding for the Serviceability Agent will not be included in the build.\n" \
|
|
1194 |
" Please check your access to\n" \
|
|
1195 |
" $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar\n" \
|
|
1196 |
" and/or check your value of ALT_HOTSPOT_IMPORT_PATH.\n" \
|
|
1197 |
"" >> $(WARNING_FILE) ; \
|
|
1198 |
fi
|
|
1199 |
endif
|
|
1200 |
|
|
1201 |
######################################################
|
|
1202 |
# Check the ant version
|
|
1203 |
######################################################
|
|
1204 |
ANT_CHECK :=$(call CheckVersions,$(ANT_VER),$(REQUIRED_ANT_VER))
|
|
1205 |
sane-ant_version:
|
|
1206 |
@if [ "$(ANT_CHECK)" != "same" \
|
|
1207 |
-a "$(ANT_CHECK)" != "newer" ]; then \
|
|
1208 |
$(ECHO) "WARNING: The version of ant being used is older than \n" \
|
|
1209 |
" the required version of '$(REQUIRED_ANT_VER)'. \n" \
|
|
1210 |
" The version of ant found was '$(ANT_VER)'. \n" \
|
|
1211 |
"" >> $(WARNING_FILE) ; \
|
|
1212 |
fi
|
|
1213 |
|
|
1214 |
######################################################
|
|
1215 |
# Check the findbugs version
|
|
1216 |
######################################################
|
|
1217 |
FINDBUGS_CHECK :=$(call CheckVersions,$(FINDBUGS_VER),$(REQUIRED_FINDBUGS_VER))
|
|
1218 |
sane-findbugs_version:
|
|
1219 |
@if [ "$(FINDBUGS_CHECK)" != "same" \
|
|
1220 |
-a "$(FINDBUGS_CHECK)" != "newer" ]; then \
|
|
1221 |
$(ECHO) "WARNING: The version of findbugs being used is older than \n" \
|
|
1222 |
" the required version of '$(REQUIRED_FINDBUGS_VER)'. \n" \
|
|
1223 |
" The version of findbugs found was '$(FINDBUGS_VER)'. \n" \
|
|
1224 |
"" >> $(WARNING_FILE) ; \
|
|
1225 |
fi
|
|
1226 |
|
|
1227 |
######################################################
|
|
1228 |
# Check the zip file version
|
|
1229 |
######################################################
|
|
1230 |
ZIP_CHECK :=$(call CheckVersions,$(ZIP_VER),$(REQUIRED_ZIP_VER))
|
|
1231 |
sane-zip_version: sane-unzip_version
|
|
1232 |
@if [ "$(ZIP_CHECK)" != "same" -a "$(ZIP_CHECK)" != "newer" ]; then \
|
|
1233 |
$(ECHO) "WARNING: The version of zip being used is older than \n" \
|
|
1234 |
" the required version of '$(REQUIRED_ZIP_VER)'. \n" \
|
|
1235 |
" The version of zip found was '$(ZIP_VER)'. \n" \
|
|
1236 |
"" >> $(WARNING_FILE) ; \
|
|
1237 |
fi
|
|
1238 |
|
|
1239 |
######################################################
|
|
1240 |
# Check the unzip file version
|
|
1241 |
######################################################
|
|
1242 |
UNZIP_CHECK :=$(call CheckVersions,$(UNZIP_VER),$(REQUIRED_UNZIP_VER))
|
|
1243 |
sane-unzip_version:
|
|
1244 |
@if [ "$(UNZIP_CHECK)" != "same" -a "$(UNZIP_CHECK)" != "newer" ]; then \
|
|
1245 |
$(ECHO) "WARNING: The version of unzip being used is older than \n" \
|
|
1246 |
" the required version of '$(REQUIRED_UNZIP_VER)'. \n" \
|
|
1247 |
" The version of unzip found was '$(UNZIP_VER)'. \n" \
|
|
1248 |
"" >> $(WARNING_FILE) ; \
|
|
1249 |
fi
|
|
1250 |
|
|
1251 |
######################################################
|
|
1252 |
# Check for windows DirectX sdk directory
|
|
1253 |
######################################################
|
|
1254 |
sane-dxsdk:
|
|
1255 |
ifeq ($(PLATFORM), windows)
|
|
1256 |
@if [ ! -r $(DXSDK_INCLUDE_PATH)/ddraw.h ]; then \
|
|
1257 |
$(ECHO) "ERROR: You do not have access to a valid DirectX SDK Include dir.\n" \
|
|
1258 |
" The value of DXSDK_INCLUDE_PATH must point a valid DX SDK dir.\n" \
|
|
1259 |
" Please check your access to \n" \
|
|
1260 |
" $(DXSDK_INCLUDE_PATH) \n" \
|
|
1261 |
" and/or check your value of ALT_DXSDK_PATH or ALT_DXSDK_INCLUDE_PATH.\n" \
|
|
1262 |
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
|
|
1263 |
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
|
|
1264 |
" Or http://www.microsoft.com/directx\n" \
|
|
1265 |
"" >> $(ERROR_FILE) ; \
|
|
1266 |
else \
|
|
1267 |
if [ ! "$(DXSDK_VER)" = "$(REQUIRED_DXSDK_VER)" ]; then \
|
|
1268 |
$(ECHO) "ERROR: The DirectX SDK must be version $(REQUIRED_DXSDK_VER).\n" \
|
|
1269 |
" $(YOU_ARE_USING) DirectX SDK version: $(DXSDK_VER)\n" \
|
|
1270 |
" The DirectX SDK was obtained from the following location: \n" \
|
|
1271 |
" $(DXSDK_PATH) \n" \
|
|
1272 |
" Please change your DirectX SDK. \n" \
|
|
1273 |
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
|
|
1274 |
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
|
|
1275 |
" Or http://www.microsoft.com/directx\n" \
|
|
1276 |
"" >> $(ERROR_FILE) ; \
|
|
1277 |
else \
|
|
1278 |
if [ -r $(DXSDK_INCLUDE_PATH)/basetsd.h ]; then \
|
|
1279 |
if [ `$(EGREP) -c __int3264 $(DXSDK_INCLUDE_PATH)/basetsd.h` -ne 0 ]; then \
|
|
1280 |
$(ECHO) "WARNING: The DirectX SDK Include directory contains a newer basetsd.h,\n" \
|
|
1281 |
" which may indicate that you're using an incorrect version of DirectX SDK.\n" \
|
|
1282 |
" This may result in a build failure.\n" \
|
|
1283 |
" The DirectX SDK Include dir was obtained from the following location:\n" \
|
|
1284 |
" $(DXSDK_INCLUDE_PATH) \n" \
|
|
1285 |
" Please change your DirectX SDK to version 7 or 9 (Summer 2004 Update or newer).\n" \
|
|
1286 |
" Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \
|
|
1287 |
" http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
|
|
1288 |
" Or http://www.microsoft.com/directx\n" \
|
|
1289 |
"" >> $(WARNING_FILE) ; \
|
|
1290 |
fi \
|
|
1291 |
fi \
|
|
1292 |
fi \
|
|
1293 |
fi
|
|
1294 |
endif
|
|
1295 |
|
|
1296 |
######################################################
|
|
1297 |
# Check the linker version(s)
|
|
1298 |
######################################################
|
|
1299 |
ifeq ($(PLATFORM), windows)
|
|
1300 |
LINK_CHECK :=$(call CheckVersions,$(LINK_VER),$(REQUIRED_LINK_VER))
|
|
1301 |
endif
|
|
1302 |
sane-link:
|
|
1303 |
ifdef LINK_VER
|
|
1304 |
@if [ "$(LINK_CHECK)" = "missing" ]; then \
|
|
1305 |
$(ECHO) "ERROR: The Linker version is undefined. \n" \
|
|
1306 |
"" >> $(ERROR_FILE) ; \
|
|
1307 |
fi
|
|
1308 |
@if [ "$(LINK_CHECK)" != "same" ]; then \
|
|
1309 |
$(ECHO) "WARNING: To build Java 2 SDK $(JDK_VERSION) you need : \n" \
|
|
1310 |
" $(COMPILER_VERSION) - link.exe version \"$(REQUIRED_LINK_VER)\" \n" \
|
|
1311 |
" Specifically the $(COMPILER_NAME) link.exe. \n " \
|
|
1312 |
" $(YOU_ARE_USING) Linker version \"$(LINK_VER)\" \n" \
|
|
1313 |
"" >> $(WARNING_FILE) ; \
|
|
1314 |
fi
|
|
1315 |
endif
|
|
1316 |
|
|
1317 |
######################################################
|
|
1318 |
# Check the compiler version(s)
|
|
1319 |
######################################################
|
|
1320 |
CC_CHECK :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER))
|
|
1321 |
ifeq ($(PLATFORM), solaris)
|
|
1322 |
ifeq ($(ARCH_DATA_MODEL), 32)
|
|
1323 |
GCC_CHECK :=$(call CheckVersions,$(GCC_VER),$(REQUIRED_GCC_VER))
|
|
1324 |
endif
|
|
1325 |
endif
|
|
1326 |
sane-compiler: sane-link
|
|
1327 |
@if [ "$(CC_CHECK)" = "missing" ]; then \
|
|
1328 |
$(ECHO) "ERROR: The Compiler version is undefined. \n" \
|
|
1329 |
"" >> $(ERROR_FILE) ; \
|
|
1330 |
fi
|
|
1331 |
ifndef OPENJDK
|
|
1332 |
@if [ "$(CC_CHECK)" != "same" ]; then \
|
|
1333 |
$(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \
|
|
1334 |
" Specifically the $(COMPILER_NAME) $(CC_TYPE) compiler. \n " \
|
|
1335 |
" $(YOU_ARE_USING) compiler version: $(CC_VER) \n" \
|
|
1336 |
" The compiler was obtained from the following location: \n" \
|
|
1337 |
" $(COMPILER_PATH) \n" \
|
|
1338 |
"" >> $(WARNING_FILE) ; \
|
|
1339 |
fi
|
|
1340 |
ifdef GCC_CHECK
|
|
1341 |
@if [ "$(GCC_CHECK)" != "same" ]; then \
|
|
1342 |
$(ECHO) "WARNING: The $(PLATFORM) GCC compiler must be version $(REQUIRED_GCC_VER) \n" \
|
|
1343 |
" $(YOU_ARE_USING) compiler version: $(GCC_VER) \n" \
|
|
1344 |
" The compiler was obtained from the following location: \n" \
|
|
1345 |
" $(GCC_COMPILER_PATH) \n" \
|
|
1346 |
" Please change your compiler. \n" \
|
|
1347 |
"" >> $(WARNING_FILE) ; \
|
|
1348 |
fi
|
|
1349 |
endif
|
|
1350 |
ifeq ($(PLATFORM), windows)
|
|
1351 |
ifeq ($(ARCH_DATA_MODEL), 64)
|
|
1352 |
ifneq ($(COMPILER_VERSION), VS2005)
|
|
1353 |
@$(ECHO) "WARNING: Should be using VS2005 compiler on 64bit platform. \n" \
|
|
1354 |
"" >> $(WARNING_FILE)
|
|
1355 |
endif
|
|
1356 |
endif
|
|
1357 |
endif
|
|
1358 |
endif
|
|
1359 |
|
|
1360 |
######################################################
|
|
1361 |
# Check that ALSA headers and libs are installed and
|
|
1362 |
# that the header has the right version. We only
|
|
1363 |
# need /usr/include/alsa/*.h and /usr/lib/libasound.so
|
|
1364 |
######################################################
|
|
1365 |
|
|
1366 |
ifdef ALSA_VERSION_CHECK
|
|
1367 |
$(ALSA_VERSION_CHECK): $(ALSA_VERSION_CHECK).c
|
|
1368 |
@$(prep-target)
|
|
1369 |
@$(CC) -lasound -o $@ $<
|
|
1370 |
|
|
1371 |
$(ALSA_VERSION_CHECK).c:
|
|
1372 |
@$(prep-target)
|
|
1373 |
@$(ECHO) "#include <alsa/asoundlib.h>\n" \
|
|
1374 |
"int main(char** argv, int argc) {\n" \
|
|
1375 |
" printf(\"%s\", SND_LIB_VERSION_STR);\n" \
|
|
1376 |
" return 0;\n" \
|
|
1377 |
"}\n" \
|
|
1378 |
> $@
|
|
1379 |
endif
|
|
1380 |
|
|
1381 |
sane-alsa-versioncheck: $(ALSA_VERSION_CHECK)
|
|
1382 |
sane-alsa-headers: sane-alsa-versioncheck
|
|
1383 |
ifdef ALSA_VERSION_CHECK
|
|
1384 |
@if [ -f "$(ALSA_VERSION_CHECK)" ]; then \
|
|
1385 |
if [ `$(ALSA_VERSION_CHECK) | $(EGREP) -c '$(REQUIRED_ALSA_VERSION)'` -ne 1 ] ; then \
|
|
1386 |
$(ECHO) "ERROR: The ALSA version must be 0.9.1 or higher. \n" \
|
|
1387 |
" You have the following ALSA version installed: $(ALSA_VERSION) \n" \
|
|
1388 |
" Please reinstall ALSA (drivers and lib). You can download \n" \
|
|
1389 |
" the source distribution from http://www.alsa-project.org \n" \
|
|
1390 |
" or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
|
|
1391 |
"" >> $(ERROR_FILE) ; \
|
|
1392 |
fi \
|
|
1393 |
else \
|
|
1394 |
$(ECHO) "ERROR: You seem to not have installed ALSA 0.9.1 or higher. \n" \
|
|
1395 |
" Please install ALSA (drivers and lib). You can download the \n" \
|
|
1396 |
" source distribution from http://www.alsa-project.org or go to \n" \
|
|
1397 |
" http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
|
|
1398 |
"" >> $(ERROR_FILE) ; \
|
|
1399 |
fi
|
|
1400 |
endif
|
|
1401 |
|
|
1402 |
# If a sanity file doesn't exist, just make sure it's dir exists
|
|
1403 |
$(SANITY_FILES):
|
|
1404 |
-@$(prep-target)
|
|
1405 |
|
|
1406 |
######################################################
|
|
1407 |
# dump out the variable settings...
|
|
1408 |
######################################################
|
|
1409 |
sane-settings:: sane-alsa-versioncheck
|
|
1410 |
@$(ECHO) >> $(MESSAGE_FILE)
|
|
1411 |
@$(ECHO) $(ALL_SETTINGS) >> $(MESSAGE_FILE)
|
|
1412 |
@$(ECHO) >> $(MESSAGE_FILE)
|
|
1413 |
|
|
1414 |
######################################################
|
|
1415 |
# Check for existence of DEPLOY_MSSDK on windows
|
|
1416 |
######################################################
|
|
1417 |
sane-mssdk_path:
|
|
1418 |
ifeq ($(PLATFORM), windows)
|
|
1419 |
@if [ -z "$(DEPLOY_MSSDK)" ]; then \
|
|
1420 |
$(ECHO) "WARNING: Your DEPLOY_MSSDK setting is empty.\n" \
|
|
1421 |
" It is recommended to set ALT_DEPLOY_MSSDK.\n" \
|
|
1422 |
"" >> $(WARNING_FILE) ; \
|
|
1423 |
fi
|
|
1424 |
@if [ ! -r "$(DEPLOY_MSSDK)" ]; then \
|
|
1425 |
$(ECHO) "ERROR: You do not have a valid DEPLOY_MSSDK setting. \n" \
|
|
1426 |
" Please check your access to \n" \
|
|
1427 |
" $(DEPLOY_MSSDK) \n" \
|
|
1428 |
" and/or check your value of ALT_DEPLOY_MSSDK. \n" \
|
|
1429 |
"" >> $(ERROR_FILE) ; \
|
|
1430 |
fi
|
|
1431 |
endif
|
|
1432 |
|
|
1433 |
######################################################
|
|
1434 |
# Check for existence of INSTALL_MSSDK on windows
|
|
1435 |
######################################################
|
|
1436 |
sane-install-mssdk_path:
|
|
1437 |
ifeq ($(PLATFORM), windows)
|
|
1438 |
@if [ -z "$(INSTALL_MSSDK)" ]; then \
|
|
1439 |
$(ECHO) "WARNING: Your INSTALL_MSSDK setting is empty.\n" \
|
|
1440 |
" It is recommended to set ALT_INSTALL_MSSDK.\n" \
|
|
1441 |
"" >> $(WARNING_FILE) ; \
|
|
1442 |
fi
|
|
1443 |
@if [ ! -r "$(INSTALL_MSSDK)" ]; then \
|
|
1444 |
$(ECHO) "ERROR: You do not have a valid INSTALL_MSSDK setting. \n" \
|
|
1445 |
" Please check your access to \n" \
|
|
1446 |
" $(INSTALL_MSSDK) \n" \
|
|
1447 |
" and/or check your value of ALT_INSTALL_MSSDK. \n" \
|
|
1448 |
"" >> $(ERROR_FILE) ; \
|
|
1449 |
fi
|
|
1450 |
endif
|
|
1451 |
|
|
1452 |
######################################################
|
|
1453 |
# Check for existence of INSTALL_MSIVAL2 on windows
|
|
1454 |
######################################################
|
|
1455 |
sane-install-msival2_path:
|
|
1456 |
ifeq ($(PLATFORM), windows)
|
|
1457 |
@if [ -z "$(INSTALL_MSIVAL2)" ]; then \
|
|
1458 |
$(ECHO) "WARNING: Your INSTALL_MSIVAL2 setting is empty.\n" \
|
|
1459 |
" It is recommended to set ALT_INSTALL_MSIVAL2.\n" \
|
|
1460 |
"" >> $(WARNING_FILE) ; \
|
|
1461 |
fi
|
|
1462 |
@if [ ! -r "$(INSTALL_MSIVAL2)" ]; then \
|
|
1463 |
$(ECHO) "ERROR: You do not have a valid INSTALL_MSIVAL2 setting. \n" \
|
|
1464 |
" Please check your access to \n" \
|
|
1465 |
" $(INSTALL_MSIVAL2) \n" \
|
|
1466 |
" and/or check your value of ALT_INSTALL_MSIVAL2. \n" \
|
|
1467 |
"" >> $(ERROR_FILE) ; \
|
|
1468 |
fi
|
|
1469 |
endif
|
|
1470 |
|
|
1471 |
######################################################
|
|
1472 |
# Check the Solaris GNU c++ compiler for solaris plugin
|
|
1473 |
######################################################
|
|
1474 |
sane-gcc-compiler:
|
|
1475 |
ifeq ($(PLATFORM), solaris)
|
|
1476 |
ifndef OPENJDK
|
|
1477 |
@if [ -r $(GCC_COMPILER_PATH) ]; then \
|
|
1478 |
if [ ! "$(GCC_VER)" = 2.95.2 ]; then \
|
|
1479 |
$(ECHO) "ERROR: The Solaris GCC compiler version must be 2.95.2. \n" \
|
|
1480 |
" You are using the following compiler version: $(GCC_VER) \n" \
|
|
1481 |
" The compiler was obtained from the following location: \n" \
|
|
1482 |
" $(GCC_COMPILER_PATH) \n" \
|
|
1483 |
" Please change your compiler. \n" \
|
|
1484 |
"" >> $(ERROR_FILE) ; \
|
|
1485 |
fi \
|
|
1486 |
else \
|
|
1487 |
$(ECHO) "ERROR: You do not have a valid GCC_COMPILER_PATH setting. \n" \
|
|
1488 |
" Please check your access to \n" \
|
|
1489 |
" $(GCC_COMPILER_PATH) \n" \
|
|
1490 |
" and/or check your value of ALT_GCC_COMPILER_PATH. \n" \
|
|
1491 |
" This will affect you if you build the plugin target. \n" \
|
|
1492 |
"" >> $(ERROR_FILE) ; \
|
|
1493 |
fi
|
|
1494 |
endif
|
|
1495 |
|
|
1496 |
ifeq ($(PLATFORM), linux)
|
|
1497 |
ifdef ALT_GCC29_COMPILER_PATH
|
|
1498 |
@if [ ! -x $(ALT_GCC29_COMPILER_PATH)/bin/gcc ]; then \
|
|
1499 |
$(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \
|
|
1500 |
" Please check your access to \n" \
|
|
1501 |
" $(ALT_GCC29_COMPILER_PATH)/bin/gcc \n" \
|
|
1502 |
" This will affect you if you build the plugin target. \n" \
|
|
1503 |
"" >> $(ERROR_FILE) ; \
|
|
1504 |
fi
|
|
1505 |
endif
|
|
1506 |
ifdef ALT_GCC29_PLUGIN_LIB_PATH
|
|
1507 |
@if [ ! -r $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so ]; then \
|
|
1508 |
$(ECHO) "Error: You do not have a valid ALT_GCC29_PLUGIN_LIB_PATH setting. \n" \
|
|
1509 |
" Please check your access to \n" \
|
|
1510 |
" $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so \n" \
|
|
1511 |
" This will affect you if you build the plugin target, specifically for gcc 2.9 version of OJI plugin library. \n" \
|
|
1512 |
"" >> $(ERROR_FILE) ; \
|
|
1513 |
fi
|
|
1514 |
else
|
|
1515 |
@if [ ! -r $(GCC29_COMPILER_PATH) ]; then \
|
|
1516 |
$(ECHO) "ERROR: You do not have a valid GCC29_COMPILER_PATH setting. \n" \
|
|
1517 |
" Please check your access to \n" \
|
|
1518 |
" $(GCC29_COMPILER_PATH) \n" \
|
|
1519 |
" and/or check your value of ALT_GCC29_COMPILER_PATH. \n" \
|
|
1520 |
" This will affect you if you build the plugin target. \n" \
|
|
1521 |
"" >> $(ERROR_FILE) ; \
|
|
1522 |
fi
|
|
1523 |
endif
|
|
1524 |
endif
|
|
1525 |
endif
|
|
1526 |
|
|
1527 |
|
|
1528 |
######################################################
|
|
1529 |
# MOZILLA_HEADERS_PATH must be valid
|
|
1530 |
######################################################
|
|
1531 |
sane-mozilla:
|
|
1532 |
ifeq ($(ARCH_DATA_MODEL), 32)
|
|
1533 |
ifdef ALT_MOZILLA_HEADERS_PATH
|
|
1534 |
@if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
|
|
1535 |
$(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \
|
|
1536 |
" not a Relative Path Name. \n" \
|
|
1537 |
" The current value of ALT_MOZILLA_HEADERS_PATH is \n" \
|
|
1538 |
" $(ALT_MOZILLA_HEADERS_PATH) \n" \
|
|
1539 |
" Please fix this and continue your build. \n" \
|
|
1540 |
"" >> $(ERROR_FILE) ; \
|
|
1541 |
fi
|
|
1542 |
endif
|
|
1543 |
@#
|
|
1544 |
@# MOZILLA_HEADERS_PATH must be valid....
|
|
1545 |
@#
|
|
1546 |
ifeq ($(PLATFORM), windows)
|
|
1547 |
@if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18.win32/java/bool.h ]; then \
|
|
1548 |
$(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \
|
|
1549 |
" Please check your access to \n" \
|
|
1550 |
" $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18.win32/java/bool.h \n" \
|
|
1551 |
" and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \
|
|
1552 |
" and on Windows, ALT_JDK_JAVA_DRIVE. \n" \
|
|
1553 |
"" >> $(ERROR_FILE) ; \
|
|
1554 |
fi
|
|
1555 |
else
|
|
1556 |
@if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18/java/bool.h ]; then \
|
|
1557 |
$(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \
|
|
1558 |
" Please check your access to \n" \
|
|
1559 |
" $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18/java/bool.h \n" \
|
|
1560 |
" and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \
|
|
1561 |
"" >> $(ERROR_FILE) ; \
|
|
1562 |
fi
|
|
1563 |
endif
|
|
1564 |
endif
|
|
1565 |
|
|
1566 |
|
|
1567 |
######################################################
|
|
1568 |
# SECURITY_BASELINE_142 test
|
|
1569 |
######################################################
|
|
1570 |
security_baseline_142:
|
|
1571 |
ifeq ($(PLATFORM), windows)
|
|
1572 |
@if [ -z "$(SECURITY_BASELINE_142)" ]; then \
|
|
1573 |
$(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \
|
|
1574 |
" Setting it to the default value of 1.4.2_10.\n" \
|
|
1575 |
" It is recommended to set SECURITY_BASELINE_142.\n" \
|
|
1576 |
"" >> $(WARNING_FILE) ; \
|
|
1577 |
fi
|
|
1578 |
endif
|
|
1579 |
|
|
1580 |
######################################################
|
|
1581 |
# SECURITY_BASELINE_150 test
|
|
1582 |
######################################################
|
|
1583 |
security_baseline_150:
|
|
1584 |
ifeq ($(PLATFORM), windows)
|
|
1585 |
@if [ -z "$(SECURITY_BASELINE_150)" ]; then \
|
|
1586 |
$(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \
|
|
1587 |
" Setting it to the default value of 1.5.0_07.\n" \
|
|
1588 |
" It is recommended to set SECURITY_BASELINE_150.\n" \
|
|
1589 |
"" >> $(WARNING_FILE) ; \
|
|
1590 |
fi
|
|
1591 |
endif
|
|
1592 |
|
|
1593 |
|
|
1594 |
######################################################
|
|
1595 |
# this should be the last rule in any target's sanity rule.
|
|
1596 |
######################################################
|
|
1597 |
sane-lastrule:
|
|
1598 |
ifndef EXTERNALSANITYCONTROL
|
|
1599 |
@if [ -r $(MESSAGE_FILE) ]; then \
|
|
1600 |
$(CAT) $(MESSAGE_FILE) ; \
|
|
1601 |
fi
|
|
1602 |
@if [ -r $(WARNING_FILE) ]; then \
|
|
1603 |
$(CAT) $(WARNING_FILE) ; \
|
|
1604 |
fi
|
|
1605 |
@if [ "x$(INSANE)" != x ]; then \
|
|
1606 |
$(ECHO) "INSANE mode requested. \n" \
|
|
1607 |
"Sanity will not force a build termination, even with errors.\n" \
|
|
1608 |
"" >> $(ERROR_FILE); \
|
|
1609 |
fi
|
|
1610 |
@if [ -r $(ERROR_FILE) ]; then \
|
|
1611 |
if [ "x$(INSANE)" = x ]; then \
|
|
1612 |
$(ECHO) "Exiting because of the above error(s). \n" \
|
|
1613 |
"">> $(ERROR_FILE); \
|
|
1614 |
fi ; \
|
|
1615 |
$(CAT) $(ERROR_FILE) ; \
|
|
1616 |
if [ "x$(INSANE)" = x ]; then \
|
|
1617 |
exit 1 ; \
|
|
1618 |
fi ; \
|
|
1619 |
fi
|
|
1620 |
ifdef PEDANTIC
|
|
1621 |
@if [ -r $(WARNING_FILE) ]; then \
|
|
1622 |
$(ECHO) "PEDANTIC mode requested. \n" \
|
|
1623 |
"Exiting because of the above warning(s). \n" \
|
|
1624 |
"" >> $(ERROR_FILE); \
|
|
1625 |
$(CAT) $(ERROR_FILE) ; \
|
|
1626 |
exit 1 ; \
|
|
1627 |
fi
|
|
1628 |
endif # PEDANTIC
|
|
1629 |
@if [ ! -r $(ERROR_FILE) ]; then \
|
|
1630 |
$(ECHO) "Sanity check passed." ; \
|
|
1631 |
fi
|
|
1632 |
endif # EXTERNALSANITYCONTROL
|
|
1633 |
|