Sanity.gmk revision 2080
0N/A#
1416N/A# Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation. Sun designates this
0N/A# particular file as subject to the "Classpath" exception as provided
0N/A# by Sun in the LICENSE file that accompanied this code.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A#
0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A# CA 95054 USA or visit www.sun.com if you need additional information or
0N/A# have any questions.
0N/A#
0N/A
0N/A#
0N/A# WARNING: This file is shared with other workspaces.
0N/A#
0N/A
0N/A#
0N/A# Shared sanity rules for the JDK builds.
0N/A#
0N/A
0N/A.SUFFIXES: .hdiffs
0N/A
0N/A# All files created during sanity checking
0N/A
0N/ASANITY_FILES = $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE)
0N/A
0N/A# How to say "The Release Engineering people use this"
914N/ATHE_OFFICIAL_USES=The official builds on $(PLATFORM) use
0N/A
0N/A# How to say "You are using:"
0N/AYOU_ARE_USING=You appear to be using
0N/A
914N/A# Error message
914N/Adefine SanityError
914N/A$(ECHO) "ERROR: $1\n" >> $(ERROR_FILE)
914N/Aendef
914N/A
914N/A# Warning message
914N/Adefine SanityWarning
914N/A$(ECHO) "WARNING: $1\n" >> $(WARNING_FILE)
914N/Aendef
914N/A
914N/A# Official version error message: name version required_version
914N/Adefine OfficialErrorMessage
914N/A$(call SanityError,\
914N/A$(THE_OFFICIAL_USES) $1 $3. Your $1 $(if $2,undefined,$2) will not work.)
914N/Aendef
914N/A
914N/A# Official version warning message: name version required_version
914N/Adefine OfficialWarningMessage
914N/A$(call SanityWarning,\
914N/A$(THE_OFFICIAL_USES) $1 $3. $(YOU_ARE_USING) $1 $2.)
914N/Aendef
914N/A
914N/A
0N/A# Settings and rules to validate the JDK build environment.
0N/A
0N/Aifeq ($(PLATFORM), solaris)
0N/A FREE_SPACE := $(shell $(DF) -b $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$2;}')
0N/A TEMP_FREE_SPACE := $(shell $(DF) -b $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$2;}')
914N/A # What kind of system we are using (Variations are Solaris and OpenSolaris)
914N/A OS_VERSION := $(shell uname -r)
914N/A OS_VARIANT_NAME := $(strip $(shell head -1 /etc/release | awk '{print $$1;}') )
914N/A OS_VARIANT_VERSION := $(OS_VERSION)
0N/A REQ_PATCH_LIST = $(JDK_TOPDIR)/make/PatchList.solaris
0N/A ifeq ($(ARCH_FAMILY), sparc)
0N/A PATCH_POSITION = $$4
0N/A else
0N/A PATCH_POSITION = $$6
0N/A endif
914N/A ifndef OPENJDK
914N/A _GCC_VER :=$(shell $(GCC) -dumpversion 2>&1 )
914N/A GCC_VER :=$(call GetVersion,"$(_GCC_VER)")
914N/A endif
0N/Aendif
0N/A
0N/Aifeq ($(PLATFORM), linux)
0N/A FREE_SPACE := $(shell $(DF) --sync -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
0N/A TEMP_FREE_SPACE := $(shell $(DF) --sync -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
914N/A # What kind of system we are using (Variation is the Linux vendor)
914N/A OS_VERSION := $(shell uname -r)
914N/A OS_VARIANT_NAME := $(shell \
914N/A if [ -f /etc/fedora-release ] ; then \
914N/A echo "Fedora"; \
914N/A elif [ -f /etc/redhat-release ] ; then \
914N/A echo "RedHat"; \
914N/A elif [ -f /etc/SuSE-release ] ; then \
914N/A echo "SuSE"; \
914N/A else \
914N/A echo "Unknown"; \
914N/A fi)
914N/A OS_VARIANT_VERSION := $(shell \
914N/A if [ "$(OS_VARIANT_NAME)" = "Fedora" ] ; then \
914N/A $(CAT) /etc/fedora-release | $(HEAD) -1 | $(NAWK) '{ print $$3; }' ; \
914N/A fi)
914N/A ALSA_INCLUDE=/usr/include/alsa/version.h
914N/A ALSA_LIBRARY=/usr/lib/libasound.so
914N/A _ALSA_VERSION := $(shell $(EGREP) SND_LIB_VERSION_STR $(ALSA_INCLUDE) | \
914N/A $(SED) -e 's@.*\"\(.*\)\".*@\1@' )
914N/A ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION))
0N/Aendif
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A FREE_SPACE := $(shell $(DF) -kP $(OUTPUTDIR) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
0N/A TEMP_FREE_SPACE := $(shell $(DF) -kP $(TEMP_DISK) | $(TAIL) -1 | $(NAWK) '{print $$4;}')
914N/A # Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
914N/A # Assume 5.0 (Windows 2000) if systeminfo does not help
914N/A WINDOWS_MAPPING-5.0 := Windows2000
914N/A WINDOWS_MAPPING-5.1 := WindowsXP
914N/A WINDOWS_MAPPING-5.2 := Windows2003
914N/A # What kind of system we are using (Variation is the common name)
914N/A _OS_VERSION := \
914N/A $(shell systeminfo 2> $(DEV_NULL) | \
914N/A egrep '^OS Version:' | \
914N/A awk '{print $$3;}' )
914N/A ifeq ($(_OS_VERSION),)
914N/A OS_VERSION = 5.0
914N/A else
942N/A OS_VERSION = $(call MajorVersion,$(_OS_VERSION)).$(call MinorVersion,$(_OS_VERSION))
398N/A endif
914N/A OS_VARIANT_NAME := $(WINDOWS_MAPPING-$(OS_VERSION))
914N/A OS_VARIANT_VERSION := $(OS_VERSION)
914N/A ifdef USING_CYGWIN
914N/A # CYGWIN version
914N/A _CYGWIN_VER := $(SYSTEM_UNAME)
914N/A CYGWIN_VER :=$(call GetVersion,$(_CYGWIN_VER))
914N/A endif
430N/A DXSDK_VER := $(shell $(EGREP) DIRECT3D_VERSION $(DXSDK_INCLUDE_PATH)/d3d9.h 2>&1 | \
0N/A $(EGREP) "\#define" | $(NAWK) '{print $$3}')
0N/Aendif
0N/A
0N/A# Get the version numbers of what we are using
0N/A_MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1)
0N/A_ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip')
0N/A_UNZIP_VER :=$(shell $(UNZIP) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^UnZip')
0N/A_BOOT_VER :=$(shell $(BOOTDIR)/bin/java -version 2>&1 | $(HEAD) -n 1)
0N/AMAKE_VER :=$(call GetVersion,"$(_MAKE_VER)")
0N/AZIP_VER :=$(call GetVersion,"$(_ZIP_VER)")
0N/AUNZIP_VER :=$(call GetVersion,"$(_UNZIP_VER)")
0N/ABOOT_VER :=$(call GetVersion,"$(_BOOT_VER)")
0N/A
535N/A_ANT_VER:=$(shell $(ANT) -version 2>&1 )
117N/AANT_VER:=$(call GetVersion,"$(_ANT_VER)")
0N/A
0N/Aifdef ALT_BINDIR
0N/A ALT_BINDIR_VERSION := $(shell $(ALT_BINDIR)/java$(EXE_SUFFIX) -version 2>&1 | $(NAWK) -F'"' '{ print $$2 }')
0N/A ALT_BINDIR_OK := $(shell $(ECHO) $(ALT_BINDIR_VERSION) | $(EGREP) -c '^$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)')
0N/Aendif
0N/A
0N/AINSTALL_PATCHES_FILE = $(TEMPDIR)/installed.patches
0N/A
0N/A# Get ALL_SETTINGS defined
0N/Ainclude $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
0N/A
0N/A.PHONY: \
0N/A sane-copyrightyear\
0N/A sane-settings \
0N/A sane-insane \
0N/A sane-build_number \
0N/A sane-os_version \
0N/A sane-memory_check \
0N/A sane-windows \
0N/A sane-locale \
0N/A sane-linux \
0N/A sane-cygwin \
0N/A sane-cygwin-shell \
0N/A sane-mks \
0N/A sane-arch_data_model \
0N/A sane-os_patch_level \
0N/A sane-classpath \
0N/A sane-java_home \
0N/A sane-fonts \
0N/A sane-binary-plugs \
0N/A sane-variant \
0N/A sane-ld_library_path \
0N/A sane-ld_library_path_64 \
0N/A sane-ld_options \
0N/A sane-ld_run_path \
0N/A sane-makeflags \
0N/A sane-alt_outputdir \
0N/A sane-outputdir \
0N/A sane-alt_bootdir \
0N/A sane-bootdir \
1220N/A sane-local-bootdir \
1220N/A sane-cups \
0N/A sane-devtools_path \
0N/A sane-compiler_path \
0N/A sane-unixcommand_path \
0N/A sane-usrbin_path \
0N/A sane-unixccs_path \
0N/A sane-docs_import \
0N/A sane-math_iso \
0N/A sane-libCrun \
0N/A sane-odbcdir \
0N/A sane-msdevtools_path \
0N/A sane-hotspot_binaries \
0N/A sane-hotspot_import \
0N/A sane-hotspot_import_dir \
0N/A sane-hotspot_import_include \
0N/A sane-compiler \
0N/A sane-link \
0N/A sane-cacerts \
0N/A sane-alsa-headers \
0N/A sane-ant_version \
0N/A sane-zip_version \
0N/A sane-unzip_version \
0N/A sane-msvcrt_path \
0N/A sane-freetype
0N/A
0N/A######################################################
0N/A# check for COPYRIGHT_YEAR variable
0N/A######################################################
0N/Asane-copyrightyear:
0N/Aifdef ALT_COPYRIGHT_YEAR
0N/A @$(ECHO) "WARNING: ALT_COPYRIGHT_YEAR but not the current year\n" \
0N/A " will be used for copyright year.\n " \
0N/A "" >>$(WARNING_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# check for INSANE variable
0N/A######################################################
0N/Asane-insane:
0N/Aifdef INSANE
0N/A @$(ECHO) "WARNING: You are building in 'INSANE' mode. You \n" \
0N/A " should not use this mode, and in fact, \n" \
0N/A " it may be removed at any time. If you \n" \
0N/A " have build problems as a result of using \n" \
0N/A " INSANE mode, then you should not expect \n" \
0N/A " assistance from anyone with the problems \n" \
0N/A " or consequences you experience. \n" \
0N/A "" >> $(WARNING_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# check for GNU Make version
0N/A######################################################
0N/AMAKE_CHECK :=$(call CheckVersions,$(MAKE_VER),$(REQUIRED_MAKE_VER))
0N/Asane-make:
0N/A @if [ "$(MAKE_CHECK)" != "same" -a "$(MAKE_CHECK)" != "newer" ]; then \
0N/A $(ECHO) "WARNING: The version of make being used is older than \n" \
0N/A " the required version of '$(REQUIRED_MAKE_VER)'. \n" \
0N/A " The version of make found was '$(MAKE_VER)'. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check the BUILD_NUMBER to make sure it contains bNN
0N/A######################################################
0N/Asane-build_number:
0N/A @if [ "`$(ECHO) $(BUILD_NUMBER) | $(SED) 's@.*b[0-9][0-9]*.*@bNN@'`" != "bNN" ] ; then \
0N/A $(ECHO) "WARNING: The BUILD_NUMBER needs to contain b[0-9][0-9]*. Currently BUILD_NUMBER=$(BUILD_NUMBER). \n" \
0N/A " This has been known to cause build failures. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check the ARCH_DATA_MODEL setting
0N/A######################################################
0N/Asane-arch_data_model:
0N/A @if [ "$(ARCH_DATA_MODEL)" != 32 -a "$(ARCH_DATA_MODEL)" != 64 ]; then \
0N/A $(ECHO) "ERROR: The setting of ARCH_DATA_MODEL must be 32 or 64.\n" \
0N/A " $(YOU_ARE_USING) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL). \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check the OS version (windows and linus have release name checks)
0N/A# NOTE: OPENJDK explicitly does not check for OS release information.
0N/A# Unless we know for sure that it will not build somewhere, we cannot
0N/A# generate a fatal sanity error, and a warning about the official
0N/A# build platform just becomes clutter.
0N/A######################################################
914N/Aifndef OPENJDK
914N/A OS_VERSION_CHECK := \
914N/A $(call CheckVersions,$(OS_VERSION),$(REQUIRED_OS_VERSION))
914N/A ifeq ($(OS_VARIANT_NAME),$(REQUIRED_OS_VARIANT_NAME))
914N/A OS_VARIANT_VERSION_CHECK := \
914N/A $(call CheckVersions,$(OS_VARIANT_VERSION),$(REQUIRED_OS_VARIANT_VERSION))
914N/A endif
914N/Aendif
0N/Asane-os_version:: sane-arch_data_model sane-memory_check sane-locale sane-os_patch_level
0N/Aifndef OPENJDK
914N/A ifneq ($(OS_VARIANT_NAME),$(REQUIRED_OS_VARIANT_NAME))
914N/A ifeq ($(OS_VERSION_CHECK),missing)
914N/A @$(call OfficialErrorMessage,OS version,$(OS_VERSION),$(REQUIRED_OS_VERSION))
914N/A endif
914N/A ifneq ($(OS_VERSION_CHECK),same)
914N/A @$(call OfficialWarningMessage,OS version,$(OS_VERSION),$(REQUIRED_OS_VERSION))
914N/A endif
914N/A @$(call OfficialWarningMessage,OS variant,$(OS_VARIANT_NAME),$(REQUIRED_OS_VARIANT_NAME))
914N/A else
914N/A ifneq ($(OS_VARIANT_VERSION_CHECK),same)
914N/A @$(call OfficialWarningMessage,$(OS_VARIANT_NAME) version,$(OS_VARIANT_VERSION),$(REQUIRED_OS_VARIANT_VERSION))
914N/A endif
914N/A endif
0N/Aendif # OPENJDK
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A sane-os_version:: sane-cygwin sane-mks sane-cygwin-shell
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the memory available on this machine
0N/A######################################################
0N/Asane-memory_check:
0N/A @if [ "$(LOW_MEMORY_MACHINE)" = "true" ]; then \
0N/A $(ECHO) "WARNING: This machine appears to only have $(MB_OF_MEMORY)Mb of physical memory, \n" \
0N/A " builds on this machine could be slow. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check the locale (value of LC_ALL, not being empty or ==C can be a problem)
0N/A######################################################
0N/Asane-locale:
0N/Aifneq ($(PLATFORM), windows)
0N/A @if [ "$(LC_ALL)" != "" -a "$(LC_ALL)" != "C" ]; then \
0N/A $(ECHO) "WARNING: LC_ALL has been set to $(LC_ALL), this can cause build failures. \n" \
0N/A " Try setting LC_ALL to \"C\". \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A @if [ "$(LANG)" != "" -a "$(LANG)" != "C" ]; then \
0N/A $(ECHO) "WARNING: LANG has been set to $(LANG), this can cause build failures. \n" \
0N/A " Try setting LANG to \"C\". \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the Windows cygwin version
0N/A######################################################
0N/Aifeq ($(PLATFORM), windows)
0N/A CYGWIN_CHECK :=$(call CheckVersions,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER))
0N/Asane-cygwin:
0N/A ifdef USING_CYGWIN
914N/A ifeq ($(CYGWIN_CHECK),missing)
914N/A @$(call OfficialErrorMessage,CYGWIN version,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER))
914N/A endif
914N/A ifeq ($(CYGWIN_CHECK),older)
914N/A @$(call OfficialWarningMessage,CYGWIN version,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER))
914N/A endif
0N/A endif
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the cygwin shell is used, not cmd.exe
0N/A######################################################
0N/Aifeq ($(PLATFORM), windows)
0N/Asane-cygwin-shell:
0N/A ifdef USING_CYGWIN
0N/A @if [ "$(SHLVL)" = "" -a "$(_)" = "" ]; then \
0N/A $(ECHO) "ERROR: You are using an unsupported shell. \n" \
0N/A " Use either sh, bash, ksh, zsh, or tcsh. \n" \
0N/A " Using the cmd.exe utility is not supported. \n" \
0N/A " If you still want to try your current shell, \n" \
0N/A " please export SHLVL=1 when running $(MAKE). \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the Windows mks version
0N/A######################################################
0N/Aifeq ($(PLATFORM), windows)
0N/A MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER))
0N/Asane-mks:
0N/A ifndef USING_CYGWIN
914N/A ifeq ($(MKS_CHECK),missing)
914N/A @$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
914N/A endif
914N/A ifeq ($(MKS_CHECK),older)
914N/A @$(call OfficialErrorMessage,MKS version,$(MKS_VER),$(REQUIRED_MKS_VER))
914N/A endif
0N/A endif
0N/Aendif
0N/A
0N/A######################################################
0N/A# Get list of installed patches (this file has a particular format)
0N/A######################################################
0N/A$(INSTALL_PATCHES_FILE):
0N/A @$(prep-target)
0N/Aifeq ($(PLATFORM), solaris)
0N/A ifeq ($(OS_VERSION),$(REQUIRED_OS_VERSION))
0N/A $(SHOWREV) -p > $@ 2>&1
0N/A endif
0N/Aendif
0N/A @$(ECHO) "" >> $@
0N/A
0N/A######################################################
0N/A# Check list of Solaris patches
0N/A######################################################
0N/Asane-os_patch_level: $(INSTALL_PATCHES_FILE)
0N/Aifeq ($(PLATFORM), solaris)
0N/A ifeq ($(OS_VERSION),$(REQUIRED_OS_VERSION))
0N/A @$(NAWK) 'BEGIN { \
0N/A readingInstallPatches = 0; \
0N/A requiredCount = 0; \
0N/A installCount = 0; \
0N/A} \
0N/A{ \
0N/A if (readingInstallPatches) { \
0N/A if ($$1=="Patch:") { \
0N/A ns = split($$2,parts,"-"); \
0N/A installPatchNo[installCount]=parts[1]; \
0N/A installPatchRev[installCount]=parts[2]; \
0N/A installCount++; \
0N/A } \
0N/A } \
0N/A \
0N/A if (!readingInstallPatches) { \
0N/A if (index($$1,"#") != 0) continue; \
0N/A if (match($$1,"BUILD") > 0 \
0N/A && $$2 == $(OS_VERSION) \
0N/A && ($$7 == "REQ" || $$7 == "req") \
0N/A && $(PATCH_POSITION) != "none" \
0N/A && $(PATCH_POSITION) != "NONE") { \
0N/A ns = split($(PATCH_POSITION),parts,"-"); \
0N/A requiredPatchNo[requiredCount]=parts[1]; \
0N/A requiredPatchRev[requiredCount]=parts[2]; \
0N/A requiredCount++; \
0N/A } \
0N/A } \
0N/A} \
0N/AEND { \
0N/A errorCount=0; \
0N/A for (i=0; i<requiredCount; i++) { \
0N/A foundMatch = 0; \
0N/A for (j=0; j<installCount; j++) { \
0N/A if (installPatchNo[j] == requiredPatchNo[i] \
0N/A && installPatchRev[j] >= requiredPatchRev[i]) { \
0N/A foundMatch = 1; \
0N/A break; \
0N/A } \
0N/A } \
0N/A if ( foundMatch == 0) { \
0N/A printf("WARNING: Your solaris install is missing the required patch %s-%s\n", requiredPatchNo[i], requiredPatchRev[i] ); \
0N/A printf(" Please update your your system patches or build on a different machine.\n\n" ); \
0N/A errorCount++; \
0N/A } \
0N/A } \
0N/A}' $(REQ_PATCH_LIST) readingInstallPatches=1 $(INSTALL_PATCHES_FILE) >> $(WARNING_FILE)
0N/A endif
0N/Aendif # PLATFORM
0N/A
0N/A######################################################
0N/A# CLASSPATH cannot be set, unless you are insane.
0N/A######################################################
0N/Asane-classpath:
0N/Aifdef CLASSPATH
0N/A @$(ECHO) "ERROR: Your CLASSPATH environment variable is set. This will \n" \
0N/A " most likely cause the build to fail. Please unset it \n" \
0N/A " and start your build again. \n" \
0N/A "" >> $(ERROR_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# JAVA_HOME cannot be set, unless you are insane.
0N/A######################################################
0N/Asane-java_home:
0N/Aifdef JAVA_HOME
0N/A @$(ECHO) "ERROR: Your JAVA_HOME environment variable is set. This will \n" \
0N/A " most likely cause the build to fail. Please unset it \n" \
0N/A " and start your build again. \n" \
0N/A "" >> $(ERROR_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# Make sure the fonts are there
0N/A# Exceptions are when explicitly building OPENJDK, or
0N/A# when the entire CLOSED_SRC dir is excluded, so we are
0N/A# implicitly building OPENJDK
0N/A######################################################
0N/AFONT_FILE=$(CLOSED_SRC)/share/lib/fonts/LucidaTypewriterRegular.ttf
0N/Asane-fonts:
0N/Aifndef OPENJDK
0N/A @if [ -d $(CLOSED_SRC) ] ; then \
0N/A if [ ! -f $(FONT_FILE) ] ; then \
0N/A $(ECHO) "ERROR: Missing $(FONT_FILE). \n" \
0N/A " Verify you have downloaded and overlayed on the source area all the binary files. \n" \
0N/A "" >> $(ERROR_FILE); \
0N/A fi \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# If building OPENJDK check pre-built binaries are
0N/A# available for binary plug source components.
0N/A######################################################
0N/Aifdef OPENJDK
0N/Asane-binary-plugs:
974N/A ifeq ($(IMPORT_BINARY_PLUGS),true)
0N/A @if [ ! -d "$(BINARY_PLUGS_PATH)" ]; then \
974N/A $(ECHO) "WARNING: Can't locate pre-built libraries. \n" \
0N/A " Please check your access to \n" \
0N/A " $(BINARY_PLUGS_PATH) \n" \
0N/A " and/or check your value of ALT_BINARY_PLUGS_PATH. \n" \
974N/A "" >> $(WARNING_FILE); \
0N/A fi
974N/A endif
0N/Aendif
0N/A
0N/A######################################################
0N/A# VARIANT must be set to DBG or OPT
0N/A######################################################
0N/Asane-variant:
0N/A @if [ "$(VARIANT)" != DBG -a "$(VARIANT)" != OPT ] ; then \
0N/A $(ECHO) "ERROR: Your VARIANT environment variable is set to $(VARIANT). \n" \
0N/A " Needs to be set to DBG or OPT \n" \
0N/A "" >> $(ERROR_FILE); \
0N/A fi
0N/A
0N/A######################################################
0N/A# LD_LIBRARY_PATH should not be set, unless you are insane.
0N/A######################################################
0N/Asane-ld_library_path:
0N/Aifdef LD_LIBRARY_PATH
0N/A @$(ECHO) "ERROR: Your LD_LIBRARY_PATH environment variable is set. This may \n" \
0N/A " produce binaries binaries incorrectly. Please unset it \n" \
0N/A " and start your build again. \n" \
0N/A "" >> $(ERROR_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# LD_LIBRARY_PATH_64 should not be set, unless you are insane.
0N/A######################################################
0N/Asane-ld_library_path_64:
0N/Aifdef LD_LIBRARY_PATH_64
0N/A @$(ECHO) "ERROR: Your LD_LIBRARY_PATH_64 environment variable is set. This may \n" \
0N/A " produce binaries binaries incorrectly. Please unset it \n" \
0N/A " and start your build again. \n" \
0N/A "" >> $(ERROR_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# LD_OPTIONS should not be set, unless you are insane.
0N/A######################################################
0N/Asane-ld_options:
0N/Aifdef LD_OPTIONS
0N/A @$(ECHO) "ERROR: Your LD_OPTIONS environment variable is set. This may \n" \
0N/A " produce binaries binaries incorrectly. Please unset it \n" \
0N/A " and start your build again. \n" \
0N/A "" >> $(ERROR_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# LD_RUN_PATH should not be set, unless you are insane.
0N/A######################################################
0N/Asane-ld_run_path:
0N/Aifdef LD_RUN_PATH
0N/A @$(ECHO) "ERROR: Your LD_RUN_PATH environment variable is set. This may \n" \
0N/A " produce binaries binaries incorrectly. Please unset it \n" \
0N/A " produce binaries binaries incorrectly. Please unset it \n" \
0N/A " and start your build again. \n" \
0N/A "" >> $(ERROR_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# MAKEFLAGS cannot be set, unless you are insane.
0N/A######################################################
0N/Aifeq ($(PLATFORM), windows)
0N/Aifdef USING_CYGWIN
0N/AREAL_MAKEFLAGS:=$(subst --unix,,$(MAKEFLAGS))
0N/Aelse
0N/AREAL_MAKEFLAGS:=$(MAKEFLAGS)
0N/Aendif
0N/Aelse
0N/AREAL_MAKEFLAGS:=$(MAKEFLAGS)
0N/Aendif
0N/Asane-makeflags:
0N/A# ifneq ($(strip $(REAL_MAKEFLAGS)),)
0N/Aifeq ($(origin MAKEFLAGS),environment)
0N/A @#
0N/A @# it is unacceptable to have the-e or --environment-overrides value in MAKEFLAGS
0N/A @#
0N/A @if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(e|--environment-overrides)( |$$)'` -ne 0 ]; then \
0N/A $(ECHO) "ERROR: Either the build was started with the flag -e or \n" \
0N/A " --environment-overrides, or the MAKEFLAGS environment \n" \
0N/A " variable has this value set. This will cause any \n" \
0N/A " environment variables you have defined to override \n" \
0N/A " the values defined by the makefiles. This practice is \n" \
0N/A " not recommemded by the authors of GNU Make, and \n" \
0N/A " will lead to an improper build. \n" \
0N/A " Please fix and restart the build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# it is unacceptable to havethe -i or --ignore-errors value in MAKEFLAGS
0N/A @#
0N/A @if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(i|--ignore-errors)( |$$)'` -ne 0 ]; then \
0N/A $(ECHO) "ERROR: Either the build was started with the flag -i or \n" \
0N/A " --ignore-errors, or the MAKEFLAGS environment \n" \
0N/A " variable has this value set. 1111 You will be unable \n" \
0N/A " to determine if the build is broken or not. \n" \
0N/A " Please fix and restart the build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# it is unacceptable to have the -I or --include-dir value in MAKEFLAGS
0N/A @#
0N/A @if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(I|--include-dir)( |$$)'` -ne 0 ]; then \
0N/A $(ECHO) "ERROR: Either the build was started with the flag -I or \n" \
0N/A " --include-dir, or the MAKEFLAGS environment \n" \
0N/A " variable has this value set. This will render your \n" \
0N/A " build questionable as not all the rules and depenencies \n" \
0N/A " are captured by the build. \n" \
0N/A " Please fix and restart the build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# it is unacceptable to have the -k or --keep-going value in MAKEFLAGS:
0N/A @#
0N/A @if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(k|--keep-going)( |$$)'` -ne 0 ]; then \
0N/A $(ECHO) "ERROR: Either the build was started with the flag -k or \n" \
0N/A " --keep-going, or the MAKEFLAGS environment \n" \
0N/A " variable has this value set. 222 You will be unable \n" \
0N/A " to determine if the build is broken or not. \n" \
0N/A " Please fix and restart the build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# it is unacceptable to have the -o or --assume-old or --old-filevalue in MAKEFLAGS:
0N/A @# Note - this rule never gets invoked because it is processed out
0N/A @# in GNU Make startup
0N/A @#
0N/A @if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(o|--assume-old|--old-file)( |$$)'` -ne 0 ]; then \
0N/A $(ECHO) "ERROR: Either the build was started with the flag -o or \n" \
0N/A " --assume-old or --old-file, or the MAKEFLAGS environment \n" \
0N/A " variable has this value set. This could prevent the \n" \
0N/A " build from executing rules it should, thus rendering a \n" \
0N/A " questionable result. \n" \
0N/A " Please fix and restart the build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# it is unacceptable to have the -r or --nobuiltin-rules value in MAKEFLAGS
0N/A @#
0N/A @if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(r|--no-builtin-rules)( |$$)'` -ne 0 ]; then \
0N/A $(ECHO) "ERROR: Either the build was started with the flag -r or \n" \
0N/A " --no-builtin-rules, or the MAKEFLAGS environment \n" \
0N/A " variable has this value set. This may break the build \n" \
0N/A " by not allowing builtin rules that may be required. \n" \
0N/A " Please fix and restart the build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# it is unacceptable to have the -t or --touch value in MAKEFLAGS
0N/A @# Note - this rule never gets invoked because it is processed out
0N/A @# in GNU Make startup
0N/A @#
0N/A @if [ `$(ECHO) $(MAKEFLAGS) | $(EGREP) -c '(^| )(t|--touch)( |$$)'` -ne 0 ]; then \
0N/A $(ECHO) "ERROR: Either the build was started with the flag -t or \n" \
0N/A " --touch, or the MAKEFLAGS environment \n" \
0N/A " variable has this value set. This will leave the \n" \
0N/A " build in a unclear state and could lead to not executing \n" \
0N/A " rules which should be executed. \n" \
0N/A " Please fix and restart the build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# show what is in MAKEFLAGS so the user is aware...
0N/A @#
0N/A @$(ECHO) "WARNING: Your MAKEFLAGS environment variable is set. \n" \
0N/A " You should be very careful about the values set here. \n" \
0N/A "\n" \
0N/A " MAKEFLAGS is set to =>$(MAKEFLAGS)<= \n" \
0N/A "" >> $(WARNING_FILE)
0N/Aendif
0N/A
0N/A######################################################
0N/A# if specified, ALT_OUTPUTDIR must point to non-relative path if set
0N/A######################################################
0N/Asane-alt_outputdir:
0N/Aifdef ALT_OUTPUTDIR
0N/A @if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
0N/A $(ECHO) "ERROR: ALT_OUTPUTDIR must be an Absolute Path Name, \n" \
0N/A " not a Relative Path Name. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A ifeq ($(PLATFORM), windows)
0N/A @if [ `$(ECHO) $(subst \,/,$(ALT_OUTPUTDIR)) | $(EGREP) -ci '^([a-z]:)'` -ne 1 ]; then \
0N/A $(ECHO) "ERROR: On windows, ALT_OUTPUTDIR must contain the drive letter. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/Aendif
0N/A
0N/A######################################################
0N/A# OUTPUTDIR tests
0N/A######################################################
0N/Asane-outputdir:
0N/A @#
0N/A @# OUTPUTDIR must be a directory...
0N/A @#
0N/A @if [ ! -d "$(OUTPUTDIR)" ]; then \
0N/A $(ECHO) "ERROR: OUTPUTDIR must be an existing directory. The current \n" \
0N/A " value of OUTPUTDIR is \n" \
0N/A " $(OUTPUTDIR) \n" \
0N/A " Please check your value of ALT_OUTPUTDIR. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# OUTPUTDIR must be writeable by user...
0N/A @#
0N/A @if [ ! -w "$(OUTPUTDIR)" ]; then \
0N/A $(ECHO) "ERROR: You must have write permissions to OUTPUTDIR. The \n" \
0N/A " current value of OUTPUTDIR is \n" \
0N/A " $(OUTPUTDIR) \n" \
0N/A " Either obtain these permissions or set ALT_OUTPUTDIR. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# OUTPUTDIR must have enough free space...
0N/A @#
0N/A @if [ $(FREE_SPACE) -lt $(REQUIRED_FREE_SPACE) ]; then \
0N/A $(ECHO) "WARNING: You may not have enough free space in your OUTPUTDIR. The \n" \
0N/A " current value of OUTPUTDIR is \n" \
0N/A " $(OUTPUTDIR) \n" \
0N/A " You need "$(REQUIRED_FREE_SPACE)" Kbytes free on this device to build \n" \
0N/A " and it appears that only "$(FREE_SPACE)" Kbytes are free. \n" \
0N/A " Either obtain more space or set ALT_OUTPUTDIR to a larger disk. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# if specified, ALT_BOOTDIR must point to non-relative path if set
0N/A######################################################
0N/Asane-alt_bootdir:
0N/Aifdef ALT_BOOTDIR
0N/A @if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
0N/A $(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
0N/A " not a Relative Path Name. \n" \
0N/A " The current value of ALT_BOOTDIR is \n" \
0N/A " $(ALT_BOOTDIR) \n" \
0N/A " Please fix this and continue your build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# BOOTDIR must point to a valid JDK.
0N/A######################################################
0N/ABOOT_CHECK :=$(call CheckVersions,$(BOOT_VER),$(REQUIRED_BOOT_VER))
0N/Asane-bootdir:
0N/A @if [ "$(BOOT_CHECK)" != "same" -a "$(BOOT_CHECK)" != "newer" ]; then \
0N/A $(ECHO) "ERROR: Your BOOTDIR environment variable does not point \n" \
0N/A " to a valid JDK for bootstrapping this build. \n" \
0N/A " A JDK $(JDK_MINOR_VERSION) $(MARKET_NAME) build must be bootstrapped using \n" \
0N/A " JDK $(PREVIOUS_JDK_VERSION) fcs (or later). \n" \
0N/A " Apparently, your bootstrap JDK is version $(BOOT_VER) \n" \
0N/A " Please update your ALT_BOOTDIR setting and start your build again. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
1220N/A# BOOTDIR is recommended to reside on a local drive
1220N/A######################################################
1220N/Asane-local-bootdir:
1220N/Aifeq ($(PLATFORM), windows)
1220N/A @if [ `$(ECHO) $(BOOTDIR) | $(EGREP) -ci '^J:'` -ne 0 ]; then \
1220N/A $(ECHO) "WARNING: Your BOOTDIR is located on the J: drive. Often the J:\n" \
1220N/A " drive is mapped over a network. Using a mapped drive for\n" \
1220N/A " the BOOTDIR may significantly slow down the build process.\n" \
1220N/A " You may want to consider using the ALT_BOOTDIR variable\n" \
1220N/A " to point the build to another location for the BOOTDIR instead. \n" \
1220N/A " Your current BOOTDIR is:\n" \
1220N/A " $(BOOTDIR) \n" \
1220N/A "" >> $(WARNING_FILE) ; \
1220N/A fi
1220N/Aendif
1220N/A
1220N/A######################################################
0N/A# CACERTS_FILE must be absoulte path and readable
0N/A######################################################
0N/Asane-cacerts:
0N/A ifdef ALT_CACERTS_FILE
0N/A @if [ `$(ECHO) $(subst \,/,$(ALT_CACERTS_FILE)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
0N/A $(ECHO) "ERROR: ALT_CACERTS_FILE must be an Absolute Path Name, \n" \
0N/A " not a Relative Path Name. \n" \
0N/A " The current value of ALT_CACERTS_FILE is \n" \
0N/A " $(ALT_CACERTS_FILE) \n" \
0N/A " Please fix this and continue your build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/A @#
0N/A @# CACERTS_FILE must be readable
0N/A @#
0N/A @if [ ! -r "$(subst \,/,$(CACERTS_FILE))" ]; then \
0N/A $(ECHO) "ERROR: You do not have access to a valid cacerts file. \n" \
0N/A " Please check your access to \n" \
0N/A " $(subst \,/,$(CACERTS_FILE)) \n" \
0N/A " and/or check your value of ALT_CACERTS_FILE. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# CACERTS_FILE must be a file
0N/A @#
0N/A @if [ -d "$(subst \,/,$(CACERTS_FILE))" ]; then \
0N/A $(ECHO) "ERROR: You do not have access to a valid cacerts file.\n" \
0N/A " The value of CACERTS_FILE must point to a normal file.\n" \
0N/A " Please check your access to \n" \
0N/A " $(subst \,/,$(CACERTS_FILE)) \n" \
0N/A " and/or check your value of ALT_CACERTS_FILE. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A
0N/A
0N/A######################################################
0N/A# Check for availability of FreeType (OpenJDK specific)
0N/A######################################################
0N/A
0N/Aifdef OPENJDK
0N/A
165N/A# The freetypecheck Makefile prints out "Failed" if not good enough
165N/A$(TEMPDIR)/freetypeinfo: FRC
165N/A @$(prep-target)
165N/A @(($(CD) $(BUILDDIR)/tools/freetypecheck && $(MAKE)) || \
165N/A $(ECHO) "Failed to build freetypecheck." ) > $@
0N/A
165N/Asane-freetype: $(TEMPDIR)/freetypeinfo
165N/A @if [ "`$(CAT) $< | $(GREP) Fail`" != "" ]; then \
0N/A $(ECHO) "ERROR: FreeType version " $(REQUIRED_FREETYPE_VERSION) \
165N/A " or higher is required. \n" \
165N/A "`$(CAT) $<` \n" >> $(ERROR_FILE) ; \
0N/A fi
0N/A
0N/Aelse
0N/A#do nothing (not OpenJDK)
0N/Asane-freetype:
0N/Aendif
0N/A
0N/A######################################################
0N/A# CUPS_HEADERS_PATH must be valid
0N/A######################################################
0N/Asane-cups:
0N/Aifneq ($(PLATFORM), windows)
0N/A @if [ ! -r $(CUPS_HEADERS_PATH)/cups/cups.h ]; then \
0N/A $(ECHO) "ERROR: You do not have access to valid Cups header files. \n" \
0N/A " Please check your access to \n" \
0N/A " $(CUPS_HEADERS_PATH)/cups/cups.h \n" \
0N/A " and/or check your value of ALT_CUPS_HEADERS_PATH, \n" \
0N/A " CUPS is frequently pre-installed on many systems, \n" \
0N/A " or may be downloaded from http://www.cups.org \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of DEVTOOLS_PATH
0N/A######################################################
0N/Asane-devtools_path:
0N/A @if [ "$(DEVTOOLS_PATH)" != "" -a ! -r "$(DEVTOOLS_PATH)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid DEVTOOLS_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(DEVTOOLS_PATH) \n" \
0N/A " and/or check your value of ALT_DEVTOOLS_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check for existence of MS_RUNTIME_LIBRARIES
0N/A######################################################
0N/Asane-msvcrt_path:
0N/Aifeq ($(PLATFORM), windows)
0N/A @if [ ! -r "$(MSVCRT_DLL_PATH)/msvcrt.dll" ]; then \
0N/A $(ECHO) "ERROR: You do not have access to msvcrt.dll. \n" \
0N/A " Please check your access to \n" \
0N/A " $(MSVCRT_DLL_PATH) \n" \
0N/A " and/or check your value of ALT_MSVCRT_DLL_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
942N/A ifneq ($(MSVCRNN_DLL),)
795N/A @if [ ! -r "$(MSVCRNN_DLL_PATH)/$(MSVCRNN_DLL)" ]; then \
795N/A $(ECHO) "ERROR: You do not have access to $(MSVCRNN_DLL). \n" \
0N/A " Please check your access to \n" \
795N/A " $(MSVCRNN_DLL_PATH) \n" \
795N/A " and/or check your value of ALT_MSVCRNN_DLL_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of COMPILER_PATH
0N/A######################################################
0N/Asane-compiler_path:
0N/A @if [ "$(COMPILER_PATH)" != "" -a ! -r "$(COMPILER_PATH)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid COMPILER_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(COMPILER_PATH) \n" \
0N/A " and/or check your value of ALT_COMPILER_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check for existence of UNIXCOMMAND_PATH
0N/A######################################################
0N/Asane-unixcommand_path:
0N/A @if [ "$(UNIXCOMMAND_PATH)" != "" -a ! -r "$(UNIXCOMMAND_PATH)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid UNIXCOMMAND_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(UNIXCOMMAND_PATH) \n" \
0N/A " and/or check your value of ALT_UNIXCOMMAND_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aifeq ($(PLATFORM), windows)
0N/A @for utility in cpio ar file m4 ; do \
0N/A if [ ! -r "`$(WHICH) $${utility}`" ]; then \
0N/A $(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \
0N/A " directory $(UNIXCOMMAND_PATH). \n" \
0N/A " The utilities cpio, ar, file, and m4 are required. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi; \
0N/A done
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of USRBIN_PATH on linux
0N/A######################################################
0N/Asane-usrbin_path:
0N/Aifeq ($(PLATFORM), linux)
0N/A @if [ "$(USRBIN_PATH)" != "" -a ! -r "$(USRBIN_PATH)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid USRBIN_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(USRBIN_PATH) \n" \
0N/A " and/or check your value of ALT_USRBIN_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of UNIXCCS_PATH on solaris
0N/A######################################################
0N/Asane-unixccs_path:
0N/Aifeq ($(PLATFORM), solaris)
0N/A @if [ "$(UNIXCCS_PATH)" != "" -a ! -r "$(UNIXCCS_PATH)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid UNIXCCS_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(UNIXCCS_PATH) \n" \
0N/A " and/or check your value of ALT_UNIXCCS_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Verify the docs directory exists
0N/A######################################################
0N/Asane-docs_import:
0N/A @if [ ! -d "$(HOTSPOT_DOCS_IMPORT_PATH)" ]; then \
0N/A $(ECHO) "WARNING: The directory HOTSPOT_DOCS_IMPORT_PATH=$(HOTSPOT_DOCS_IMPORT_PATH) \n" \
0N/A " does not exist, check your value of ALT_HOTSPOT_DOCS_IMPORT_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check for possible problem regarding __fabsf, math_iso.h and the libm patch.
0N/A# Hotspot should have been changed in Mustang 6.0 Build 47 to not depend
0N/A# on __fabsf, this is just checking that fact now.
0N/A######################################################
0N/Asane-math_iso:
0N/Aifeq ($(PLATFORM), solaris)
0N/A @if [ -f $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \
0N/A if [ "`$(NM) $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) | $(GREP) __fabsf`" != "" ]; then \
0N/A $(ECHO) "WARNING: This version of hotspot relies on __fabsf \n" \
0N/A " which is not always available on Solaris 8 and 9 machines \n" \
0N/A " unless they have the latest libm patch and the file \n" \
0N/A " /usr/include/iso/math_iso.h which can trigger this dependency.\n" \
0N/A " Hotspot should NOT be dependent on this extern, check the \n" \
0N/A " version of the hotspot library you are using. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for possible patch problem regarding /usr/lib/libCrun.so
0N/A######################################################
0N/Asane-libCrun:
0N/Aifeq ($(PLATFORM), solaris)
0N/A @if [ "`$(NM) /usr/lib/libCrun.so.1 | $(GREP) __1c2n6FIpv_0_`" = "" ]; then \
0N/A $(ECHO) "WARNING: The file /usr/lib/libCrun.so.1 is missing the extern \n" \
0N/A " __1c2n6FIpv_0_ which indicates that the system is missing \n" \
0N/A " a required Solaris patch, or you are using a pre-FCS release \n" \
0N/A " of Solaris 10. You need the latest /usr/lib/libCrun.so.1 \n" \
0N/A " which comes with the FCS release of Solaris 10 and available \n" \
0N/A " through the latest Solaris 8 or 9 C++ runtime patches. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of MSDEVTOOLS_PATH on windows
0N/A######################################################
0N/Asane-msdevtools_path:
0N/Aifeq ($(PLATFORM), windows)
0N/A @if [ "$(MSDEVTOOLS_PATH)" != "" -a ! -r "$(MSDEVTOOLS_PATH)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid MSDEVTOOLS_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(MSDEVTOOLS_PATH) \n" \
0N/A " and/or check your value of ALT_MSDEVTOOLS_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of Hotspot binaries
0N/A######################################################
0N/Asane-hotspot_binaries:
0N/Aifeq ($(ARCH_DATA_MODEL), 32)
0N/A @if [ ! -r $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \
0N/A $(ECHO) "ERROR: HOTSPOT_CLIENT_PATH does not point to a valid HotSpot VM. \n" \
0N/A " Please check your access to \n" \
0N/A " $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \
0N/A " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A @if [ ! -r $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) ]; then \
0N/A $(ECHO) "ERROR: HOTSPOT_SERVER_PATH does not point to a valid HotSpot VM. \n" \
0N/A " Please check your access to \n" \
0N/A " $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) \n" \
0N/A " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# Check value of HOTSPOT_LIB_PATH
0N/A @#
0N/Aifeq ($(PLATFORM), windows)
0N/A @if [ ! -r $(HOTSPOT_LIB_PATH)/jvm.lib ]; then \
0N/A $(ECHO) "ERROR: HOTSPOT_LIB_PATH does not point to a valid HotSpot library. \n" \
0N/A " Please check your access to \n" \
0N/A " $(HOTSPOT_LIB_PATH)/jvm.lib \n" \
0N/A " and/or check your value of ALT_HOTSPOT_LIB_PATH. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @#
0N/A @# Check for the .map files - its OK if they are not there..
0N/A @#
0N/A ifeq ($(ARCH_DATA_MODEL), 32)
0N/A @# There is no 64-bit HotSpot client VM
0N/A @if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.map ]; then \
0N/A $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .map files. \n" \
0N/A " These files are optional and aid in the debugging of the JVM. \n" \
0N/A " Please check your access to \n" \
0N/A " $(HOTSPOT_CLIENT_PATH)/jvm.map \n" \
0N/A " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A @if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.pdb ]; then \
0N/A $(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .pdb files. \n" \
0N/A " These files are optional and aid in the debugging of the JVM. \n" \
0N/A " Please check your access to \n" \
0N/A " $(HOTSPOT_CLIENT_PATH)/jvm.pdb \n" \
0N/A " and/or check your value of ALT_HOTSPOT_CLIENT_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A endif
0N/A @if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.map ]; then \
0N/A $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .map files. \n" \
0N/A " These files are optional and aid in the debugging of the JVM. \n" \
0N/A " Please check your access to \n" \
0N/A " $(HOTSPOT_SERVER_PATH)/jvm.map \n" \
0N/A " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A @if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.pdb ]; then \
0N/A $(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .pdb files. \n" \
0N/A " These files are optional and aid in the debugging of the JVM. \n" \
0N/A " Please check your access to \n" \
0N/A " $(HOTSPOT_SERVER_PATH)/jvm.pdb \n" \
0N/A " and/or check your value of ALT_HOTSPOT_SERVER_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A
0N/A######################################################
0N/A# Check for existence of misc Hotspot imported files
0N/A######################################################
0N/AHOTSPOT_INCLUDE_FILE_LIST = jvmti.h
0N/A#HOTSPOT_INCLUDE_FILE_LIST += jni.h jni_md.h
0N/A#HOTSPOT_INCLUDE_FILE_LIST += jvm.h jvm_md.h
0N/A#HOTSPOT_INCLUDE_FILE_LIST += jmm.h
0N/ATMP_SDK_INCLUDE_FILE_LIST=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.h)
0N/ATMP_SDK_INCLUDE_FILE_DIFFS=$(HOTSPOT_INCLUDE_FILE_LIST:%.h=$(TEMPDIR)/%.hdiffs)
0N/A
0N/A# These include files must have a pattern: 'version: MAJOR.MINOR.MICRO'
0N/A# where MACRO, MINOR, and MICRO are numbers, e.g. 1.0.1, 0.2.90, etc.
0N/A# The critical version we are checking is MAJOR.MINOR, we print all three
0N/A# when we detect an error.
0N/A
0N/ATMP_SDK_INCLUDE_FIND_VERSION= $(EGREP) 'version:'
0N/ATMP_SDK_INCLUDE_GET_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \
0N/A $(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9].*@\1@'
0N/ATMP_SDK_INCLUDE_GET_FULL_VERSION= $(TMP_SDK_INCLUDE_FIND_VERSION) | \
0N/A $(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*@\1@'
0N/A
0N/A# Compare an interface file (Rule creates 2 temp files: %.h and %.h.IMPORT)
0N/A# Files jvm.h, jvm_md.h and jmm.h are special in that they are not publicly
0N/A# exported but do represent VM interfaces used by the rest of the jdk.
0N/A# So these 3 will not be found in a promoted build and can only
0N/A# be checked when this represents a full control build (i.e. the
0N/A# HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
0N/A$(TEMPDIR)/%.h: $(SHARE_SRC)/javavm/export/%.h
2080N/A @$(install-non-module-file)
0N/A @$(RM) $@.IMPORT
0N/A @if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(@F) ]; then \
0N/A $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(@F) $@.IMPORT ; \
0N/A elif [ "$(@F)" != "jvm.h" -a "$(@F)" != "jmm.h" ] ; then \
0N/A $(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \
0N/A " Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A $(CP) $< $@.IMPORT; \
0N/A else \
0N/A $(CP) $< $@.IMPORT; \
0N/A fi
0N/A
0N/A$(TEMPDIR)/%.h: $(PLATFORM_SRC)/javavm/export/%.h
2080N/A @$(install-non-module-file)
0N/A @$(RM) $@.IMPORT
0N/A @if [ -r $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) ]; then \
0N/A $(CP) $(HOTSPOT_IMPORT_PATH)/include/$(PLATFORM_INCLUDE_NAME)/$(@F) $@.IMPORT ; \
0N/A elif [ "$(@F)" != "jvm_md.h" ] ; then \
0N/A $(ECHO) "WARNING: HOTSPOT_IMPORT_PATH does not contain the interface file $(@F). \n" \
0N/A " Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A $(CP) $< $@.IMPORT; \
0N/A else \
0N/A $(CP) $< $@.IMPORT; \
0N/A fi
0N/A
0N/A# Compares the two tempfiles: %.h and %.h.IMPORT, answer in %.hdiffs
0N/A# Note: Putting anything into the hdiffs file will trigger generic IMPORT
0N/A# warning message in hotspot_import_include.
0N/A# First checks the major.minor versions, the micro number can differ.
0N/A# Second checks the full version.
0N/A# Lastly does a full diff if the full version differs or it has no version
0N/A$(TEMPDIR)/%.hdiffs: $(TEMPDIR)/%.h
0N/A @$(prep-target)
0N/A @$(TOUCH) $@
0N/A @if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_VERSION)`" != \
0N/A "`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_VERSION)`" ] ; then \
0N/A $(ECHO) "WARNING: The file $(<F) is not the same interface as the VM version.\n " \
0N/A " this workspace has $(<F) `$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` and \n " \
0N/A " HOTSPOT_IMPORT_PATH contains $(<F) `$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)` \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A $(ECHO) "Version mis-match" > $@ ; \
0N/A fi
0N/A @if [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" != \
0N/A "`$(CAT) $<.IMPORT | $(TMP_SDK_INCLUDE_GET_FULL_VERSION)`" ] ; then \
0N/A $(RM) $<.filtered $<.IMPORT.filtered; \
0N/A $(EGREP) -v 'VERSION' $< > $<.filtered; \
0N/A $(EGREP) -v 'VERSION' $<.IMPORT > $<.IMPORT.filtered; \
0N/A ($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \
0N/A elif [ "`$(CAT) $< | $(TMP_SDK_INCLUDE_FIND_VERSION)`" = "" ] ; then \
0N/A $(RM) $<.filtered $<.IMPORT.filtered; \
0N/A $(EGREP) -v '@\(#\)' $< > $<.filtered; \
0N/A $(EGREP) -v '@\(#\)' $<.IMPORT > $<.IMPORT.filtered; \
0N/A ($(DIFF) -w $<.filtered $<.IMPORT.filtered || exit 0) >> $@ ; \
0N/A fi
0N/A
0N/A# Verify all imported hotspot files
0N/Asane-hotspot_import:: sane-hotspot_import_dir sane-hotspot_import_include
0N/A
0N/A# Verify the base directory exists
0N/Asane-hotspot_import_dir:
0N/A @$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS)
0N/A @$(RM) $(TMP_SDK_INCLUDE_FILE_LIST)
0N/A @if [ ! -d "$(HOTSPOT_IMPORT_PATH)" ]; then \
0N/A $(ECHO) "WARNING: The directory HOTSPOT_IMPORT_PATH=$(HOTSPOT_IMPORT_PATH) \n" \
0N/A " does not exist, check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A# Verify hotspot include files
0N/Asane-hotspot_import_include: $(TMP_SDK_INCLUDE_FILE_LIST) $(TMP_SDK_INCLUDE_FILE_DIFFS)
0N/A @if [ "`$(CAT) $(TMP_SDK_INCLUDE_FILE_DIFFS)`" != "" ] ; then \
0N/A $(ECHO) "WARNING: Possible HotSpot VM interface conflict. \n" \
0N/A " HOTSPOT_IMPORT_PATH is used to import files from the VM build. \n" \
0N/A " It is also used to verify that any copied files are consistent between \n" \
0N/A " these two components. It has been detected that one or more of the \n" \
0N/A " VM interface files inside this workspace may not match the interfaces \n" \
0N/A " exported by the VM, or the VM versions could not be found. \n" \
0N/A " The list of VM interface files is: \n" \
0N/A " $(HOTSPOT_INCLUDE_FILE_LIST). \n" \
0N/A " This workspace has copies of these files at: \n" \
0N/A " $(SHARE_SRC)/javavm/export and $(PLATFORM_SRC)/javavm/export \n" \
0N/A " for build purposes, and they should contain the same interfaces \n" \
0N/A " as the VM versions imported from: \n" \
0N/A " \$$(HOTSPOT_IMPORT_PATH)/include \n" \
0N/A " (i.e. $(HOTSPOT_IMPORT_PATH)/include) \n" \
0N/A " If an interface indeed doesn't match, then the use of this interface \n" \
0N/A " at JDK runtime could cause serious errors. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A for i in $(TMP_SDK_INCLUDE_FILE_DIFFS); do \
0N/A if [ -s $$i ] ; then \
0N/A $(ECHO) " " >> $(WARNING_FILE); \
0N/A $(ECHO) "VM Interface Differences: $$i" >> $(WARNING_FILE); \
0N/A $(CAT) $$i >> $(WARNING_FILE); \
0N/A $(ECHO) " " >> $(WARNING_FILE); \
0N/A fi; \
0N/A done; \
0N/A fi
0N/A @$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS)
0N/A @$(RM) $(TMP_SDK_INCLUDE_FILE_LIST)
0N/A
0N/A# The JDI-SA feature is not currently released on some platforms.
0N/A# See the Defs-<arch>.gmk files.
0N/A
0N/Aifeq ($(INCLUDE_SA), true)
0N/A# Verify that hotspot Serviceability Agent files are present. To keep
0N/A# it simple, we will just check for one of them. The others have arch
0N/A# dependent paths.
0N/A
0N/Asane-hotspot_import::
0N/A @if [ ! -r $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar ] ; then \
0N/A $(ECHO) "WARNING: File $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar does not exist.\n" \
0N/A " The JDI binding for the Serviceability Agent will not be included in the build.\n" \
0N/A " Please check your access to\n" \
0N/A " $(HOTSPOT_IMPORT_PATH)/lib/sa-jdi.jar\n" \
0N/A " and/or check your value of ALT_HOTSPOT_IMPORT_PATH.\n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the ant version
0N/A######################################################
0N/AANT_CHECK :=$(call CheckVersions,$(ANT_VER),$(REQUIRED_ANT_VER))
0N/Asane-ant_version:
0N/A @if [ "$(ANT_CHECK)" != "same" \
0N/A -a "$(ANT_CHECK)" != "newer" ]; then \
0N/A $(ECHO) "WARNING: The version of ant being used is older than \n" \
0N/A " the required version of '$(REQUIRED_ANT_VER)'. \n" \
0N/A " The version of ant found was '$(ANT_VER)'. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check the zip file version
0N/A######################################################
0N/AZIP_CHECK :=$(call CheckVersions,$(ZIP_VER),$(REQUIRED_ZIP_VER))
0N/Asane-zip_version: sane-unzip_version
0N/A @if [ "$(ZIP_CHECK)" != "same" -a "$(ZIP_CHECK)" != "newer" ]; then \
0N/A $(ECHO) "WARNING: The version of zip being used is older than \n" \
0N/A " the required version of '$(REQUIRED_ZIP_VER)'. \n" \
0N/A " The version of zip found was '$(ZIP_VER)'. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check the unzip file version
0N/A######################################################
0N/AUNZIP_CHECK :=$(call CheckVersions,$(UNZIP_VER),$(REQUIRED_UNZIP_VER))
0N/Asane-unzip_version:
0N/A @if [ "$(UNZIP_CHECK)" != "same" -a "$(UNZIP_CHECK)" != "newer" ]; then \
0N/A $(ECHO) "WARNING: The version of unzip being used is older than \n" \
0N/A " the required version of '$(REQUIRED_UNZIP_VER)'. \n" \
0N/A " The version of unzip found was '$(UNZIP_VER)'. \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A
0N/A######################################################
0N/A# Check for windows DirectX sdk directory
0N/A######################################################
0N/Asane-dxsdk:
0N/Aifeq ($(PLATFORM), windows)
430N/A @if [ ! -r $(DXSDK_INCLUDE_PATH)/d3d9.h ]; then \
0N/A $(ECHO) "ERROR: You do not have access to a valid DirectX SDK Include dir.\n" \
0N/A " The value of DXSDK_INCLUDE_PATH must point a valid DX SDK dir.\n" \
0N/A " Please check your access to \n" \
0N/A " $(DXSDK_INCLUDE_PATH) \n" \
0N/A " and/or check your value of ALT_DXSDK_PATH or ALT_DXSDK_INCLUDE_PATH.\n" \
0N/A " Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
0N/A " http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
0N/A " Or http://www.microsoft.com/directx\n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A else \
0N/A if [ ! "$(DXSDK_VER)" = "$(REQUIRED_DXSDK_VER)" ]; then \
0N/A $(ECHO) "ERROR: The DirectX SDK must be version $(REQUIRED_DXSDK_VER).\n" \
0N/A " $(YOU_ARE_USING) DirectX SDK version: $(DXSDK_VER)\n" \
0N/A " The DirectX SDK was obtained from the following location: \n" \
0N/A " $(DXSDK_PATH) \n" \
0N/A " Please change your DirectX SDK. \n" \
0N/A " Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
0N/A " http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
0N/A " Or http://www.microsoft.com/directx\n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A else \
0N/A if [ -r $(DXSDK_INCLUDE_PATH)/basetsd.h ]; then \
0N/A if [ `$(EGREP) -c __int3264 $(DXSDK_INCLUDE_PATH)/basetsd.h` -ne 0 ]; then \
0N/A $(ECHO) "WARNING: The DirectX SDK Include directory contains a newer basetsd.h,\n" \
0N/A " which may indicate that you're using an incorrect version of DirectX SDK.\n" \
0N/A " This may result in a build failure.\n" \
0N/A " The DirectX SDK Include dir was obtained from the following location:\n" \
0N/A " $(DXSDK_INCLUDE_PATH) \n" \
430N/A " Please change your DirectX SDK to version 9 (Summer 2004 Update or newer).\n" \
0N/A " Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \
0N/A " http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp\n" \
0N/A " Or http://www.microsoft.com/directx\n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi \
0N/A fi \
0N/A fi \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the linker version(s)
0N/A######################################################
0N/Aifeq ($(PLATFORM), windows)
0N/A LINK_CHECK :=$(call CheckVersions,$(LINK_VER),$(REQUIRED_LINK_VER))
0N/Aendif
0N/Asane-link:
0N/Aifdef LINK_VER
0N/A @if [ "$(LINK_CHECK)" = "missing" ]; then \
0N/A $(ECHO) "ERROR: The Linker version is undefined. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A @if [ "$(LINK_CHECK)" != "same" ]; then \
0N/A $(ECHO) "WARNING: To build Java 2 SDK $(JDK_VERSION) you need : \n" \
942N/A " $(REQUIRED_COMPILER_VERSION) - link.exe version \"$(REQUIRED_LINK_VER)\" \n" \
942N/A " Specifically the $(REQUIRED_COMPILER_NAME) link.exe. \n " \
0N/A " $(YOU_ARE_USING) Linker version \"$(LINK_VER)\" \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the compiler version(s)
0N/A######################################################
0N/ACC_CHECK :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER))
0N/Asane-compiler: sane-link
0N/A @if [ "$(CC_CHECK)" = "missing" ]; then \
0N/A $(ECHO) "ERROR: The Compiler version is undefined. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aifndef OPENJDK
0N/A @if [ "$(CC_CHECK)" != "same" ]; then \
942N/A $(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(REQUIRED_COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \
942N/A " Specifically the $(REQUIRED_COMPILER_NAME) compiler. \n " \
942N/A " $(YOU_ARE_USING) $(COMPILER_VERSION): $(CC_VER) \n" \
0N/A " The compiler was obtained from the following location: \n" \
0N/A " $(COMPILER_PATH) \n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check that ALSA headers and libs are installed and
0N/A# that the header has the right version. We only
914N/A# need /usr/include/alsa/version.h and /usr/lib/libasound.so
0N/A######################################################
0N/A
914N/Aifdef REQUIRED_ALSA_VERSION
914N/A ALSA_CHECK := $(call CheckVersions,$(ALSA_VERSION),$(REQUIRED_ALSA_VERSION))
0N/Aendif
914N/Asane-alsa-headers:
914N/Aifdef REQUIRED_ALSA_VERSION
914N/A if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer" ] ; then \
914N/A $(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \
914N/A " You have the following ALSA version installed: $${alsa_version) \n" \
0N/A " Please reinstall ALSA (drivers and lib). You can download \n" \
0N/A " the source distribution from http://www.alsa-project.org \n" \
0N/A " or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi \
0N/A else \
914N/A $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \
0N/A " Please install ALSA (drivers and lib). You can download the \n" \
0N/A " source distribution from http://www.alsa-project.org or go to \n" \
0N/A " http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A# If a sanity file doesn't exist, just make sure it's dir exists
0N/A$(SANITY_FILES):
0N/A -@$(prep-target)
0N/A
0N/A######################################################
0N/A# dump out the variable settings...
0N/A######################################################
914N/Asane-settings::
0N/A @$(ECHO) >> $(MESSAGE_FILE)
0N/A @$(ECHO) $(ALL_SETTINGS) >> $(MESSAGE_FILE)
0N/A @$(ECHO) >> $(MESSAGE_FILE)
0N/A
0N/A######################################################
0N/A# Check for existence of DEPLOY_MSSDK on windows
0N/A######################################################
0N/Asane-mssdk_path:
0N/Aifeq ($(PLATFORM), windows)
0N/A @if [ -z "$(DEPLOY_MSSDK)" ]; then \
0N/A $(ECHO) "WARNING: Your DEPLOY_MSSDK setting is empty.\n" \
0N/A " It is recommended to set ALT_DEPLOY_MSSDK.\n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A @if [ ! -r "$(DEPLOY_MSSDK)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid DEPLOY_MSSDK setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(DEPLOY_MSSDK) \n" \
0N/A " and/or check your value of ALT_DEPLOY_MSSDK. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of INSTALL_MSSDK on windows
0N/A######################################################
0N/Asane-install-mssdk_path:
0N/Aifeq ($(PLATFORM), windows)
0N/A @if [ -z "$(INSTALL_MSSDK)" ]; then \
0N/A $(ECHO) "WARNING: Your INSTALL_MSSDK setting is empty.\n" \
0N/A " It is recommended to set ALT_INSTALL_MSSDK.\n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A @if [ ! -r "$(INSTALL_MSSDK)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid INSTALL_MSSDK setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(INSTALL_MSSDK) \n" \
0N/A " and/or check your value of ALT_INSTALL_MSSDK. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check for existence of INSTALL_MSIVAL2 on windows
0N/A######################################################
0N/Asane-install-msival2_path:
0N/Aifeq ($(PLATFORM), windows)
0N/A @if [ -z "$(INSTALL_MSIVAL2)" ]; then \
0N/A $(ECHO) "WARNING: Your INSTALL_MSIVAL2 setting is empty.\n" \
0N/A " It is recommended to set ALT_INSTALL_MSIVAL2.\n" \
0N/A "" >> $(WARNING_FILE) ; \
0N/A fi
0N/A @if [ ! -r "$(INSTALL_MSIVAL2)" ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid INSTALL_MSIVAL2 setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(INSTALL_MSIVAL2) \n" \
0N/A " and/or check your value of ALT_INSTALL_MSIVAL2. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/Aendif
0N/A
0N/A######################################################
0N/A# Check the Solaris GNU c++ compiler for solaris plugin
0N/A######################################################
0N/Asane-gcc-compiler:
0N/Aifeq ($(PLATFORM), solaris)
0N/A ifndef OPENJDK
0N/A @if [ -r $(GCC_COMPILER_PATH) ]; then \
914N/A if [ ! "$(GCC_VER)" = $(REQUIRED_GCC_VERSION) ]; then \
914N/A $(ECHO) "ERROR: The Solaris GCC compiler version must be $(REQUIRED_GCC_VERSION). \n" \
0N/A " You are using the following compiler version: $(GCC_VER) \n" \
0N/A " The compiler was obtained from the following location: \n" \
0N/A " $(GCC_COMPILER_PATH) \n" \
0N/A " Please change your compiler. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi \
0N/A else \
0N/A $(ECHO) "ERROR: You do not have a valid GCC_COMPILER_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(GCC_COMPILER_PATH) \n" \
0N/A " and/or check your value of ALT_GCC_COMPILER_PATH. \n" \
0N/A " This will affect you if you build the plugin target. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/A
0N/A ifeq ($(PLATFORM), linux)
0N/A ifdef ALT_GCC29_COMPILER_PATH
0N/A @if [ ! -x $(ALT_GCC29_COMPILER_PATH)/bin/gcc ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(ALT_GCC29_COMPILER_PATH)/bin/gcc \n" \
0N/A " This will affect you if you build the plugin target. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/A ifdef ALT_GCC29_PLUGIN_LIB_PATH
0N/A @if [ ! -r $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so ]; then \
0N/A $(ECHO) "Error: You do not have a valid ALT_GCC29_PLUGIN_LIB_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so \n" \
0N/A " This will affect you if you build the plugin target, specifically for gcc 2.9 version of OJI plugin library. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A else
0N/A @if [ ! -r $(GCC29_COMPILER_PATH) ]; then \
0N/A $(ECHO) "ERROR: You do not have a valid GCC29_COMPILER_PATH setting. \n" \
0N/A " Please check your access to \n" \
0N/A " $(GCC29_COMPILER_PATH) \n" \
0N/A " and/or check your value of ALT_GCC29_COMPILER_PATH. \n" \
0N/A " This will affect you if you build the plugin target. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/A endif
0N/Aendif
0N/A
0N/A
0N/A######################################################
0N/A# MOZILLA_HEADERS_PATH must be valid
0N/A######################################################
0N/Asane-mozilla:
0N/Aifeq ($(ARCH_DATA_MODEL), 32)
0N/A ifdef ALT_MOZILLA_HEADERS_PATH
0N/A @if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
0N/A $(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \
0N/A " not a Relative Path Name. \n" \
0N/A " The current value of ALT_MOZILLA_HEADERS_PATH is \n" \
0N/A " $(ALT_MOZILLA_HEADERS_PATH) \n" \
0N/A " Please fix this and continue your build. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
0N/A @#
0N/A @# MOZILLA_HEADERS_PATH must be valid....
0N/A @#
0N/A ifeq ($(PLATFORM), windows)
0N/A @if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18.win32/java/bool.h ]; then \
0N/A $(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \
0N/A " Please check your access to \n" \
0N/A " $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18.win32/java/bool.h \n" \
0N/A " and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \
0N/A " and on Windows, ALT_JDK_JAVA_DRIVE. \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A else
0N/A @if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18/java/bool.h ]; then \
0N/A $(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \
0N/A " Please check your access to \n" \
0N/A " $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_18/java/bool.h \n" \
0N/A " and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \
0N/A "" >> $(ERROR_FILE) ; \
0N/A fi
0N/A endif
1365N/A @#
1365N/A @# Check for presence of headers required for new Java Plug-In ("plugin2")
1365N/A @#
1365N/A @if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/plugin2_mozilla_headers/npapi.h ]; then \
1365N/A $(ECHO) "ERROR: You do not have access to valid Mozilla header files for the new Java Plug-In. \n" \
1365N/A " Please check your access to \n" \
1365N/A " $(subst \,/,$(MOZILLA_HEADERS_PATH))/plugin2_mozilla_headers/npapi.h \n" \
1365N/A " and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \
1365N/A "" >> $(ERROR_FILE) ; \
1365N/A fi
0N/Aendif
0N/A
0N/A
119N/A######################################################
1365N/A# Make sure Java Kernel VM is accessible
1365N/A######################################################
1365N/Asane-kernel-vm:
1365N/Aifeq ($(PLATFORM), windows)
1365N/A ifeq ($(ARCH_DATA_MODEL), 32)
1365N/A @if [ ! -r $(HOTSPOT_KERNEL_PATH)/jvm.dll ]; then \
1367N/A $(ECHO) "WARNING: Your HOTSPOT_IMPORT_PATH does not include a Kernel VM... \n" \
1367N/A " The kernel installer may not be built (unless hotspot is also). \n" \
1365N/A " $(HOTSPOT_KERNEL_PATH)/jvm.dll \n" \
1365N/A " Please check the value of ALT_HOTSPOT_IMPORT_PATH. \n" \
1367N/A >> $(WARNING_FILE) ; \
1365N/A fi
1365N/A endif
1365N/Aendif
1365N/A
1365N/A
1365N/A######################################################
1365N/A# SECURITY_BASELINE_131 test
1365N/A######################################################
1365N/Asecurity_baseline_131:
1365N/Aifeq ($(PLATFORM), windows)
1365N/A @if [ -z "$(SECURITY_BASELINE_131)" ]; then \
1365N/A $(ECHO) "WARNING: Your SECURITY_BASELINE_131 setting is empty.\n" \
1365N/A " Setting it to the default value of 1.3.1_20.\n" \
1365N/A " It is recommended to set SECURITY_BASELINE_131.\n" \
1365N/A "" >> $(WARNING_FILE) ; \
1365N/A fi
1365N/Aendif
1365N/A
1365N/A######################################################
119N/A# SECURITY_BASELINE_142 test
119N/A######################################################
119N/Asecurity_baseline_142:
119N/Aifeq ($(PLATFORM), windows)
119N/A @if [ -z "$(SECURITY_BASELINE_142)" ]; then \
119N/A $(ECHO) "WARNING: Your SECURITY_BASELINE_142 setting is empty.\n" \
119N/A " Setting it to the default value of 1.4.2_10.\n" \
119N/A " It is recommended to set SECURITY_BASELINE_142.\n" \
119N/A "" >> $(WARNING_FILE) ; \
119N/A fi
119N/Aendif
119N/A
119N/A######################################################
119N/A# SECURITY_BASELINE_150 test
119N/A######################################################
119N/Asecurity_baseline_150:
119N/Aifeq ($(PLATFORM), windows)
119N/A @if [ -z "$(SECURITY_BASELINE_150)" ]; then \
119N/A $(ECHO) "WARNING: Your SECURITY_BASELINE_150 setting is empty.\n" \
119N/A " Setting it to the default value of 1.5.0_07.\n" \
119N/A " It is recommended to set SECURITY_BASELINE_150.\n" \
119N/A "" >> $(WARNING_FILE) ; \
119N/A fi
119N/Aendif
0N/A
1365N/A######################################################
1365N/A# SECURITY_BASELINE_160 test
1365N/A######################################################
1365N/Asecurity_baseline_160:
1365N/Aifeq ($(PLATFORM), windows)
1365N/A @if [ -z "$(SECURITY_BASELINE_160)" ]; then \
1365N/A $(ECHO) "WARNING: Your SECURITY_BASELINE_160 setting is empty.\n" \
1365N/A " Setting it to the default value of 1.6.0_11.\n" \
1365N/A " It is recommended to set SECURITY_BASELINE_160.\n" \
1365N/A "" >> $(WARNING_FILE) ; \
1365N/A fi
1365N/Aendif
1365N/A
0N/A
0N/A######################################################
0N/A# this should be the last rule in any target's sanity rule.
0N/A######################################################
0N/Asane-lastrule:
0N/Aifndef EXTERNALSANITYCONTROL
0N/A @if [ -r $(MESSAGE_FILE) ]; then \
0N/A $(CAT) $(MESSAGE_FILE) ; \
0N/A fi
0N/A @if [ -r $(WARNING_FILE) ]; then \
0N/A $(CAT) $(WARNING_FILE) ; \
0N/A fi
0N/A @if [ "x$(INSANE)" != x ]; then \
0N/A $(ECHO) "INSANE mode requested. \n" \
0N/A "Sanity will not force a build termination, even with errors.\n" \
0N/A "" >> $(ERROR_FILE); \
0N/A fi
0N/A @if [ -r $(ERROR_FILE) ]; then \
0N/A if [ "x$(INSANE)" = x ]; then \
0N/A $(ECHO) "Exiting because of the above error(s). \n" \
0N/A "">> $(ERROR_FILE); \
0N/A fi ; \
0N/A $(CAT) $(ERROR_FILE) ; \
0N/A if [ "x$(INSANE)" = x ]; then \
0N/A exit 1 ; \
0N/A fi ; \
0N/A fi
0N/Aifdef PEDANTIC
0N/A @if [ -r $(WARNING_FILE) ]; then \
0N/A $(ECHO) "PEDANTIC mode requested. \n" \
0N/A "Exiting because of the above warning(s). \n" \
0N/A "" >> $(ERROR_FILE); \
0N/A $(CAT) $(ERROR_FILE) ; \
0N/A exit 1 ; \
0N/A fi
0N/Aendif # PEDANTIC
0N/A @if [ ! -r $(ERROR_FILE) ]; then \
0N/A $(ECHO) "Sanity check passed." ; \
0N/A fi
0N/Aendif # EXTERNALSANITYCONTROL
0N/A