annotate make/common/shared/Sanity.gmk @ 3436:1f056ddda771

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