make/sanity-rules.gmk
author rupashka
Thu, 26 Feb 2009 11:44:43 +0300
changeset 2488 4d54c9133cda
parent 0 fd16c54261b3
child 2778 6df702c8ca19
permissions -rw-r--r--
6794831: Infinite loop while painting ticks on Slider with maximum=MAX_INT Reviewed-by: malenkov
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fd16c54261b3 Initial load
duke
parents:
diff changeset
     1
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
     2
# Copyright 2001-2007 Sun Microsystems, Inc.  All Rights Reserved.
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
fd16c54261b3 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
fd16c54261b3 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
fd16c54261b3 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
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
#
fd16c54261b3 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
fd16c54261b3 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
fd16c54261b3 Initial load
duke
parents:
diff changeset
    23
# have any questions.
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
fd16c54261b3 Initial load
duke
parents:
diff changeset
   207
ifndef OPENJDK
fd16c54261b3 Initial load
duke
parents:
diff changeset
   208
  ifdef NO_DOCS
fd16c54261b3 Initial load
duke
parents:
diff changeset
   209
	@$(ECHO) "WARNING: Your build environment has the variable NO_DOCS\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   210
	   "        defined. This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   211
	   "        build of the JDK, lacking the documentation.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   212
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   213
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   214
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   215
ifdef NO_IMAGES
fd16c54261b3 Initial load
duke
parents:
diff changeset
   216
	@$(ECHO) "WARNING: Your build environment has the variable NO_IMAGES\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   217
	   "        defined. This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   218
	   "        build of the JDK, lacking the install images\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   219
	   "        and bundles.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   220
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   221
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   222
ifdef DEV_ONLY
fd16c54261b3 Initial load
duke
parents:
diff changeset
   223
	@$(ECHO) "WARNING: Your build environment has the variable DEV_ONLY\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   224
	   "        defined. This will result in a development-only\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   225
	   "        build of the JDK, lacking the documentation\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   226
	   "        build and installation bundles.\n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   227
	   "" >> $(WARNING_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   228
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   229
fd16c54261b3 Initial load
duke
parents:
diff changeset
   230
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   231
# if specified, ALT_BOOTDIR must point to non-relative path if set
fd16c54261b3 Initial load
duke
parents:
diff changeset
   232
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   233
alt_bootdir:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   234
ifdef ALT_BOOTDIR
fd16c54261b3 Initial load
duke
parents:
diff changeset
   235
	@if [ `$(ECHO) $(subst \,/,$(ALT_BOOTDIR)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   236
	  $(ECHO) "ERROR: ALT_BOOTDIR must be an Absolute Path Name, \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   237
	    "      not a Relative Path Name. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   238
	    "      The current value of ALT_BOOTDIR is \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   239
	    "          $(ALT_BOOTDIR) \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   240
	    "      Please fix this and continue your build. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   241
	    "" >> $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   242
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   243
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   244
fd16c54261b3 Initial load
duke
parents:
diff changeset
   245
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   246
# BOOTDIR must point to a valid JDK.
fd16c54261b3 Initial load
duke
parents:
diff changeset
   247
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   248
JAVA_VERSION := $(shell $(BOOTDIR)/bin/java$(EXE_SUFFIX) -version 2>&1  | $(NAWK) -F'"' '{ print $$2 }')
fd16c54261b3 Initial load
duke
parents:
diff changeset
   249
JAVA_VERSION_OK := $(shell $(ECHO) $(JAVA_VERSION) | $(EGREP) -c '^1.[5-6].[0-9]')
fd16c54261b3 Initial load
duke
parents:
diff changeset
   250
bootdir:
fd16c54261b3 Initial load
duke
parents:
diff changeset
   251
	@if [ -x $(BOOTDIR)/bin/java$(EXE_SUFFIX) ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   252
	  if [ $(JAVA_VERSION_OK) -ne 1 ]; then \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   253
	    $(ECHO) "ERROR: Your BOOTDIR environment variable does not point \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   254
	      "      to a valid JDK for bootstrapping this build. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   255
	      "      A JDK $(JDK_MKTG_VERSION) source generation process must be \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   256
	      "      bootstrapped using JDK $(PREVIOUS_JDK_VERSION) fcs (or later). \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   257
	      "      Apparently, your bootstrap JDK is version $(JAVA_VERSION) \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   258
	      "      Please update your ALT_BOOTDIR setting and start your build again. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   259
	      "" >> $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   260
	  fi \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   261
	else \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   262
	  $(ECHO) "ERROR: BOOTDIR does not point to a valid Java 2 SDK \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   263
	    "      Check that you have access to \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   264
	    "          $(BOOTDIR)/bin/java$(EXE_SUFFIX) \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   265
	    "      and/or check your value of ALT_BOOTDIR. \n" \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   266
	    "" >> $(ERROR_FILE) ; \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   267
	fi
fd16c54261b3 Initial load
duke
parents:
diff changeset
   268
fd16c54261b3 Initial load
duke
parents:
diff changeset
   269
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   270
# dump out the variable settings...
fd16c54261b3 Initial load
duke
parents:
diff changeset
   271
######################################################
fd16c54261b3 Initial load
duke
parents:
diff changeset
   272
ifneq ($(PLATFORM), windows)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   273
  ifndef HOSTNAME
fd16c54261b3 Initial load
duke
parents:
diff changeset
   274
    HOSTNAME := $(shell hostname)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   275
  endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   276
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   277
settings:: 
fd16c54261b3 Initial load
duke
parents:
diff changeset
   278
	@$(ECHO) "Build Machine Information:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   279
ifeq ($(PLATFORM), windows)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   280
	@$(ECHO) "   build machine = $(COMPUTERNAME)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   281
else
fd16c54261b3 Initial load
duke
parents:
diff changeset
   282
	@$(ECHO) "   build machine = $(HOSTNAME)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   283
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   284
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   285
	@$(ECHO) "Build Directory Structure:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   286
	@$(ECHO) "   CWD = `$(PWD)`" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   287
	@$(ECHO) "   TOPDIR = $(TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   288
	@$(ECHO) "   CONTROL_TOPDIR = $(CONTROL_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   289
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   290
	@$(ECHO) "   LANGTOOLS_TOPDIR = $(LANGTOOLS_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   291
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   292
ifeq ($(JAXP_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   293
	@$(ECHO) "   JAXP_TOPDIR = $(JAXP_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   294
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   295
ifeq ($(JAXWS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   296
	@$(ECHO) "   JAXWS_TOPDIR = $(JAXWS_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   297
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   298
ifeq ($(CORBA_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   299
	@$(ECHO) "   CORBA_TOPDIR = $(CORBA_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   300
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   301
ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   302
	@$(ECHO) "   HOTSPOT_TOPDIR = $(HOTSPOT_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   303
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   304
ifeq ($(JDK_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   305
	@$(ECHO) "   JDK_TOPDIR = $(JDK_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   306
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   307
ifeq ($(DEPLOY_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   308
	@$(ECHO) "   DEPLOY_TOPDIR = $(DEPLOY_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   309
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   310
ifeq ($(INSTALL_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   311
	@$(ECHO) "   INSTALL_TOPDIR = $(INSTALL_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   312
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   313
ifeq ($(SPONSORS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   314
	@$(ECHO) "   SPONSORS_TOPDIR = $(SPONSORS_TOPDIR)"  >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   315
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   316
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   317
ifneq ($(SKIP_COMPARE_IMAGES), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   318
	@$(ECHO) "External File/Binary Locations:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   319
	@$(ECHO) "   PREVIOUS_JRE_BUNDLE = $(PREVIOUS_JRE_BUNDLE) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   320
	@$(ECHO) "   PREVIOUS_JDK_BUNDLE = $(PREVIOUS_JDK_BUNDLE) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   321
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   322
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   323
	@$(ECHO) "Build Directives:" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   324
ifeq ($(LANGTOOLS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   325
	@$(ECHO) "   BUILD_LANGTOOLS = $(BUILD_LANGTOOLS) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   326
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   327
ifeq ($(JAXP_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   328
	@$(ECHO) "   BUILD_JAXP = $(BUILD_JAXP) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   329
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   330
ifeq ($(JAXWS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   331
	@$(ECHO) "   BUILD_JAXWS = $(BUILD_JAXWS) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   332
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   333
ifeq ($(CORBA_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   334
	@$(ECHO) "   BUILD_CORBA = $(BUILD_CORBA) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   335
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   336
ifeq ($(HOTSPOT_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   337
	@$(ECHO) "   BUILD_HOTSPOT = $(BUILD_HOTSPOT) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   338
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   339
ifeq ($(JDK_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   340
	@$(ECHO) "   BUILD_JDK    = $(BUILD_JDK) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   341
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   342
ifeq ($(DEPLOY_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   343
	@$(ECHO) "   BUILD_DEPLOY  = $(BUILD_DEPLOY) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   344
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   345
ifeq ($(INSTALL_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   346
	@$(ECHO) "   BUILD_INSTALL = $(BUILD_INSTALL) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   347
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   348
ifeq ($(SPONSORS_SRC_AVAILABLE), true)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   349
	@$(ECHO) "   BUILD_SPONSORS = $(BUILD_SPONSORS) " >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   350
endif
fd16c54261b3 Initial load
duke
parents:
diff changeset
   351
	@$(ECHO) "" >> $(MESSAGE_FILE)
fd16c54261b3 Initial load
duke
parents:
diff changeset
   352
fd16c54261b3 Initial load
duke
parents:
diff changeset
   353
.PHONY: sanity settings pre-sanity insane \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   354
	post-sanity post-sanity-hotspot post-sanity-jdk \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   355
	post-sanity-install post-sanity-deploy \
fd16c54261b3 Initial load
duke
parents:
diff changeset
   356
	alt_bootdir bootdir