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