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