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