Thu, 01 Sep 2011 13:54:18 -0700
Added tag jdk8-b03 for changeset 587bb549dff8
duke@2 | 1 | # |
jjg@354 | 2 | # Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. |
duke@2 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@2 | 4 | # |
duke@2 | 5 | # This code is free software; you can redistribute it and/or modify it |
duke@2 | 6 | # under the terms of the GNU General Public License version 2 only, as |
ohair@182 | 7 | # published by the Free Software Foundation. Oracle designates this |
duke@2 | 8 | # particular file as subject to the "Classpath" exception as provided |
ohair@182 | 9 | # by Oracle in the LICENSE file that accompanied this code. |
duke@2 | 10 | # |
duke@2 | 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
duke@2 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@2 | 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@2 | 14 | # version 2 for more details (a copy is included in the LICENSE file that |
duke@2 | 15 | # accompanied this code). |
duke@2 | 16 | # |
duke@2 | 17 | # You should have received a copy of the GNU General Public License version |
duke@2 | 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
duke@2 | 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@2 | 20 | # |
ohair@182 | 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@182 | 22 | # or visit www.oracle.com if you need additional information or have any |
ohair@182 | 23 | # questions. |
duke@2 | 24 | # |
duke@2 | 25 | |
duke@2 | 26 | ################################################################ |
duke@2 | 27 | # SANITY |
duke@2 | 28 | ################################################################ |
duke@2 | 29 | |
duke@2 | 30 | sanity:: pre-sanity settings insane environment |
duke@2 | 31 | |
duke@2 | 32 | ifeq ($(BUILD_HOTSPOT), true) |
duke@2 | 33 | sanity:: hotspot-sanity |
duke@2 | 34 | endif |
duke@2 | 35 | |
duke@2 | 36 | ifeq ($(BUILD_DEPLOY), true) |
duke@2 | 37 | sanity:: deploy-sanity |
duke@2 | 38 | endif |
duke@2 | 39 | |
duke@2 | 40 | ifeq ($(BUILD_JDK), true) |
duke@2 | 41 | sanity:: jdk-sanity |
duke@2 | 42 | endif |
duke@2 | 43 | |
duke@2 | 44 | # Only need these sanity rules when not doing a debug build |
duke@2 | 45 | ifeq ($(DEBUG_NAME),) |
duke@2 | 46 | |
duke@2 | 47 | ifeq ($(BUILD_INSTALL), true) |
duke@2 | 48 | sanity:: install-sanity |
duke@2 | 49 | endif |
duke@2 | 50 | |
duke@2 | 51 | ifeq ($(BUILD_SPONSORS), true) |
duke@2 | 52 | sanity:: sponsors-sanity |
duke@2 | 53 | endif |
duke@2 | 54 | |
duke@2 | 55 | endif |
duke@2 | 56 | |
duke@2 | 57 | sanity:: post-sanity |
duke@2 | 58 | |
jjg@354 | 59 | source-sanity : pre-sanity post-sanity |
duke@2 | 60 | |
duke@2 | 61 | $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE): |
duke@2 | 62 | @$(prep-target) |
duke@2 | 63 | |
duke@2 | 64 | purge-sanity: $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE) |
duke@2 | 65 | -@$(RM) $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE) |
duke@2 | 66 | |
duke@2 | 67 | pre-sanity: purge-sanity |
duke@2 | 68 | |
duke@2 | 69 | # this should be the last rule in any target's sanity rule. |
duke@2 | 70 | post-sanity post-sanity-hotspot post-sanity-jdk post-sanity-install post-sanity-deploy: |
duke@2 | 71 | @if [ -r $(MESSAGE_FILE) ]; then \ |
duke@2 | 72 | $(ECHO) "" ; \ |
duke@2 | 73 | $(CAT) $(MESSAGE_FILE) ; \ |
duke@2 | 74 | fi |
duke@2 | 75 | @if [ -r $(WARNING_FILE) ]; then \ |
duke@2 | 76 | $(CAT) $(WARNING_FILE) ; \ |
duke@2 | 77 | fi |
duke@2 | 78 | @if [ "x$(INSANE)" != x ]; then \ |
duke@2 | 79 | $(ECHO) "INSANE mode requested. \n" \ |
duke@2 | 80 | "Sanity will not force a build termination, even with errors.\n" \ |
duke@2 | 81 | "" >> $(ERROR_FILE); \ |
duke@2 | 82 | fi |
duke@2 | 83 | @if [ -r $(ERROR_FILE) ]; then \ |
duke@2 | 84 | if [ "x$(INSANE)" = x ]; then \ |
duke@2 | 85 | $(ECHO) "Exiting because of the above error(s). \n" \ |
duke@2 | 86 | "">> $(ERROR_FILE); \ |
duke@2 | 87 | fi ; \ |
duke@2 | 88 | $(CAT) $(ERROR_FILE) ; \ |
duke@2 | 89 | if [ "x$(INSANE)" = x ]; then \ |
duke@2 | 90 | exit 1 ; \ |
duke@2 | 91 | fi ; \ |
duke@2 | 92 | fi |
duke@2 | 93 | ifdef PEDANTIC |
duke@2 | 94 | @if [ -r $(WARNING_FILE) ]; then \ |
duke@2 | 95 | $(ECHO) "PEDANTIC mode requested. \n" \ |
duke@2 | 96 | "Exiting because of the above warning(s). \n" \ |
duke@2 | 97 | "" >> $(ERROR_FILE); \ |
duke@2 | 98 | $(CAT) $(ERROR_FILE) ; \ |
duke@2 | 99 | exit 1 ; \ |
duke@2 | 100 | fi |
duke@2 | 101 | endif |
duke@2 | 102 | @if [ ! -r $(ERROR_FILE) ]; then \ |
duke@2 | 103 | $(ECHO) "Sanity check passed." ; \ |
duke@2 | 104 | fi |
duke@2 | 105 | |
duke@2 | 106 | insane: |
duke@2 | 107 | ifdef INSANE |
duke@2 | 108 | @$(ECHO) "WARNING: You are building in 'INSANE' mode. You \n" \ |
duke@2 | 109 | " should not use this mode, and in fact, \n" \ |
duke@2 | 110 | " it may be removed at any time. If you \n" \ |
duke@2 | 111 | " have build problems as a result of using \n" \ |
duke@2 | 112 | " INSANE mode, then you should not expect \n" \ |
duke@2 | 113 | " assistance from anyone with the problems \n" \ |
duke@2 | 114 | " or consequences you experience. \n" \ |
duke@2 | 115 | "" >> $(WARNING_FILE) |
duke@2 | 116 | endif |
duke@2 | 117 | |
duke@2 | 118 | # Get list of environment variables set that we do not want set |
duke@2 | 119 | ifdef ALT_HOTSPOT_SERVER_PATH |
duke@2 | 120 | DO_NOT_SET_LIST += ALT_HOTSPOT_SERVER_PATH |
duke@2 | 121 | endif |
duke@2 | 122 | ifdef ALT_HOTSPOT_CLIENT_PATH |
duke@2 | 123 | DO_NOT_SET_LIST += ALT_HOTSPOT_CLIENT_PATH |
duke@2 | 124 | endif |
duke@2 | 125 | ifdef ALT_HOTSPOT_LIB_PATH |
duke@2 | 126 | DO_NOT_SET_LIST += ALT_HOTSPOT_LIB_PATH |
duke@2 | 127 | endif |
duke@2 | 128 | |
duke@2 | 129 | # Error message for environment variable set that should not be |
duke@2 | 130 | %.do_not_set: |
duke@2 | 131 | @$(ECHO) "ERROR: Your build environment has the variable\n" \ |
duke@2 | 132 | " $* defined. Please unset it and restart your build. \n" \ |
duke@2 | 133 | "" >> $(ERROR_FILE) |
duke@2 | 134 | |
duke@2 | 135 | # Check the environment variables |
duke@2 | 136 | environment: $(DO_NOT_SET_LIST:%=%.do_not_set) |
duke@2 | 137 | ifeq ($(LANGTOOLS_SRC_AVAILABLE), true) |
duke@2 | 138 | ifneq ($(BUILD_LANGTOOLS), true) |
duke@2 | 139 | @$(ECHO) "WARNING: You are not building the LANGTOOLS sources.\n" \ |
duke@2 | 140 | " Lang tools (javac) will be obtained from \n" \ |
duke@2 | 141 | " the location set in ALT_JDK_IMPORT_PATH. \n" \ |
duke@2 | 142 | "" >> $(WARNING_FILE) |
duke@2 | 143 | endif |
duke@2 | 144 | endif |
duke@2 | 145 | ifeq ($(JAXP_SRC_AVAILABLE), true) |
duke@2 | 146 | ifneq ($(BUILD_JAXP), true) |
duke@2 | 147 | @$(ECHO) "WARNING: You are not building the JAXP sources.\n" \ |
duke@2 | 148 | " The jaxp files will be obtained from \n" \ |
duke@2 | 149 | " the location set in ALT_JDK_IMPORT_PATH. \n" \ |
duke@2 | 150 | "" >> $(WARNING_FILE) |
duke@2 | 151 | endif |
duke@2 | 152 | endif |
duke@2 | 153 | ifeq ($(JAXWS_SRC_AVAILABLE), true) |
duke@2 | 154 | ifneq ($(BUILD_JAXWS), true) |
duke@2 | 155 | @$(ECHO) "WARNING: You are not building the JAXWS sources.\n" \ |
duke@2 | 156 | " The jaxws files will be obtained from \n" \ |
duke@2 | 157 | " the location set in ALT_JDK_IMPORT_PATH. \n" \ |
duke@2 | 158 | "" >> $(WARNING_FILE) |
duke@2 | 159 | endif |
duke@2 | 160 | endif |
duke@2 | 161 | ifeq ($(CORBA_SRC_AVAILABLE), true) |
duke@2 | 162 | ifneq ($(BUILD_CORBA), true) |
duke@2 | 163 | @$(ECHO) "WARNING: You are not building the CORBA sources.\n" \ |
duke@2 | 164 | " The corba files will be obtained from \n" \ |
duke@2 | 165 | " the location set in ALT_JDK_IMPORT_PATH. \n" \ |
duke@2 | 166 | "" >> $(WARNING_FILE) |
duke@2 | 167 | endif |
duke@2 | 168 | endif |
duke@2 | 169 | ifeq ($(HOTSPOT_SRC_AVAILABLE), true) |
duke@2 | 170 | ifneq ($(BUILD_HOTSPOT), true) |
duke@2 | 171 | @$(ECHO) "WARNING: You are not building the HOTSPOT sources.\n" \ |
duke@2 | 172 | " Hotspot libs will be obtained from \n" \ |
duke@2 | 173 | " the location set in ALT_HOTSPOT_IMPORT_PATH. \n" \ |
duke@2 | 174 | "" >> $(WARNING_FILE) |
duke@2 | 175 | endif |
duke@2 | 176 | endif |
duke@2 | 177 | ifeq ($(JDK_SRC_AVAILABLE), true) |
duke@2 | 178 | ifneq ($(BUILD_JDK), true) |
duke@2 | 179 | @$(ECHO) "WARNING: You are not building the JDK sources.\n" \ |
duke@2 | 180 | " This will result in a development-only\n" \ |
duke@2 | 181 | " build of the JDK , lacking the jdk binaries.\n" \ |
duke@2 | 182 | "" >> $(WARNING_FILE) |
duke@2 | 183 | endif |
duke@2 | 184 | endif |
duke@2 | 185 | ifeq ($(DEPLOY_SRC_AVAILABLE), true) |
duke@2 | 186 | ifneq ($(BUILD_DEPLOY), true) |
duke@2 | 187 | @$(ECHO) "WARNING: You are not building the DEPLOY sources.\n" \ |
duke@2 | 188 | " This will result in a development-only\n" \ |
duke@2 | 189 | " build of the JDK, lacking the plugin and javaws binaries.\n" \ |
duke@2 | 190 | "" >> $(WARNING_FILE) |
duke@2 | 191 | endif |
duke@2 | 192 | endif |
duke@2 | 193 | ifeq ($(INSTALL_SRC_AVAILABLE), true) |
duke@2 | 194 | ifneq ($(BUILD_INSTALL), true) |
duke@2 | 195 | @$(ECHO) "WARNING: You are not building the INSTALL sources.\n" \ |
duke@2 | 196 | " This will result in a development-only\n" \ |
duke@2 | 197 | " build of the JDK, lacking the installation bundles\n" \ |
duke@2 | 198 | "" >> $(WARNING_FILE) |
duke@2 | 199 | endif |
duke@2 | 200 | endif |
duke@2 | 201 | ifeq ($(SPONSORS_SRC_AVAILABLE), true) |
duke@2 | 202 | ifneq ($(BUILD_SPONSORS), true) |
duke@2 | 203 | @$(ECHO) "WARNING: You are not building the SPONSORS sources.\n" \ |
duke@2 | 204 | "" >> $(WARNING_FILE) |
duke@2 | 205 | endif |
duke@2 | 206 | endif |
ohair@144 | 207 | ifeq ($(GENERATE_DOCS),false) |
ohair@144 | 208 | @$(ECHO) "WARNING: This build does not include running javadoc.\n" \ |
duke@2 | 209 | "" >> $(WARNING_FILE) |
duke@2 | 210 | endif |
duke@2 | 211 | ifdef NO_IMAGES |
duke@2 | 212 | @$(ECHO) "WARNING: Your build environment has the variable NO_IMAGES\n" \ |
duke@2 | 213 | " defined. This will result in a development-only\n" \ |
duke@2 | 214 | " build of the JDK, lacking the install images\n" \ |
duke@2 | 215 | " and bundles.\n" \ |
duke@2 | 216 | "" >> $(WARNING_FILE) |
duke@2 | 217 | endif |
duke@2 | 218 | ifdef DEV_ONLY |
duke@2 | 219 | @$(ECHO) "WARNING: Your build environment has the variable DEV_ONLY\n" \ |
duke@2 | 220 | " defined. This will result in a development-only\n" \ |
duke@2 | 221 | " build of the JDK, lacking the documentation\n" \ |
duke@2 | 222 | " build and installation bundles.\n" \ |
duke@2 | 223 | "" >> $(WARNING_FILE) |
duke@2 | 224 | endif |
duke@2 | 225 | |
duke@2 | 226 | ###################################################### |
duke@2 | 227 | # dump out the variable settings... |
duke@2 | 228 | ###################################################### |
duke@2 | 229 | ifneq ($(PLATFORM), windows) |
duke@2 | 230 | ifndef HOSTNAME |
duke@2 | 231 | HOSTNAME := $(shell hostname) |
duke@2 | 232 | endif |
duke@2 | 233 | endif |
duke@2 | 234 | settings:: |
duke@2 | 235 | @$(ECHO) "Build Machine Information:" >> $(MESSAGE_FILE) |
duke@2 | 236 | ifeq ($(PLATFORM), windows) |
duke@2 | 237 | @$(ECHO) " build machine = $(COMPUTERNAME)" >> $(MESSAGE_FILE) |
duke@2 | 238 | else |
duke@2 | 239 | @$(ECHO) " build machine = $(HOSTNAME)" >> $(MESSAGE_FILE) |
duke@2 | 240 | endif |
duke@2 | 241 | @$(ECHO) "" >> $(MESSAGE_FILE) |
duke@2 | 242 | @$(ECHO) "Build Directory Structure:" >> $(MESSAGE_FILE) |
duke@2 | 243 | @$(ECHO) " CWD = `$(PWD)`" >> $(MESSAGE_FILE) |
duke@2 | 244 | @$(ECHO) " TOPDIR = $(TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 245 | ifeq ($(LANGTOOLS_SRC_AVAILABLE), true) |
duke@2 | 246 | @$(ECHO) " LANGTOOLS_TOPDIR = $(LANGTOOLS_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 247 | endif |
duke@2 | 248 | ifeq ($(JAXP_SRC_AVAILABLE), true) |
duke@2 | 249 | @$(ECHO) " JAXP_TOPDIR = $(JAXP_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 250 | endif |
duke@2 | 251 | ifeq ($(JAXWS_SRC_AVAILABLE), true) |
duke@2 | 252 | @$(ECHO) " JAXWS_TOPDIR = $(JAXWS_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 253 | endif |
duke@2 | 254 | ifeq ($(CORBA_SRC_AVAILABLE), true) |
duke@2 | 255 | @$(ECHO) " CORBA_TOPDIR = $(CORBA_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 256 | endif |
duke@2 | 257 | ifeq ($(HOTSPOT_SRC_AVAILABLE), true) |
duke@2 | 258 | @$(ECHO) " HOTSPOT_TOPDIR = $(HOTSPOT_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 259 | endif |
duke@2 | 260 | ifeq ($(JDK_SRC_AVAILABLE), true) |
duke@2 | 261 | @$(ECHO) " JDK_TOPDIR = $(JDK_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 262 | endif |
duke@2 | 263 | ifeq ($(DEPLOY_SRC_AVAILABLE), true) |
duke@2 | 264 | @$(ECHO) " DEPLOY_TOPDIR = $(DEPLOY_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 265 | endif |
duke@2 | 266 | ifeq ($(INSTALL_SRC_AVAILABLE), true) |
duke@2 | 267 | @$(ECHO) " INSTALL_TOPDIR = $(INSTALL_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 268 | endif |
duke@2 | 269 | ifeq ($(SPONSORS_SRC_AVAILABLE), true) |
duke@2 | 270 | @$(ECHO) " SPONSORS_TOPDIR = $(SPONSORS_TOPDIR)" >> $(MESSAGE_FILE) |
duke@2 | 271 | endif |
duke@2 | 272 | @$(ECHO) "" >> $(MESSAGE_FILE) |
duke@2 | 273 | ifneq ($(SKIP_COMPARE_IMAGES), true) |
duke@2 | 274 | @$(ECHO) "External File/Binary Locations:" >> $(MESSAGE_FILE) |
duke@2 | 275 | @$(ECHO) " PREVIOUS_JRE_BUNDLE = $(PREVIOUS_JRE_BUNDLE) " >> $(MESSAGE_FILE) |
duke@2 | 276 | @$(ECHO) " PREVIOUS_JDK_BUNDLE = $(PREVIOUS_JDK_BUNDLE) " >> $(MESSAGE_FILE) |
duke@2 | 277 | @$(ECHO) "" >> $(MESSAGE_FILE) |
duke@2 | 278 | endif |
duke@2 | 279 | @$(ECHO) "Build Directives:" >> $(MESSAGE_FILE) |
duke@2 | 280 | ifeq ($(LANGTOOLS_SRC_AVAILABLE), true) |
duke@2 | 281 | @$(ECHO) " BUILD_LANGTOOLS = $(BUILD_LANGTOOLS) " >> $(MESSAGE_FILE) |
duke@2 | 282 | endif |
duke@2 | 283 | ifeq ($(JAXP_SRC_AVAILABLE), true) |
duke@2 | 284 | @$(ECHO) " BUILD_JAXP = $(BUILD_JAXP) " >> $(MESSAGE_FILE) |
duke@2 | 285 | endif |
duke@2 | 286 | ifeq ($(JAXWS_SRC_AVAILABLE), true) |
duke@2 | 287 | @$(ECHO) " BUILD_JAXWS = $(BUILD_JAXWS) " >> $(MESSAGE_FILE) |
duke@2 | 288 | endif |
duke@2 | 289 | ifeq ($(CORBA_SRC_AVAILABLE), true) |
duke@2 | 290 | @$(ECHO) " BUILD_CORBA = $(BUILD_CORBA) " >> $(MESSAGE_FILE) |
duke@2 | 291 | endif |
duke@2 | 292 | ifeq ($(HOTSPOT_SRC_AVAILABLE), true) |
duke@2 | 293 | @$(ECHO) " BUILD_HOTSPOT = $(BUILD_HOTSPOT) " >> $(MESSAGE_FILE) |
duke@2 | 294 | endif |
duke@2 | 295 | ifeq ($(JDK_SRC_AVAILABLE), true) |
duke@2 | 296 | @$(ECHO) " BUILD_JDK = $(BUILD_JDK) " >> $(MESSAGE_FILE) |
duke@2 | 297 | endif |
duke@2 | 298 | ifeq ($(DEPLOY_SRC_AVAILABLE), true) |
duke@2 | 299 | @$(ECHO) " BUILD_DEPLOY = $(BUILD_DEPLOY) " >> $(MESSAGE_FILE) |
duke@2 | 300 | endif |
duke@2 | 301 | ifeq ($(INSTALL_SRC_AVAILABLE), true) |
duke@2 | 302 | @$(ECHO) " BUILD_INSTALL = $(BUILD_INSTALL) " >> $(MESSAGE_FILE) |
duke@2 | 303 | endif |
duke@2 | 304 | ifeq ($(SPONSORS_SRC_AVAILABLE), true) |
duke@2 | 305 | @$(ECHO) " BUILD_SPONSORS = $(BUILD_SPONSORS) " >> $(MESSAGE_FILE) |
duke@2 | 306 | endif |
aph@80 | 307 | @$(ECHO) " DEBUG_CLASSFILES = $(DEBUG_CLASSFILES) " >> $(MESSAGE_FILE) |
aph@80 | 308 | @$(ECHO) " DEBUG_BINARIES = $(DEBUG_BINARIES) " >> $(MESSAGE_FILE) |
duke@2 | 309 | @$(ECHO) "" >> $(MESSAGE_FILE) |
duke@2 | 310 | |
duke@2 | 311 | .PHONY: sanity settings pre-sanity insane \ |
duke@2 | 312 | post-sanity post-sanity-hotspot post-sanity-jdk \ |
duke@2 | 313 | post-sanity-install post-sanity-deploy \ |
jjg@354 | 314 | environment |