#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# WARNING: This file is shared with other workspaces.
#
#
# Shared sanity rules for the JDK builds.
#
# All files created during sanity checking
# How to say "The Release Engineering people use this"
# How to say "You are using:"
# Error message
# Warning message
# Official version error message: name version required_version
$(call SanityError,\
# Official version warning message: name version required_version
$(call SanityWarning,\
# Settings and rules to validate the JDK build environment.
# What kind of system we are using (Variations are Solaris and OpenSolaris)
OS_VERSION := $(shell uname -r)
OS_VARIANT_VERSION := $(OS_VERSION)
PATCH_POSITION = $$4
else
PATCH_POSITION = $$6
# What kind of system we are using (Variation is the Linux vendor)
OS_VERSION := $(shell uname -r)
OS_VARIANT_NAME := $(shell \
if [ -f /etc/fedora-release ] ; then \
echo "Fedora"; \
elif [ -f /etc/redhat-release ] ; then \
echo "RedHat"; \
elif [ -f /etc/SuSE-release ] ; then \
echo "SuSE"; \
elif [ -f /etc/lsb-release ] ; then \
else \
echo "Unknown"; \
fi)
OS_VARIANT_VERSION := $(shell \
elif [ -f /etc/lsb-release ] ; then \
fi)
# What kind of system we are using
OS_VERSION := $(shell uname -r)
# Windows 2000 is 5.0, Windows XP is 5.1, Windows 2003 is 5.2
# Assume 5.0 (Windows 2000) if systeminfo does not help
# What kind of system we are using (Variation is the common name)
_OS_VERSION := \
OS_VERSION = 5.0
else
OS_VARIANT_VERSION := $(OS_VERSION)
# CYGWIN version
_CYGWIN_VER := $(SYSTEM_UNAME)
# Get the version numbers of what we are using
ALT_BINDIR_VERSION := $(shell $(ALT_BINDIR)/java$(EXE_SUFFIX) -version 2>&1 | $(NAWK) -F'"' '{ print $$2 }')
ALT_BINDIR_OK := $(shell $(ECHO) $(ALT_BINDIR_VERSION) | $(EGREP) -c '^$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION)')
# Get ALL_SETTINGS defined
.PHONY: \
######################################################
# check for COPYRIGHT_YEAR variable
######################################################
@$(ECHO) "WARNING: ALT_COPYRIGHT_YEAR but not the current year\n" \
" will be used for copyright year.\n " \
"" >>$(WARNING_FILE)
######################################################
# check for INSANE variable
######################################################
@$(ECHO) "WARNING: You are building in 'INSANE' mode. You \n" \
" should not use this mode, and in fact, \n" \
" it may be removed at any time. If you \n" \
" have build problems as a result of using \n" \
" INSANE mode, then you should not expect \n" \
" assistance from anyone with the problems \n" \
" or consequences you experience. \n" \
"" >> $(WARNING_FILE)
######################################################
# check for GNU Make version
######################################################
$(ECHO) "ERROR: The version of make being used is older than \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check the BUILD_NUMBER to make sure it contains bNN
######################################################
$(ECHO) "WARNING: The BUILD_NUMBER needs to contain b[0-9][0-9]*. Currently BUILD_NUMBER=$(BUILD_NUMBER). \n" \
" This has been known to cause build failures. \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check the ARCH_DATA_MODEL setting
######################################################
$(ECHO) "ERROR: The setting of ARCH_DATA_MODEL must be 32 or 64.\n" \
"" >> $(ERROR_FILE) ; \
fi
$(ECHO) "WARNING: You have requested BUILD_CLIENT_ONLY in a 64-bit build.\n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check the OS version (windows and linux have release name checks)
# NOTE: OPENJDK explicitly does not check for OS release information.
# Unless we know for sure that it will not build somewhere, we cannot
# generate a fatal sanity error, and a warning about the official
# build platform just becomes clutter.
######################################################
OS_VERSION_CHECK := \
else
@$(call OfficialWarningMessage,$(OS_VARIANT_NAME) version,$(OS_VARIANT_VERSION),$(REQUIRED_OS_VARIANT_VERSION))
endif # OPENJDK
######################################################
# Check the memory available on this machine
######################################################
" builds on this machine could be slow. \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check the locale (value of LC_ALL, not being empty or ==C can be a problem)
######################################################
" Try setting LC_ALL to 'C'. \n" \
"" >> $(WARNING_FILE) ; \
fi
" Try setting LANG to 'C'. \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check the Windows cygwin version
######################################################
######################################################
# Check the cygwin shell is used, not cmd.exe
######################################################
$(ECHO) "ERROR: You are using an unsupported shell. \n" \
" Use either sh, bash, ksh, zsh, or tcsh. \n" \
" Using the cmd.exe utility is not supported. \n" \
" If you still want to try your current shell, \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check the Windows mks version
######################################################
######################################################
# Get list of installed patches (this file has a particular format)
######################################################
@$(ECHO) "" >> $@
######################################################
# Check list of Solaris patches
######################################################
@$(NAWK) 'BEGIN { \
readingInstallPatches = 0; \
requiredCount = 0; \
installCount = 0; \
} \
{ \
if (readingInstallPatches) { \
if ($$1=="Patch:") { \
ns = split($$2,parts,"-"); \
installPatchNo[installCount]=parts[1]; \
installPatchRev[installCount]=parts[2]; \
installCount++; \
} \
} \
\
if (!readingInstallPatches) { \
if (index($$1,"#") != 0) continue; \
if (match($$1,"BUILD") > 0 \
&& $$2 == $(OS_VERSION) \
&& ($$7 == "REQ" || $$7 == "req") \
&& $(PATCH_POSITION) != "none" \
&& $(PATCH_POSITION) != "NONE") { \
ns = split($(PATCH_POSITION),parts,"-"); \
requiredPatchNo[requiredCount]=parts[1]; \
requiredPatchRev[requiredCount]=parts[2]; \
requiredCount++; \
} \
} \
} \
END { \
errorCount=0; \
for (i=0; i<requiredCount; i++) { \
foundMatch = 0; \
for (j=0; j<installCount; j++) { \
if (installPatchNo[j] == requiredPatchNo[i] \
&& installPatchRev[j] >= requiredPatchRev[i]) { \
foundMatch = 1; \
break; \
} \
} \
if ( foundMatch == 0) { \
printf("WARNING: Your solaris install is missing the required patch %s-%s\n", requiredPatchNo[i], requiredPatchRev[i] ); \
printf(" Please update your your system patches or build on a different machine.\n\n" ); \
errorCount++; \
} \
} \
endif # PLATFORM
######################################################
# CLASSPATH cannot be set, unless you are insane.
######################################################
@$(ECHO) "ERROR: Your CLASSPATH environment variable is set. This will \n" \
" most likely cause the build to fail. Please unset it \n" \
" and start your build again. \n" \
"" >> $(ERROR_FILE)
######################################################
# JAVA_HOME cannot be set, unless you are insane.
######################################################
@$(ECHO) "ERROR: Your JAVA_HOME environment variable is set. This will \n" \
" most likely cause the build to fail. Please unset it \n" \
" and start your build again. \n" \
"" >> $(ERROR_FILE)
######################################################
# Make sure the fonts are there
# Exceptions are when explicitly building OPENJDK, or
# when the entire CLOSED_SRC dir is excluded, so we are
# implicitly building OPENJDK
######################################################
@if [ -d $(CLOSED_SRC) ] ; then \
if [ ! -f $(FONT_FILE) ] ; then \
" Verify you have downloaded and overlayed on the source area all the binary files. \n" \
"" >> $(ERROR_FILE); \
fi \
fi
######################################################
# VARIANT must be set to DBG or OPT
######################################################
" Needs to be set to DBG or OPT \n" \
"" >> $(ERROR_FILE); \
fi
######################################################
# LD_LIBRARY_PATH should not be set, unless you are insane.
######################################################
@$(ECHO) "ERROR: Your LD_LIBRARY_PATH environment variable is set. This may \n" \
" produce binaries binaries incorrectly. Please unset it \n" \
" and start your build again. \n" \
"" >> $(ERROR_FILE)
######################################################
# LD_LIBRARY_PATH_64 should not be set, unless you are insane.
######################################################
@$(ECHO) "ERROR: Your LD_LIBRARY_PATH_64 environment variable is set. This may \n" \
" produce binaries binaries incorrectly. Please unset it \n" \
" and start your build again. \n" \
"" >> $(ERROR_FILE)
######################################################
# LD_OPTIONS should not be set, unless you are insane.
######################################################
@$(ECHO) "ERROR: Your LD_OPTIONS environment variable is set. This may \n" \
" produce binaries binaries incorrectly. Please unset it \n" \
" and start your build again. \n" \
"" >> $(ERROR_FILE)
######################################################
# LD_RUN_PATH should not be set, unless you are insane.
######################################################
@$(ECHO) "ERROR: Your LD_RUN_PATH environment variable is set. This may \n" \
" produce binaries binaries incorrectly. Please unset it \n" \
" produce binaries binaries incorrectly. Please unset it \n" \
" and start your build again. \n" \
"" >> $(ERROR_FILE)
######################################################
# MAKEFLAGS cannot be set, unless you are insane.
######################################################
else
else
# ifneq ($(strip $(REAL_MAKEFLAGS)),)
@#
@# it is unacceptable to have the-e or --environment-overrides value in MAKEFLAGS
@#
$(ECHO) "ERROR: Either the build was started with the flag -e or \n" \
" --environment-overrides, or the MAKEFLAGS environment \n" \
" variable has this value set. This will cause any \n" \
" environment variables you have defined to override \n" \
" the values defined by the makefiles. This practice is \n" \
" not recommemded by the authors of GNU Make, and \n" \
" will lead to an improper build. \n" \
" Please fix and restart the build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# it is unacceptable to havethe -i or --ignore-errors value in MAKEFLAGS
@#
$(ECHO) "ERROR: Either the build was started with the flag -i or \n" \
" --ignore-errors, or the MAKEFLAGS environment \n" \
" variable has this value set. 1111 You will be unable \n" \
" to determine if the build is broken or not. \n" \
" Please fix and restart the build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# it is unacceptable to have the -I or --include-dir value in MAKEFLAGS
@#
$(ECHO) "ERROR: Either the build was started with the flag -I or \n" \
" --include-dir, or the MAKEFLAGS environment \n" \
" variable has this value set. This will render your \n" \
" build questionable as not all the rules and depenencies \n" \
" are captured by the build. \n" \
" Please fix and restart the build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# it is unacceptable to have the -k or --keep-going value in MAKEFLAGS:
@#
$(ECHO) "ERROR: Either the build was started with the flag -k or \n" \
" --keep-going, or the MAKEFLAGS environment \n" \
" variable has this value set. 222 You will be unable \n" \
" to determine if the build is broken or not. \n" \
" Please fix and restart the build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# it is unacceptable to have the -o or --assume-old or --old-filevalue in MAKEFLAGS:
@# Note - this rule never gets invoked because it is processed out
@# in GNU Make startup
@#
$(ECHO) "ERROR: Either the build was started with the flag -o or \n" \
" --assume-old or --old-file, or the MAKEFLAGS environment \n" \
" variable has this value set. This could prevent the \n" \
" build from executing rules it should, thus rendering a \n" \
" questionable result. \n" \
" Please fix and restart the build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# it is unacceptable to have the -r or --nobuiltin-rules value in MAKEFLAGS
@#
$(ECHO) "ERROR: Either the build was started with the flag -r or \n" \
" --no-builtin-rules, or the MAKEFLAGS environment \n" \
" variable has this value set. This may break the build \n" \
" by not allowing builtin rules that may be required. \n" \
" Please fix and restart the build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# it is unacceptable to have the -t or --touch value in MAKEFLAGS
@# Note - this rule never gets invoked because it is processed out
@# in GNU Make startup
@#
$(ECHO) "ERROR: Either the build was started with the flag -t or \n" \
" --touch, or the MAKEFLAGS environment \n" \
" variable has this value set. This will leave the \n" \
" build in a unclear state and could lead to not executing \n" \
" rules which should be executed. \n" \
" Please fix and restart the build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# show what is in MAKEFLAGS so the user is aware...
@#
@$(ECHO) "WARNING: Your MAKEFLAGS environment variable is set. \n" \
" You should be very careful about the values set here. \n" \
"\n" \
"" >> $(WARNING_FILE)
######################################################
# if specified, ALT_OUTPUTDIR must point to non-relative path if set
######################################################
$(ECHO) "ERROR: ALT_OUTPUTDIR must be an Absolute Path Name, \n" \
" not a Relative Path Name. \n" \
"" >> $(ERROR_FILE) ; \
fi
$(ECHO) "ERROR: On windows, ALT_OUTPUTDIR must contain the drive letter. \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# OUTPUTDIR tests
######################################################
@#
@# OUTPUTDIR must be a directory...
@#
$(ECHO) "ERROR: OUTPUTDIR must be an existing directory. The current \n" \
" value of OUTPUTDIR is \n" \
" Please check your value of ALT_OUTPUTDIR. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# OUTPUTDIR must be writeable by user...
@#
$(ECHO) "ERROR: You must have write permissions to OUTPUTDIR. The \n" \
" current value of OUTPUTDIR is \n" \
" Either obtain these permissions or set ALT_OUTPUTDIR. \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# if specified, ALT_BOOTDIR must point to non-relative path if set
######################################################
$(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
" not a Relative Path Name. \n" \
" The current value of ALT_BOOTDIR is \n" \
" Please fix this and continue your build. \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# BOOTDIR must point to a valid JDK.
######################################################
$(ECHO) "ERROR: Your BOOTDIR environment variable does not point \n" \
" to a valid JDK for bootstrapping this build. \n" \
" Please update your ALT_BOOTDIR setting and start your build again. \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# BOOTDIR is recommended to reside on a local drive
######################################################
$(ECHO) "WARNING: Your BOOTDIR is located on the J: drive. Often the J:\n" \
" drive is mapped over a network. Using a mapped drive for\n" \
" the BOOTDIR may significantly slow down the build process.\n" \
" You may want to consider using the ALT_BOOTDIR variable\n" \
" to point the build to another location for the BOOTDIR instead. \n" \
" Your current BOOTDIR is:\n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# CACERTS_FILE must be absoulte path and readable
######################################################
$(ECHO) "ERROR: ALT_CACERTS_FILE must be an Absolute Path Name, \n" \
" not a Relative Path Name. \n" \
" The current value of ALT_CACERTS_FILE is \n" \
" Please fix this and continue your build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# CACERTS_FILE must be readable
@#
$(ECHO) "ERROR: You do not have access to a valid cacerts file. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# CACERTS_FILE must be a file
@#
$(ECHO) "ERROR: You do not have access to a valid cacerts file.\n" \
" The value of CACERTS_FILE must point to a normal file.\n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check for availability of FreeType (OpenJDK specific)
######################################################
# The freetypecheck Makefile prints out "Failed" if not good enough
" or higher is required. \n" \
fi
else
#do nothing (cross-compiling)
else
#do nothing (not OpenJDK)
######################################################
# CUPS_HEADERS_PATH must be valid
######################################################
$(ECHO) "ERROR: You do not have access to valid Cups header files. \n" \
" Please check your access to \n" \
" CUPS is frequently pre-installed on many systems, \n" \
" or may be downloaded from http://www.cups.org \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check for existence of DEVTOOLS_PATH
# All needed tools come with base system on Apple
######################################################
$(ECHO) "ERROR: You do not have a valid DEVTOOLS_PATH setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check for existence of MS_RUNTIME_LIBRARIES
######################################################
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check for existence of COMPILER_PATH
######################################################
$(ECHO) "ERROR: You do not have a valid COMPILER_PATH setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check for existence of UNIXCOMMAND_PATH
######################################################
$(ECHO) "ERROR: You do not have a valid UNIXCOMMAND_PATH setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
$(ECHO) "WARNING: You do not have the utility $${utility} in the \n" \
" The utilities cpio, ar, file, and m4 are required. \n" \
"" >> $(WARNING_FILE) ; \
fi; \
done
######################################################
# Check for existence of USRBIN_PATH on linux
######################################################
$(ECHO) "ERROR: You do not have a valid USRBIN_PATH setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check for existence of UNIXCCS_PATH on solaris
######################################################
$(ECHO) "ERROR: You do not have a valid UNIXCCS_PATH setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Verify the docs directory exists
######################################################
" does not exist, check your value of ALT_HOTSPOT_DOCS_IMPORT_PATH. \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check for possible problem regarding __fabsf, math_iso.h and the libm patch.
# Hotspot should have been changed in Mustang 6.0 Build 47 to not depend
# on __fabsf, this is just checking that fact now.
######################################################
if [ "`$(NM) $(HOTSPOT_SERVER_PATH)/$(LIB_PREFIX)jvm.$(LIBRARY_SUFFIX) | $(GREP) __fabsf`" != "" ]; then \
$(ECHO) "WARNING: This version of hotspot relies on __fabsf \n" \
" which is not always available on Solaris 8 and 9 machines \n" \
" unless they have the latest libm patch and the file \n" \
" /usr/include/iso/math_iso.h which can trigger this dependency.\n" \
" Hotspot should NOT be dependent on this extern, check the \n" \
" version of the hotspot library you are using. \n" \
"" >> $(WARNING_FILE) ; \
fi; \
fi
######################################################
# Check for possible patch problem regarding /usr/lib/libCrun.so
######################################################
$(ECHO) "WARNING: The file /usr/lib/libCrun.so.1 is missing the extern \n" \
" __1c2n6FIpv_0_ which indicates that the system is missing \n" \
" a required Solaris patch, or you are using a pre-FCS release \n" \
" of Solaris 10. You need the latest /usr/lib/libCrun.so.1 \n" \
" which comes with the FCS release of Solaris 10 and available \n" \
" through the latest Solaris 8 or 9 C++ runtime patches. \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check for existence of the extra tools on windows
######################################################
" This is normally obtained from the WINDOWSSDKDIR." \
"" >> $(ERROR_FILE)
" This is normally obtained from the COMPILER_PATH." \
"" >> $(ERROR_FILE)
######################################################
# Check for existence of Hotspot binaries
######################################################
$(ECHO) "ERROR: HOTSPOT_CLIENT_PATH does not point to a valid HotSpot VM. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
$(ECHO) "ERROR: HOTSPOT_SERVER_PATH does not point to a valid HotSpot VM. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# Check value of HOTSPOT_LIB_PATH
@#
@if [ ! -r $(HOTSPOT_LIB_PATH)/jvm.lib ]; then \
$(ECHO) "ERROR: HOTSPOT_LIB_PATH does not point to a valid HotSpot library. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# Check for the .map files - its OK if they are not there..
@#
@# There is no 64-bit HotSpot client VM
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.diz ]; then \
$(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .diz files. \n" \
" These files are optional and aid in the debugging of the JVM. \n" \
" Please check your access to \n" \
"" >> $(WARNING_FILE) ; \
fi
else
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.map ]; then \
$(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .map files. \n" \
" These files are optional and aid in the debugging of the JVM. \n" \
" Please check your access to \n" \
"" >> $(WARNING_FILE) ; \
fi
@if [ ! -r $(HOTSPOT_CLIENT_PATH)/jvm.pdb ]; then \
$(ECHO) "WARNING: HOTSPOT_CLIENT_PATH does not point to valid HotSpot .pdb files. \n" \
" These files are optional and aid in the debugging of the JVM. \n" \
" Please check your access to \n" \
"" >> $(WARNING_FILE) ; \
fi
@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.diz ]; then \
$(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .diz files. \n" \
" These files are optional and aid in the debugging of the JVM. \n" \
" Please check your access to \n" \
"" >> $(WARNING_FILE) ; \
fi
else
@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.map ]; then \
$(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .map files. \n" \
" These files are optional and aid in the debugging of the JVM. \n" \
" Please check your access to \n" \
"" >> $(WARNING_FILE) ; \
fi
@if [ ! -r $(HOTSPOT_SERVER_PATH)/jvm.pdb ]; then \
$(ECHO) "WARNING: HOTSPOT_SERVER_PATH does not point to valid HotSpot .pdb files. \n" \
" These files are optional and aid in the debugging of the JVM. \n" \
" Please check your access to \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check for existence of misc Hotspot imported files
######################################################
#HOTSPOT_INCLUDE_FILE_LIST += jmm.h
# These include files must have a pattern: 'version: MAJOR.MINOR.MICRO'
# where MACRO, MINOR, and MICRO are numbers, e.g. 1.0.1, 0.2.90, etc.
# The critical version we are checking is MAJOR.MINOR, we print all three
# when we detect an error.
$(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\)\.[0-9].*@\1@'
$(SED) -e 's@.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*@\1@'
# Compare an interface file (Rule creates 2 temp files: %.h and %.h.IMPORT)
# exported but do represent VM interfaces used by the rest of the jdk.
# So these 3 will not be found in a promoted build and can only
# be checked when this represents a full control build (i.e. the
# HOTSPOT_IMPORT_PATH includes these files in it's 'include' directory).
" Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
"" >> $(WARNING_FILE) ; \
else \
fi
" Check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
"" >> $(WARNING_FILE) ; \
else \
fi
# Compares the two tempfiles: %.h and %.h.IMPORT, answer in %.hdiffs
# Note: Putting anything into the hdiffs file will trigger generic IMPORT
# warning message in hotspot_import_include.
# First checks the major.minor versions, the micro number can differ.
# Second checks the full version.
# Lastly does a full diff if the full version differs or it has no version
@$(TOUCH) $@
"" >> $(WARNING_FILE) ; \
$(ECHO) "Version mis-match" > $@ ; \
fi
fi
# Verify all imported hotspot files
# Verify the base directory exists
@$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS)
@$(RM) $(TMP_SDK_INCLUDE_FILE_LIST)
" does not exist, check your value of ALT_HOTSPOT_IMPORT_PATH. \n" \
"" >> $(WARNING_FILE) ; \
fi
# Verify hotspot include files
$(ECHO) "WARNING: Possible HotSpot VM interface conflict. \n" \
" HOTSPOT_IMPORT_PATH is used to import files from the VM build. \n" \
" It is also used to verify that any copied files are consistent between \n" \
" these two components. It has been detected that one or more of the \n" \
" VM interface files inside this workspace may not match the interfaces \n" \
" exported by the VM, or the VM versions could not be found. \n" \
" The list of VM interface files is: \n" \
" This workspace has copies of these files at: \n" \
" for build purposes, and they should contain the same interfaces \n" \
" as the VM versions imported from: \n" \
" If an interface indeed doesn't match, then the use of this interface \n" \
" at JDK runtime could cause serious errors. \n" \
"" >> $(WARNING_FILE) ; \
for i in $(TMP_SDK_INCLUDE_FILE_DIFFS); do \
if [ -s $$i ] ; then \
$(CAT) $$i >> $(WARNING_FILE); \
fi; \
done; \
fi
@$(RM) $(TMP_SDK_INCLUDE_FILE_DIFFS)
@$(RM) $(TMP_SDK_INCLUDE_FILE_LIST)
# The JDI-SA feature is not currently released on some platforms.
# See the Defs-<arch>.gmk files.
# Verify that hotspot Serviceability Agent files are present. To keep
# it simple, we will just check for one of them. The others have arch
# dependent paths.
" The JDI binding for the Serviceability Agent will not be included in the build.\n" \
" Please check your access to\n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check the ant version
######################################################
$(ECHO) "ERROR: The version of ant being used is older than \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check the zip file version
######################################################
$(ECHO) "WARNING: The version of zip being used is older than \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check the unzip file version
######################################################
$(ECHO) "WARNING: The version of unzip being used is older than \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check for windows DirectX sdk directory
######################################################
@if [ ! -r $(DXSDK_INCLUDE_PATH)/d3d9.h ]; then \
$(ECHO) "ERROR: You do not have access to a valid DirectX SDK Include dir.\n" \
" The value of DXSDK_INCLUDE_PATH must point a valid DX SDK dir.\n" \
" Please check your access to \n" \
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
"" >> $(ERROR_FILE) ; \
else \
" The DirectX SDK was obtained from the following location: \n" \
" Please change your DirectX SDK. \n" \
" Microsoft DirectX 9 SDK (Summer 2004 Update or newer) can be downloaded from the following location:\n" \
"" >> $(ERROR_FILE) ; \
else \
if [ -r $(DXSDK_INCLUDE_PATH)/basetsd.h ]; then \
" which may indicate that you're using an incorrect version of DirectX SDK.\n" \
" This may result in a build failure.\n" \
" The DirectX SDK Include dir was obtained from the following location:\n" \
" Please change your DirectX SDK to version 9 (Summer 2004 Update or newer).\n" \
" Microsoft DirectX 9 SDK can be downloaded from the following location:\n" \
"" >> $(WARNING_FILE) ; \
fi \
fi \
fi \
fi
######################################################
# Check the linker version(s)
######################################################
$(ECHO) "ERROR: The Linker version is undefined. \n" \
"" >> $(ERROR_FILE) ; \
fi
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check the compiler version(s)
######################################################
$(ECHO) "ERROR: The Compiler version is undefined. \n" \
"" >> $(ERROR_FILE) ; \
fi
$(ECHO) "WARNING: The $(PLATFORM) compiler is not version $(REQUIRED_COMPILER_VERSION) $(REQUIRED_CC_VER) \n" \
" The compiler was obtained from the following location: \n" \
"" >> $(WARNING_FILE) ; \
fi
######################################################
# Check that ALSA headers and libs are installed and
# that the header has the right version. We only
######################################################
" You have the following ALSA version installed: $${alsa_version} \n" \
" Please reinstall ALSA (drivers and lib). You can download \n" \
" the source distribution from http://www.alsa-project.org \n" \
" or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
"" >> $(ERROR_FILE) ; \
fi ; \
else \
" Please install ALSA (drivers and lib). You can download the \n" \
" source distribution from http://www.alsa-project.org or go to \n" \
" http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
"" >> $(ERROR_FILE) ; \
fi
# If a sanity file doesn't exist, just make sure it's dir exists
$(SANITY_FILES):
######################################################
# dump out the variable settings...
######################################################
@$(ECHO) >> $(MESSAGE_FILE)
@$(ECHO) >> $(MESSAGE_FILE)
######################################################
# Check for existence of DEPLOY_MSSDK on windows
######################################################
$(ECHO) "WARNING: Your DEPLOY_MSSDK setting is empty.\n" \
" It is recommended to set ALT_DEPLOY_MSSDK.\n" \
"" >> $(WARNING_FILE) ; \
fi
$(ECHO) "ERROR: You do not have a valid DEPLOY_MSSDK setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check for existence of the MSSDK on windows
######################################################
$(ECHO) "WARNING: Your WINDOWSSDKDIR setting is empty.\n" \
" It is recommended to set ALT_WINDOWSSDKDIR.\n" \
"" >> $(WARNING_FILE) ; \
fi
$(ECHO) "ERROR: You do not have a valid WINDOWSSDKDIR setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
$(ECHO) "WARNING: Your INSTALL_MSSDK setting is empty.\n" \
" It is recommended to set ALT_INSTALL_MSSDK.\n" \
"" >> $(WARNING_FILE) ; \
fi
$(ECHO) "ERROR: You do not have a valid INSTALL_MSSDK setting. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Check the GNU C++ compiler for OJI plugin
######################################################
@if [ -r $(GCC_COMPILER_PATH) ]; then \
" The compiler was obtained from the following location: \n" \
" Please change your compiler. \n" \
"" >> $(ERROR_FILE) ; \
fi \
else \
$(ECHO) "ERROR: You do not have a valid GCC_COMPILER_PATH setting. \n" \
" Please check your access to \n" \
" This will affect you if you build the plugin target. \n" \
"" >> $(ERROR_FILE) ; \
fi
$(ECHO) "ERROR: You do not have a valid ALT_GCC29_COMPILER_PATH setting. \n" \
" Please check your access to \n" \
" This will affect you if you build the plugin target. \n" \
"" >> $(ERROR_FILE) ; \
fi
else
@if [ ! -r $(ALT_GCC29_PLUGIN_LIB_PATH)/libjavaplugin_oji.so ]; then \
$(ECHO) "Error: You do not have a valid ALT_GCC29_PLUGIN_LIB_PATH setting. \n" \
" Please check your access to \n" \
" This will affect you if you build the plugin target, specifically for gcc 2.9 version of OJI plugin library. \n" \
"" >> $(ERROR_FILE) ; \
fi
else
@if [ ! -r $(GCC29_COMPILER_PATH) ]; then \
$(ECHO) "ERROR: You do not have a valid GCC29_COMPILER_PATH setting. \n" \
" Please check your access to \n" \
" This will affect you if you build the plugin target. \n" \
"" >> $(ERROR_FILE) ; \
fi
endif # ALT_GCC29_PLUGIN_LIB_PATH
endif # ALT_GCC29_COMPILER_PATH
endif # ARCH_DATA_MODEL, 32
endif # LINUX
endif # OPEN_JDK
######################################################
# MOZILLA_HEADERS_PATH must be valid
######################################################
@if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
$(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \
" not a Relative Path Name. \n" \
" The current value of ALT_MOZILLA_HEADERS_PATH is \n" \
" Please fix this and continue your build. \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# MOZILLA_HEADERS_PATH must be valid....
@#
$(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \
" Please check your access to \n" \
" and on Windows, ALT_JDK_JAVA_DRIVE. \n" \
"" >> $(ERROR_FILE) ; \
fi
else
$(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
@#
@# Check for presence of headers required for new Java Plug-In ("plugin2")
@#
$(ECHO) "ERROR: You do not have access to valid Mozilla header files for the new Java Plug-In. \n" \
" Please check your access to \n" \
"" >> $(ERROR_FILE) ; \
fi
######################################################
# Make sure Java Kernel VM is accessible
######################################################
@if [ ! -r $(HOTSPOT_KERNEL_PATH)/jvm.dll ]; then \
$(ECHO) "WARNING: Your HOTSPOT_IMPORT_PATH does not include a Kernel VM... \n" \
" The kernel installer may not be built (unless hotspot is also). \n" \
" Please check the value of ALT_HOTSPOT_IMPORT_PATH. \n" \
>> $(WARNING_FILE) ; \
fi
######################################################
# this should be the last rule in any target's sanity rule.
######################################################
@if [ -r $(MESSAGE_FILE) ]; then \
$(CAT) $(MESSAGE_FILE) ; \
fi
@if [ -r $(WARNING_FILE) ]; then \
$(CAT) $(WARNING_FILE) ; \
fi
$(ECHO) "INSANE mode requested. \n" \
"Sanity will not force a build termination, even with errors.\n" \
"" >> $(ERROR_FILE); \
fi
@if [ -r $(ERROR_FILE) ]; then \
$(ECHO) "Exiting because of the above error(s). \n" \
"">> $(ERROR_FILE); \
fi ; \
$(CAT) $(ERROR_FILE) ; \
exit 1 ; \
fi ; \
fi
@if [ -r $(WARNING_FILE) ]; then \
$(ECHO) "PEDANTIC mode requested. \n" \
"Exiting because of the above warning(s). \n" \
"" >> $(ERROR_FILE); \
$(CAT) $(ERROR_FILE) ; \
exit 1 ; \
fi
endif # PEDANTIC
@if [ ! -r $(ERROR_FILE) ]; then \
$(ECHO) "Sanity check passed." ; \
fi
endif # EXTERNALSANITYCONTROL