annotate make/common/shared/Sanity.gmk @ 1214:c06d30bd8c69

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