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