annotate make/Defs-internal.gmk @ 286:6db0e6f221bd

7009969: Remove SKIP_OPENJDK_BUILD from top Makefile Reviewed-by: robilad
author ohair
date Wed, 05 Jan 2011 17:24:58 -0800
parents 024a6755895b
children ce02c0d73d6a
rev   line source
duke@0 1 #
ohair@278 2 # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
ohair@180 7 # published by the Free Software Foundation. Oracle designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
ohair@180 9 # by Oracle in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
ohair@180 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@180 22 # or visit www.oracle.com if you need additional information or have any
ohair@180 23 # questions.
duke@0 24 #
duke@0 25
duke@0 26 #
duke@0 27 # Common variables used by all the Java makefiles. This file should
duke@0 28 # not contain rules.
duke@0 29 #
duke@0 30
ohair@126 31 # Indicate that we are visiting a separate repo or component
ohair@126 32 define MakeStart
ohair@126 33 $(PRINTF) "\n\n%s\n%s\n##### %-60.60s #####\n%s\n" \
ohair@126 34 "########################################################################" \
ohair@126 35 "########################################################################" \
ohair@126 36 "Entering $1 for target $2" \
ohair@126 37 "########################################################################"
ohair@126 38 endef
ohair@126 39
ohair@126 40 define MakeFinish
ohair@126 41 $(PRINTF) "%s\n##### %-60.60s #####\n%s\n%s\n\n" \
ohair@126 42 "########################################################################" \
ohair@126 43 "Leaving $1 for target $2" \
ohair@126 44 "########################################################################" \
ohair@126 45 "########################################################################"
ohair@126 46 endef
ohair@126 47
ohair@7 48 ifdef OPENJDK
ohair@7 49 ifneq ($(OPENJDK),true)
ohair@7 50 x:=$(error "OPENJDK (if defined) can only be set to true")
ohair@7 51 endif
ohair@7 52 endif
ohair@7 53
duke@0 54 # Define absolute paths to TOPDIRs
duke@0 55 ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
duke@0 56 ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
duke@0 57 ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
duke@0 58 ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
duke@0 59 ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
duke@0 60 ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
duke@0 61 ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
duke@0 62 ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
duke@0 63 ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
duke@0 64
duke@0 65 # Macro to return true or false if a file exists and is readable
duke@0 66 define MkExists
duke@0 67 $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
duke@0 68 endef
duke@0 69
duke@0 70 HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
duke@0 71 ifndef BUILD_HOTSPOT
duke@0 72 ifdef ALT_HOTSPOT_IMPORT_PATH
duke@0 73 BUILD_HOTSPOT := false
duke@0 74 else
duke@0 75 BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
duke@0 76 endif
duke@0 77 endif
duke@0 78
duke@0 79 LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile)
duke@0 80 ifndef BUILD_LANGTOOLS
duke@0 81 ifdef ALT_LANGTOOLS_DIST
duke@0 82 BUILD_LANGTOOLS := false
duke@0 83 else
duke@0 84 BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE)
duke@0 85 endif
duke@0 86 endif
duke@0 87
duke@0 88 CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile)
duke@0 89 ifndef BUILD_CORBA
duke@0 90 ifdef ALT_CORBA_DIST
duke@0 91 BUILD_CORBA := false
duke@0 92 else
duke@0 93 BUILD_CORBA := $(CORBA_SRC_AVAILABLE)
duke@0 94 endif
duke@0 95 endif
duke@0 96
duke@0 97 JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
duke@0 98 ifndef BUILD_JAXP
duke@0 99 ifdef ALT_JAXP_DIST
duke@0 100 BUILD_JAXP := false
duke@0 101 else
duke@0 102 BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
duke@0 103 endif
duke@0 104 endif
duke@0 105
duke@0 106 JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
duke@0 107 ifndef BUILD_JAXWS
duke@0 108 ifdef ALT_JAXWS_DIST
duke@0 109 BUILD_JAXWS := false
duke@0 110 else
duke@0 111 BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
duke@0 112 endif
duke@0 113 endif
duke@0 114
duke@0 115 JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
duke@0 116 ifndef BUILD_JDK
duke@0 117 BUILD_JDK := $(JDK_SRC_AVAILABLE)
duke@0 118 endif
duke@0 119 ifeq ($(JDK_SRC_AVAILABLE),true)
duke@0 120 JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
ohair@7 121 ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
ohair@7 122 OPENJDK = true
duke@0 123 endif
duke@0 124 endif
duke@0 125
duke@0 126 DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
duke@0 127 ifndef BUILD_DEPLOY
duke@0 128 BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
duke@0 129 endif
duke@0 130
duke@0 131 INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
duke@0 132 ifndef BUILD_INSTALL
duke@0 133 ifdef DEV_ONLY
duke@0 134 BUILD_INSTALL := false
duke@0 135 else
duke@0 136 BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE)
duke@0 137 endif
duke@0 138 endif
duke@0 139
duke@0 140 SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile)
duke@0 141 ifndef BUILD_SPONSORS
duke@0 142 ifdef DEV_ONLY
duke@0 143 BUILD_SPONSORS := false
duke@0 144 else
duke@0 145 BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE)
duke@0 146 endif
duke@0 147 endif
duke@0 148
duke@0 149
ohair@286 150 # Do we build the source bundles?
duke@0 151 BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk
wetmore@120 152 ifeq ($(SKIP_BUNDLES_BUILD), true)
wetmore@120 153 BUNDLE_RULES_AVAILABLE := false
wetmore@120 154 else
wetmore@120 155 BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
wetmore@120 156 endif
duke@0 157
duke@0 158 # Current things we do NOT build for OPENJDK
duke@0 159 ifdef OPENJDK
duke@0 160 BUILD_DEPLOY = false
duke@0 161 BUILD_INSTALL = false
duke@0 162 BUILD_SPONSORS = false
duke@0 163 BUNDLE_RULES_AVAILABLE := false
duke@0 164 # These could be over-ridden on the command line or in environment
duke@0 165 ifndef SKIP_FASTDEBUG_BUILD
duke@0 166 SKIP_FASTDEBUG_BUILD = true
duke@0 167 endif
duke@0 168 ifndef SKIP_DEBUG_BUILD
duke@0 169 SKIP_DEBUG_BUILD = true
duke@0 170 endif
duke@0 171 ifndef SKIP_COMPARE_IMAGES
duke@0 172 SKIP_COMPARE_IMAGES = true
duke@0 173 endif
duke@0 174 else
ohair@100 175
ohair@100 176 # Various non-OPENJDK reasons to NOT build the deploy repository
ohair@100 177 ifeq ($(ARCH), ia64)
ohair@100 178 BUILD_DEPLOY=false
ohair@100 179 endif
ohair@100 180 ifeq ($(ARCH), sparcv9)
ohair@100 181 BUILD_DEPLOY=false
ohair@100 182 endif
ohair@100 183 ifeq ($(ARCH), amd64)
ohair@100 184 ifeq ($(PLATFORM), solaris)
ohair@100 185 BUILD_DEPLOY=false
ohair@100 186 endif
ohair@100 187 endif
ohair@100 188
duke@0 189 endif
ohair@27 190 ifndef SKIP_PRODUCT_BUILD
ohair@27 191 SKIP_PRODUCT_BUILD = false
ohair@27 192 endif
duke@0 193
duke@0 194 # Many reasons why we would want to skip the comparison to previous jdk
duke@0 195 ifndef SKIP_COMPARE_IMAGES
duke@0 196 ifeq ($(BUILD_JDK), false)
duke@0 197 SKIP_COMPARE_IMAGES = true
duke@0 198 endif
duke@0 199 ifeq ($(BUILD_DEPLOY), false)
duke@0 200 SKIP_COMPARE_IMAGES = true
duke@0 201 endif
duke@0 202 ifeq ($(BUILD_INSTALL), false)
duke@0 203 SKIP_COMPARE_IMAGES = true
duke@0 204 endif
duke@0 205 ifdef DEV_ONLY
duke@0 206 SKIP_COMPARE_IMAGES = true
duke@0 207 endif
duke@0 208 endif
duke@0 209
duke@0 210 # Select defaults if these are not set to true or false
duke@0 211 ifndef SKIP_DEBUG_BUILD
duke@0 212 SKIP_DEBUG_BUILD=true
duke@0 213 endif
duke@0 214 ifndef SKIP_FASTDEBUG_BUILD
duke@0 215 SKIP_FASTDEBUG_BUILD=false
duke@0 216 endif
duke@0 217
ohair@142 218 # Select javadoc setting GENERATE_DOCS
ohair@142 219 ifndef NO_DOCS
ohair@142 220 # Default value (we want javadoc run)
ohair@142 221 GENERATE_DOCS=true
andrew@149 222 # No DOCS build when JDK_UPDATE_VERSION set on non-OPENJDK builds
andrew@149 223 ifndef OPENJDK
andrew@149 224 ifdef JDK_UPDATE_VERSION
andrew@149 225 GENERATE_DOCS=false
andrew@149 226 endif
ohair@142 227 endif
ohair@142 228 # If langtools, corba, jaxp, and jaxws are not being built,
ohair@142 229 # a full jdk javadoc is not possible
ohair@142 230 ifneq ($(BUILD_LANGTOOLS), true)
ohair@142 231 GENERATE_DOCS=false
ohair@142 232 endif
ohair@142 233 ifneq ($(BUILD_CORBA), true)
ohair@142 234 GENERATE_DOCS=false
ohair@142 235 endif
ohair@142 236 ifneq ($(BUILD_JAXP), true)
ohair@142 237 GENERATE_DOCS=false
ohair@142 238 endif
ohair@142 239 ifneq ($(BUILD_JAXWS), true)
ohair@142 240 GENERATE_DOCS=false
ohair@142 241 endif
ohair@142 242 ifeq ($(GENERATE_DOCS),false)
ohair@142 243 NO_DOCS=true
ohair@142 244 endif
ohair@142 245 else
ohair@142 246 GENERATE_DOCS=false
ohair@142 247 endif
ohair@142 248
duke@0 249 # Output directory for hotspot build
duke@0 250 HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
duke@0 251
duke@0 252 # If we are building components
duke@0 253 ifndef ALT_LANGTOOLS_DIST
duke@0 254 LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
duke@0 255 ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
duke@0 256 endif
duke@0 257 ifndef ALT_CORBA_DIST
duke@0 258 CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
duke@0 259 ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
duke@0 260 endif
duke@0 261 ifndef ALT_JAXP_DIST
duke@0 262 JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
duke@0 263 ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
duke@0 264 endif
duke@0 265 ifndef ALT_JAXWS_DIST
duke@0 266 JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
duke@0 267 ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
duke@0 268 endif
duke@0 269
duke@0 270 # Common make arguments (supplied to all component builds)
duke@0 271 COMMON_BUILD_ARGUMENTS = \
duke@0 272 JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
duke@0 273 JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
duke@0 274 EXTERNALSANITYCONTROL=true \
jjg@85 275 SOURCE_LANGUAGE_VERSION=$(SOURCE_LANGUAGE_VERSION) \
duke@0 276 TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
duke@0 277 MILESTONE=$(MILESTONE) \
duke@0 278 BUILD_NUMBER=$(BUILD_NUMBER) \
duke@0 279 JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
duke@0 280 FULL_VERSION=$(FULL_VERSION) \
duke@0 281 PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
duke@0 282 JDK_VERSION=$(JDK_VERSION) \
duke@0 283 JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
duke@0 284 JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
duke@0 285 JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
martin@15 286 JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) \
martin@15 287 PREVIOUS_MAJOR_VERSION=$(PREVIOUS_MAJOR_VERSION) \
martin@15 288 PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \
martin@15 289 PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION)
duke@0 290
duke@0 291 ifdef ARCH_DATA_MODEL
duke@0 292 COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
duke@0 293 endif
duke@0 294
duke@0 295 ifeq ($(DEBUG_NAME), debug)
duke@0 296 COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
duke@0 297 endif
duke@0 298
duke@0 299 ifeq ($(DEBUG_NAME), fastdebug)
duke@0 300 COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
duke@0 301 endif
duke@0 302
duke@0 303 ifdef COOKED_JDK_UPDATE_VERSION
duke@0 304 COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
duke@0 305 endif
duke@0 306
duke@0 307 ifdef COOKED_BUILD_NUMBER
duke@0 308 COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
duke@0 309 endif
duke@0 310
duke@0 311 ifdef ANT_HOME
duke@0 312 COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
duke@0 313 endif
duke@0 314