Wed, 16 Dec 2009 23:38:55 -0800
Merge
duke@2 | 1 | # |
xdono@65 | 2 | # Copyright 1995-2009 Sun Microsystems, Inc. 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 |
duke@2 | 7 | # published by the Free Software Foundation. Sun designates this |
duke@2 | 8 | # particular file as subject to the "Classpath" exception as provided |
duke@2 | 9 | # by Sun 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 | # |
duke@2 | 21 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
duke@2 | 22 | # CA 95054 USA or visit www.sun.com if you need additional information or |
duke@2 | 23 | # have any questions. |
duke@2 | 24 | # |
duke@2 | 25 | |
duke@2 | 26 | # |
duke@2 | 27 | # Common variables used by all the Java makefiles. This file should |
duke@2 | 28 | # not contain rules. |
duke@2 | 29 | # |
duke@2 | 30 | |
ohair@128 | 31 | # Indicate that we are visiting a separate repo or component |
ohair@128 | 32 | define MakeStart |
ohair@128 | 33 | $(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n" \ |
ohair@128 | 34 | "########################################################################" \ |
ohair@128 | 35 | "########################################################################" \ |
ohair@128 | 36 | "Entering $1 for target $2" \ |
ohair@128 | 37 | "########################################################################" |
ohair@128 | 38 | endef |
ohair@128 | 39 | |
ohair@128 | 40 | define MakeFinish |
ohair@128 | 41 | $(PRINTF) "%s\n##### %-60.60s #####\n%s\n%s\n\n" \ |
ohair@128 | 42 | "########################################################################" \ |
ohair@128 | 43 | "Leaving $1 for target $2" \ |
ohair@128 | 44 | "########################################################################" \ |
ohair@128 | 45 | "########################################################################" |
ohair@128 | 46 | endef |
ohair@128 | 47 | |
ohair@9 | 48 | ifdef OPENJDK |
ohair@9 | 49 | ifneq ($(OPENJDK),true) |
ohair@9 | 50 | x:=$(error "OPENJDK (if defined) can only be set to true") |
ohair@9 | 51 | endif |
ohair@9 | 52 | endif |
ohair@9 | 53 | |
duke@2 | 54 | # Define absolute paths to TOPDIRs |
duke@2 | 55 | ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)") |
duke@2 | 56 | ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)") |
duke@2 | 57 | ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)") |
duke@2 | 58 | ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)") |
duke@2 | 59 | ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)") |
duke@2 | 60 | ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)") |
duke@2 | 61 | ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)") |
duke@2 | 62 | ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)") |
duke@2 | 63 | ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)") |
duke@2 | 64 | ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)") |
duke@2 | 65 | |
duke@2 | 66 | # Macro to return true or false if a file exists and is readable |
duke@2 | 67 | define MkExists |
duke@2 | 68 | $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi) |
duke@2 | 69 | endef |
duke@2 | 70 | |
duke@2 | 71 | HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile) |
duke@2 | 72 | ifndef BUILD_HOTSPOT |
duke@2 | 73 | ifdef ALT_HOTSPOT_IMPORT_PATH |
duke@2 | 74 | BUILD_HOTSPOT := false |
duke@2 | 75 | else |
duke@2 | 76 | BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE) |
duke@2 | 77 | endif |
duke@2 | 78 | endif |
duke@2 | 79 | |
duke@2 | 80 | LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile) |
duke@2 | 81 | ifndef BUILD_LANGTOOLS |
duke@2 | 82 | ifdef ALT_LANGTOOLS_DIST |
duke@2 | 83 | BUILD_LANGTOOLS := false |
duke@2 | 84 | else |
duke@2 | 85 | BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE) |
duke@2 | 86 | endif |
duke@2 | 87 | endif |
duke@2 | 88 | |
duke@2 | 89 | CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile) |
duke@2 | 90 | ifndef BUILD_CORBA |
duke@2 | 91 | ifdef ALT_CORBA_DIST |
duke@2 | 92 | BUILD_CORBA := false |
duke@2 | 93 | else |
duke@2 | 94 | BUILD_CORBA := $(CORBA_SRC_AVAILABLE) |
duke@2 | 95 | endif |
duke@2 | 96 | endif |
duke@2 | 97 | |
duke@2 | 98 | JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile) |
duke@2 | 99 | ifndef BUILD_JAXP |
duke@2 | 100 | ifdef ALT_JAXP_DIST |
duke@2 | 101 | BUILD_JAXP := false |
duke@2 | 102 | else |
duke@2 | 103 | BUILD_JAXP := $(JAXP_SRC_AVAILABLE) |
duke@2 | 104 | endif |
duke@2 | 105 | endif |
duke@2 | 106 | |
duke@2 | 107 | JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile) |
duke@2 | 108 | ifndef BUILD_JAXWS |
duke@2 | 109 | ifdef ALT_JAXWS_DIST |
duke@2 | 110 | BUILD_JAXWS := false |
duke@2 | 111 | else |
duke@2 | 112 | BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE) |
duke@2 | 113 | endif |
duke@2 | 114 | endif |
duke@2 | 115 | |
duke@2 | 116 | JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile) |
duke@2 | 117 | ifndef BUILD_JDK |
duke@2 | 118 | BUILD_JDK := $(JDK_SRC_AVAILABLE) |
duke@2 | 119 | endif |
duke@2 | 120 | ifeq ($(JDK_SRC_AVAILABLE),true) |
duke@2 | 121 | JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed) |
ohair@9 | 122 | ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false) |
ohair@9 | 123 | OPENJDK = true |
duke@2 | 124 | endif |
duke@2 | 125 | endif |
duke@2 | 126 | |
duke@2 | 127 | DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile) |
duke@2 | 128 | ifndef BUILD_DEPLOY |
duke@2 | 129 | BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE) |
duke@2 | 130 | endif |
duke@2 | 131 | |
duke@2 | 132 | INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile) |
duke@2 | 133 | ifndef BUILD_INSTALL |
duke@2 | 134 | ifdef DEV_ONLY |
duke@2 | 135 | BUILD_INSTALL := false |
duke@2 | 136 | else |
duke@2 | 137 | BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE) |
duke@2 | 138 | endif |
duke@2 | 139 | endif |
duke@2 | 140 | |
duke@2 | 141 | SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile) |
duke@2 | 142 | ifndef BUILD_SPONSORS |
duke@2 | 143 | ifdef DEV_ONLY |
duke@2 | 144 | BUILD_SPONSORS := false |
duke@2 | 145 | else |
duke@2 | 146 | BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE) |
duke@2 | 147 | endif |
duke@2 | 148 | endif |
duke@2 | 149 | |
duke@2 | 150 | |
duke@2 | 151 | # Do we build the source and openjdk binary plug bundles? |
duke@2 | 152 | BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk |
wetmore@122 | 153 | ifeq ($(SKIP_BUNDLES_BUILD), true) |
wetmore@122 | 154 | BUNDLE_RULES_AVAILABLE := false |
wetmore@122 | 155 | else |
wetmore@122 | 156 | BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES)) |
wetmore@122 | 157 | endif |
duke@2 | 158 | |
duke@2 | 159 | # Current things we do NOT build for OPENJDK |
duke@2 | 160 | ifdef OPENJDK |
duke@2 | 161 | BUILD_DEPLOY = false |
duke@2 | 162 | BUILD_INSTALL = false |
duke@2 | 163 | BUILD_SPONSORS = false |
duke@2 | 164 | BUNDLE_RULES_AVAILABLE := false |
duke@2 | 165 | # These could be over-ridden on the command line or in environment |
duke@2 | 166 | ifndef SKIP_FASTDEBUG_BUILD |
duke@2 | 167 | SKIP_FASTDEBUG_BUILD = true |
duke@2 | 168 | endif |
duke@2 | 169 | ifndef SKIP_DEBUG_BUILD |
duke@2 | 170 | SKIP_DEBUG_BUILD = true |
duke@2 | 171 | endif |
duke@2 | 172 | ifndef SKIP_COMPARE_IMAGES |
duke@2 | 173 | SKIP_COMPARE_IMAGES = true |
duke@2 | 174 | endif |
duke@2 | 175 | SKIP_OPENJDK_BUILD = true |
duke@2 | 176 | else |
ohair@102 | 177 | |
ohair@102 | 178 | # Various non-OPENJDK reasons to NOT build the deploy repository |
ohair@102 | 179 | ifeq ($(ARCH), ia64) |
ohair@102 | 180 | BUILD_DEPLOY=false |
ohair@102 | 181 | endif |
ohair@102 | 182 | ifeq ($(ARCH), sparcv9) |
ohair@102 | 183 | BUILD_DEPLOY=false |
ohair@102 | 184 | endif |
ohair@102 | 185 | ifeq ($(ARCH), amd64) |
ohair@102 | 186 | ifeq ($(PLATFORM), solaris) |
ohair@102 | 187 | BUILD_DEPLOY=false |
ohair@102 | 188 | endif |
ohair@102 | 189 | endif |
ohair@102 | 190 | |
duke@2 | 191 | ifndef SKIP_OPENJDK_BUILD |
ohair@8 | 192 | #SKIP_OPENJDK_BUILD = false |
ohair@8 | 193 | # Until 6675289 is resolved, or this feature is removed. |
ohair@8 | 194 | SKIP_OPENJDK_BUILD = true |
duke@2 | 195 | endif |
duke@2 | 196 | endif |
ohair@29 | 197 | ifndef SKIP_PRODUCT_BUILD |
ohair@29 | 198 | SKIP_PRODUCT_BUILD = false |
ohair@29 | 199 | endif |
duke@2 | 200 | |
duke@2 | 201 | # Solaris 64 bit builds are not complete enough to ever do this |
duke@2 | 202 | ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) |
duke@2 | 203 | SKIP_OPENJDK_BUILD = true |
duke@2 | 204 | endif |
duke@2 | 205 | |
duke@2 | 206 | # Many reasons why we would want to skip the comparison to previous jdk |
duke@2 | 207 | ifndef SKIP_COMPARE_IMAGES |
duke@2 | 208 | ifeq ($(BUILD_JDK), false) |
duke@2 | 209 | SKIP_COMPARE_IMAGES = true |
duke@2 | 210 | endif |
duke@2 | 211 | ifeq ($(BUILD_DEPLOY), false) |
duke@2 | 212 | SKIP_COMPARE_IMAGES = true |
duke@2 | 213 | endif |
duke@2 | 214 | ifeq ($(BUILD_INSTALL), false) |
duke@2 | 215 | SKIP_COMPARE_IMAGES = true |
duke@2 | 216 | endif |
duke@2 | 217 | ifdef DEV_ONLY |
duke@2 | 218 | SKIP_COMPARE_IMAGES = true |
duke@2 | 219 | endif |
duke@2 | 220 | endif |
duke@2 | 221 | |
duke@2 | 222 | # Select defaults if these are not set to true or false |
duke@2 | 223 | ifndef SKIP_DEBUG_BUILD |
duke@2 | 224 | SKIP_DEBUG_BUILD=true |
duke@2 | 225 | endif |
duke@2 | 226 | ifndef SKIP_FASTDEBUG_BUILD |
duke@2 | 227 | SKIP_FASTDEBUG_BUILD=false |
duke@2 | 228 | endif |
duke@2 | 229 | |
ohair@144 | 230 | # Select javadoc setting GENERATE_DOCS |
ohair@144 | 231 | ifndef NO_DOCS |
ohair@144 | 232 | # Default value (we want javadoc run) |
ohair@144 | 233 | GENERATE_DOCS=true |
ohair@144 | 234 | # No DOCS build when JDK_UPDATE_VERSION set |
ohair@144 | 235 | ifdef JDK_UPDATE_VERSION |
ohair@144 | 236 | GENERATE_DOCS=false |
ohair@144 | 237 | endif |
ohair@144 | 238 | # If langtools, corba, jaxp, and jaxws are not being built, |
ohair@144 | 239 | # a full jdk javadoc is not possible |
ohair@144 | 240 | ifneq ($(BUILD_LANGTOOLS), true) |
ohair@144 | 241 | GENERATE_DOCS=false |
ohair@144 | 242 | endif |
ohair@144 | 243 | ifneq ($(BUILD_CORBA), true) |
ohair@144 | 244 | GENERATE_DOCS=false |
ohair@144 | 245 | endif |
ohair@144 | 246 | ifneq ($(BUILD_JAXP), true) |
ohair@144 | 247 | GENERATE_DOCS=false |
ohair@144 | 248 | endif |
ohair@144 | 249 | ifneq ($(BUILD_JAXWS), true) |
ohair@144 | 250 | GENERATE_DOCS=false |
ohair@144 | 251 | endif |
ohair@144 | 252 | ifeq ($(GENERATE_DOCS),false) |
ohair@144 | 253 | NO_DOCS=true |
ohair@144 | 254 | endif |
ohair@144 | 255 | else |
ohair@144 | 256 | GENERATE_DOCS=false |
ohair@144 | 257 | endif |
ohair@144 | 258 | |
duke@2 | 259 | # Output directory for hotspot build |
duke@2 | 260 | HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot |
duke@2 | 261 | |
duke@2 | 262 | # If we are building components |
duke@2 | 263 | ifndef ALT_LANGTOOLS_DIST |
duke@2 | 264 | LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools |
duke@2 | 265 | ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist |
duke@2 | 266 | endif |
duke@2 | 267 | ifndef ALT_CORBA_DIST |
duke@2 | 268 | CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba |
duke@2 | 269 | ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist |
duke@2 | 270 | endif |
duke@2 | 271 | ifndef ALT_JAXP_DIST |
duke@2 | 272 | JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp |
duke@2 | 273 | ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist |
duke@2 | 274 | endif |
duke@2 | 275 | ifndef ALT_JAXWS_DIST |
duke@2 | 276 | JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws |
duke@2 | 277 | ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist |
duke@2 | 278 | endif |
duke@2 | 279 | |
duke@2 | 280 | # Common make arguments (supplied to all component builds) |
duke@2 | 281 | COMMON_BUILD_ARGUMENTS = \ |
duke@2 | 282 | JDK_TOPDIR=$(ABS_JDK_TOPDIR) \ |
duke@2 | 283 | JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \ |
duke@2 | 284 | EXTERNALSANITYCONTROL=true \ |
jjg@87 | 285 | SOURCE_LANGUAGE_VERSION=$(SOURCE_LANGUAGE_VERSION) \ |
duke@2 | 286 | TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \ |
duke@2 | 287 | MILESTONE=$(MILESTONE) \ |
duke@2 | 288 | BUILD_NUMBER=$(BUILD_NUMBER) \ |
duke@2 | 289 | JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \ |
duke@2 | 290 | FULL_VERSION=$(FULL_VERSION) \ |
duke@2 | 291 | PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \ |
duke@2 | 292 | JDK_VERSION=$(JDK_VERSION) \ |
duke@2 | 293 | JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \ |
duke@2 | 294 | JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \ |
duke@2 | 295 | JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \ |
martin@17 | 296 | JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \ |
martin@17 | 297 | PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \ |
martin@17 | 298 | PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \ |
martin@17 | 299 | PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION) |
duke@2 | 300 | |
duke@2 | 301 | ifdef ARCH_DATA_MODEL |
duke@2 | 302 | COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) |
duke@2 | 303 | endif |
duke@2 | 304 | |
duke@2 | 305 | ifeq ($(DEBUG_NAME), debug) |
duke@2 | 306 | COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true |
duke@2 | 307 | endif |
duke@2 | 308 | |
duke@2 | 309 | ifeq ($(DEBUG_NAME), fastdebug) |
duke@2 | 310 | COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true |
duke@2 | 311 | endif |
duke@2 | 312 | |
duke@2 | 313 | ifdef COOKED_JDK_UPDATE_VERSION |
duke@2 | 314 | COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION) |
duke@2 | 315 | endif |
duke@2 | 316 | |
duke@2 | 317 | ifdef COOKED_BUILD_NUMBER |
duke@2 | 318 | COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER) |
duke@2 | 319 | endif |
duke@2 | 320 | |
duke@2 | 321 | ifdef ANT_HOME |
duke@2 | 322 | COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)" |
duke@2 | 323 | endif |
duke@2 | 324 |