make/sanity-rules.gmk
author iveresov
Thu, 14 Apr 2011 00:02:21 -0700
changeset 9138 35e4b04eadf4
parent 7654 a8d5f59bbae6
child 9930 8faced1b0ba4
permissions -rw-r--r--
7036236: VM crashes assert((!inside_attrs()) || is_error_reported()) failed ... Summary: Eliminate the race condition. Reviewed-by: kvn
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     1
#
7654
a8d5f59bbae6 6962318: Update copyright year
ohair
parents: 6039
diff changeset
     2
# Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fd16c54261b3 Initial load
duke
parents:
diff changeset
     4
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
fd16c54261b3 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5499
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5499
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    10
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
fd16c54261b3 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fd16c54261b3 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
fd16c54261b3 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
fd16c54261b3 Initial load
duke
parents:
diff changeset
    16
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
fd16c54261b3 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    20
#
5499
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
eb0b3e373167 6943119: Rebrand source copyright notices
ohair
parents: 4309
diff changeset
    23
# questions.
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
    24
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    25
fd16c54261b3 Initial load
duke
parents:
diff changeset
    26
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    27
# SANITY
fd16c54261b3 Initial load
duke
parents:
diff changeset
    28
################################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
    29
fd16c54261b3 Initial load
duke
parents:
diff changeset
    30
sanity:: pre-sanity settings insane environment
fd16c54261b3 Initial load
duke
parents:
diff changeset
    31
fd16c54261b3 Initial load
duke
parents:
diff changeset
    32
ifeq ($(BUILD_HOTSPOT), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    33
  sanity:: hotspot-sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
    34
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    35
fd16c54261b3 Initial load
duke
parents:
diff changeset
    36
ifeq ($(BUILD_DEPLOY), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    37
  sanity:: deploy-sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
    38
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    39
fd16c54261b3 Initial load
duke
parents:
diff changeset
    40
ifeq ($(BUILD_JDK), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    41
  sanity:: jdk-sanity 
fd16c54261b3 Initial load
duke
parents:
diff changeset
    42
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    43
fd16c54261b3 Initial load
duke
parents:
diff changeset
    44
# Only need these sanity rules when not doing a debug build
fd16c54261b3 Initial load
duke
parents:
diff changeset
    45
ifeq ($(DEBUG_NAME),)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    46
fd16c54261b3 Initial load
duke
parents:
diff changeset
    47
  ifeq ($(BUILD_INSTALL), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    48
    sanity:: install-sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
    49
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    50
fd16c54261b3 Initial load
duke
parents:
diff changeset
    51
  ifeq ($(BUILD_SPONSORS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    52
    sanity:: sponsors-sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
    53
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    54
fd16c54261b3 Initial load
duke
parents:
diff changeset
    55
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
    56
fd16c54261b3 Initial load
duke
parents:
diff changeset
    57
sanity:: post-sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
    58
fd16c54261b3 Initial load
duke
parents:
diff changeset
    59
source-sanity : pre-sanity alt_bootdir bootdir post-sanity
fd16c54261b3 Initial load
duke
parents:
diff changeset
    60
fd16c54261b3 Initial load
duke
parents:
diff changeset
    61
$(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE):
fd16c54261b3 Initial load
duke
parents:
diff changeset
    62
	@$(prep-target)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    63
fd16c54261b3 Initial load
duke
parents:
diff changeset
    64
purge-sanity: $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    65
	-@$(RM) $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
    66
fd16c54261b3 Initial load
duke
parents:
diff changeset
    67
pre-sanity: purge-sanity 
fd16c54261b3 Initial load
duke
parents:
diff changeset
    68
fd16c54261b3 Initial load
duke
parents:
diff changeset
    69
# this should be the last rule in any target's sanity rule.
fd16c54261b3 Initial load
duke
parents:
diff changeset
    70
post-sanity post-sanity-hotspot post-sanity-jdk post-sanity-install post-sanity-deploy:
fd16c54261b3 Initial load
duke
parents:
diff changeset
    71
	@if [ -r $(MESSAGE_FILE) ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    72
	  $(ECHO) "" ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    73
	  $(CAT) $(MESSAGE_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    74
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
    75
	@if [ -r $(WARNING_FILE) ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    76
	  $(CAT) $(WARNING_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    77
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
    78
	@if [ "x$(INSANE)" != x ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    79
	  $(ECHO) "INSANE mode requested. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    80
	    "Sanity will not force a build termination, even with errors.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    81
	    "" >> $(ERROR_FILE); \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    82
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
    83
	@if [ -r $(ERROR_FILE) ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    84
	  if [ "x$(INSANE)" = x ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    85
	    $(ECHO) "Exiting because of the above error(s). \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    86
	      "">> $(ERROR_FILE); \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    87
	  fi ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    88
	  $(CAT) $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    89
	  if [ "x$(INSANE)" = x ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    90
	    exit 1 ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    91
	  fi ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    92
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
    93
ifdef PEDANTIC
fd16c54261b3 Initial load
duke
parents:
diff changeset
    94
	@if [ -r $(WARNING_FILE) ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    95
	  $(ECHO) "PEDANTIC mode requested. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    96
	    "Exiting because of the above warning(s). \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    97
	    "" >> $(ERROR_FILE); \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    98
	  $(CAT) $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
    99
	  exit 1 ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   100
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   101
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   102
	@if [ ! -r $(ERROR_FILE) ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   103
	  $(ECHO) "Sanity check passed." ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   104
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   105
fd16c54261b3 Initial load
duke
parents:
diff changeset
   106
insane:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   107
ifdef INSANE
fd16c54261b3 Initial load
duke
parents:
diff changeset
   108
	@$(ECHO) "WARNING: You are building in 'INSANE' mode. You \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   109
	   "        should not use this mode, and in fact, \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   110
	   "        it may be removed at any time. If you \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   111
	   "        have build problems as a result of using \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   112
	   "        INSANE mode, then you should not expect \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   113
	   "        assistance from anyone with the problems \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   114
	   "        or consequences you experience. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   115
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   116
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   117
fd16c54261b3 Initial load
duke
parents:
diff changeset
   118
# Get list of environment variables set that we do not want set
fd16c54261b3 Initial load
duke
parents:
diff changeset
   119
ifdef ALT_HOTSPOT_SERVER_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   120
  DO_NOT_SET_LIST += ALT_HOTSPOT_SERVER_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   121
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   122
ifdef ALT_HOTSPOT_CLIENT_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   123
  DO_NOT_SET_LIST += ALT_HOTSPOT_CLIENT_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   124
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   125
ifdef ALT_HOTSPOT_LIB_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   126
  DO_NOT_SET_LIST += ALT_HOTSPOT_LIB_PATH
fd16c54261b3 Initial load
duke
parents:
diff changeset
   127
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   128
fd16c54261b3 Initial load
duke
parents:
diff changeset
   129
# Error message for environment variable set that should not be
fd16c54261b3 Initial load
duke
parents:
diff changeset
   130
%.do_not_set:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   131
	@$(ECHO) "ERROR: Your build environment has the variable\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   132
	   "        $* defined. Please unset it and restart your build. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   133
	   "" >> $(ERROR_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   134
fd16c54261b3 Initial load
duke
parents:
diff changeset
   135
# Check the environment variables	
fd16c54261b3 Initial load
duke
parents:
diff changeset
   136
environment: $(DO_NOT_SET_LIST:%=%.do_not_set)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   137
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   138
  ifneq ($(BUILD_LANGTOOLS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   139
	@$(ECHO) "WARNING: You are not building the LANGTOOLS sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   140
           "        Lang tools (javac) will be obtained from \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   141
           "        the location set in ALT_JDK_IMPORT_PATH. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   142
           "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   143
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   144
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   145
ifeq ($(JAXP_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   146
  ifneq ($(BUILD_JAXP), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   147
	@$(ECHO) "WARNING: You are not building the JAXP sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   148
           "        The jaxp files will be obtained from \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   149
           "        the location set in ALT_JDK_IMPORT_PATH. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   150
           "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   151
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   152
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   153
ifeq ($(JAXWS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   154
  ifneq ($(BUILD_JAXWS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   155
	@$(ECHO) "WARNING: You are not building the JAXWS sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   156
           "        The jaxws files will be obtained from \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   157
           "        the location set in ALT_JDK_IMPORT_PATH. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   158
           "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   159
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   160
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   161
ifeq ($(CORBA_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   162
  ifneq ($(BUILD_CORBA), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   163
	@$(ECHO) "WARNING: You are not building the CORBA sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   164
           "        The corba files will be obtained from \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   165
           "        the location set in ALT_JDK_IMPORT_PATH. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   166
           "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   167
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   168
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   169
ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   170
  ifneq ($(BUILD_HOTSPOT), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   171
	@$(ECHO) "WARNING: You are not building the HOTSPOT sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   172
           "        Hotspot libs will be obtained from \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   173
           "        the location set in ALT_HOTSPOT_IMPORT_PATH. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   174
           "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   175
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   176
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   177
ifeq ($(JDK_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   178
  ifneq ($(BUILD_JDK), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   179
	@$(ECHO) "WARNING: You are not building the JDK sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   180
	   "        This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   181
	   "        build of the JDK , lacking the jdk binaries.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   182
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   183
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   184
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   185
ifeq ($(DEPLOY_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   186
  ifneq ($(BUILD_DEPLOY), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   187
	@$(ECHO) "WARNING: You are not building the DEPLOY sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   188
	   "        This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   189
	   "        build of the JDK, lacking the plugin and javaws binaries.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   190
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   191
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   192
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   193
ifeq ($(INSTALL_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   194
  ifneq ($(BUILD_INSTALL), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   195
	@$(ECHO) "WARNING: You are not building the INSTALL sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   196
	   "        This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   197
	   "        build of the JDK, lacking the installation bundles\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   198
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   199
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   200
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   201
ifeq ($(SPONSORS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   202
  ifneq ($(BUILD_SPONSORS), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   203
	@$(ECHO) "WARNING: You are not building the SPONSORS sources.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   204
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   205
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   206
endif
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 3259
diff changeset
   207
ifeq ($(GENERATE_DOCS),false)
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 3259
diff changeset
   208
	@$(ECHO) "WARNING: This build does not include running javadoc.\n" \
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   209
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   210
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   211
ifdef NO_IMAGES
fd16c54261b3 Initial load
duke
parents:
diff changeset
   212
	@$(ECHO) "WARNING: Your build environment has the variable NO_IMAGES\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   213
	   "        defined. This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   214
	   "        build of the JDK, lacking the install images\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   215
	   "        and bundles.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   216
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   217
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   218
ifdef DEV_ONLY
fd16c54261b3 Initial load
duke
parents:
diff changeset
   219
	@$(ECHO) "WARNING: Your build environment has the variable DEV_ONLY\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   220
	   "        defined. This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   221
	   "        build of the JDK, lacking the documentation\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   222
	   "        build and installation bundles.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   223
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   224
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   225
fd16c54261b3 Initial load
duke
parents:
diff changeset
   226
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   227
# if specified, ALT_BOOTDIR must point to non-relative path if set
fd16c54261b3 Initial load
duke
parents:
diff changeset
   228
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   229
alt_bootdir:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   230
ifdef ALT_BOOTDIR
6039
0503a5e92824 6972274: Fix the use of egrep -ci in the top level makefile sanity checks
ohair
parents: 5743
diff changeset
   231
	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -c '^([A-Za-z]:)?/'` -ne 1 ]; then \
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   232
	  $(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   233
	    "      not a Relative Path Name. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   234
	    "      The current value of ALT_BOOTDIR is \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   235
	    "          $(ALT_BOOTDIR) \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   236
	    "      Please fix this and continue your build. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   237
	    "" >> $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   238
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   239
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   240
fd16c54261b3 Initial load
duke
parents:
diff changeset
   241
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   242
# BOOTDIR must point to a valid JDK.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   243
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   244
JAVA_VERSION := $(shell $(BOOTDIR)/bin/java$(EXE_SUFFIX) -version 2>&1  | $(NAWK) -F'"' '{ print $$2 }')
fd16c54261b3 Initial load
duke
parents:
diff changeset
   245
JAVA_VERSION_OK := $(shell $(ECHO) $(JAVA_VERSION) | $(EGREP) -c '^1.[5-6].[0-9]')
fd16c54261b3 Initial load
duke
parents:
diff changeset
   246
bootdir:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   247
	@if [ -x $(BOOTDIR)/bin/java$(EXE_SUFFIX) ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   248
	  if [ $(JAVA_VERSION_OK) -ne 1 ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   249
	    $(ECHO) "ERROR: Your BOOTDIR environment variable does not point \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   250
	      "      to a valid JDK for bootstrapping this build. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   251
	      "      A JDK $(JDK_MKTG_VERSION) source generation process must be \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   252
	      "      bootstrapped using JDK $(PREVIOUS_JDK_VERSION) fcs (or later). \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   253
	      "      Apparently, your bootstrap JDK is version $(JAVA_VERSION) \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   254
	      "      Please update your ALT_BOOTDIR setting and start your build again. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   255
	      "" >> $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   256
	  fi \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   257
	else \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   258
	  $(ECHO) "ERROR: BOOTDIR does not point to a valid Java 2 SDK \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   259
	    "      Check that you have access to \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   260
	    "          $(BOOTDIR)/bin/java$(EXE_SUFFIX) \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   261
	    "      and/or check your value of ALT_BOOTDIR. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   262
	    "" >> $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   263
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   264
fd16c54261b3 Initial load
duke
parents:
diff changeset
   265
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   266
# dump out the variable settings...
fd16c54261b3 Initial load
duke
parents:
diff changeset
   267
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   268
ifneq ($(PLATFORM), windows)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   269
  ifndef HOSTNAME
fd16c54261b3 Initial load
duke
parents:
diff changeset
   270
    HOSTNAME := $(shell hostname)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   271
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   272
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   273
settings:: 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   274
	@$(ECHO) "Build Machine Information:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   275
ifeq ($(PLATFORM), windows)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   276
	@$(ECHO) "   build machine = $(COMPUTERNAME)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   277
else
fd16c54261b3 Initial load
duke
parents:
diff changeset
   278
	@$(ECHO) "   build machine = $(HOSTNAME)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   279
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   280
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   281
	@$(ECHO) "Build Directory Structure:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   282
	@$(ECHO) "   CWD = `$(PWD)`" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   283
	@$(ECHO) "   TOPDIR = $(TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   284
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   285
	@$(ECHO) "   LANGTOOLS_TOPDIR = $(LANGTOOLS_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   286
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   287
ifeq ($(JAXP_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   288
	@$(ECHO) "   JAXP_TOPDIR = $(JAXP_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   289
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   290
ifeq ($(JAXWS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   291
	@$(ECHO) "   JAXWS_TOPDIR = $(JAXWS_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   292
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   293
ifeq ($(CORBA_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   294
	@$(ECHO) "   CORBA_TOPDIR = $(CORBA_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   295
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   296
ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   297
	@$(ECHO) "   HOTSPOT_TOPDIR = $(HOTSPOT_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   298
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   299
ifeq ($(JDK_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   300
	@$(ECHO) "   JDK_TOPDIR = $(JDK_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   301
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   302
ifeq ($(DEPLOY_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   303
	@$(ECHO) "   DEPLOY_TOPDIR = $(DEPLOY_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   304
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   305
ifeq ($(INSTALL_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   306
	@$(ECHO) "   INSTALL_TOPDIR = $(INSTALL_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   307
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   308
ifeq ($(SPONSORS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   309
	@$(ECHO) "   SPONSORS_TOPDIR = $(SPONSORS_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   310
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   311
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   312
ifneq ($(SKIP_COMPARE_IMAGES), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   313
	@$(ECHO) "External File/Binary Locations:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   314
	@$(ECHO) "   PREVIOUS_JRE_BUNDLE = $(PREVIOUS_JRE_BUNDLE) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   315
	@$(ECHO) "   PREVIOUS_JDK_BUNDLE = $(PREVIOUS_JDK_BUNDLE) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   316
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   317
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   318
	@$(ECHO) "Build Directives:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   319
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   320
	@$(ECHO) "   BUILD_LANGTOOLS = $(BUILD_LANGTOOLS) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   321
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   322
ifeq ($(JAXP_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   323
	@$(ECHO) "   BUILD_JAXP = $(BUILD_JAXP) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   324
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   325
ifeq ($(JAXWS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   326
	@$(ECHO) "   BUILD_JAXWS = $(BUILD_JAXWS) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   327
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   328
ifeq ($(CORBA_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   329
	@$(ECHO) "   BUILD_CORBA = $(BUILD_CORBA) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   330
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   331
ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   332
	@$(ECHO) "   BUILD_HOTSPOT = $(BUILD_HOTSPOT) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   333
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   334
ifeq ($(JDK_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   335
	@$(ECHO) "   BUILD_JDK    = $(BUILD_JDK) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   336
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   337
ifeq ($(DEPLOY_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   338
	@$(ECHO) "   BUILD_DEPLOY  = $(BUILD_DEPLOY) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   339
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   340
ifeq ($(INSTALL_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   341
	@$(ECHO) "   BUILD_INSTALL = $(BUILD_INSTALL) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   342
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   343
ifeq ($(SPONSORS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   344
	@$(ECHO) "   BUILD_SPONSORS = $(BUILD_SPONSORS) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   345
endif
2778
6df702c8ca19 6829575: 100028: Debug information is incomplete or missing
aph
parents: 0
diff changeset
   346
	@$(ECHO) "   DEBUG_CLASSFILES = $(DEBUG_CLASSFILES) " >> $(MESSAGE_FILE)
6df702c8ca19 6829575: 100028: Debug information is incomplete or missing
aph
parents: 0
diff changeset
   347
	@$(ECHO) "   DEBUG_BINARIES = $(DEBUG_BINARIES) " >> $(MESSAGE_FILE)
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
   348
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   349
fd16c54261b3 Initial load
duke
parents:
diff changeset
   350
.PHONY: sanity settings pre-sanity insane \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   351
	post-sanity post-sanity-hotspot post-sanity-jdk \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   352
	post-sanity-install post-sanity-deploy \
4309
39ca605f0647 6727046: Add message when docs are skipped in control build
ohair
parents: 3259
diff changeset
   353
	alt_bootdir bootdir environment