make/Defs-internal.gmk

Sun, 09 Mar 2008 13:11:51 -0700

author
ohair
date
Sun, 09 Mar 2008 13:11:51 -0700
changeset 6
d83470fdf495
parent 2
cfeea66a3fa8
child 8
f769c64f71ac
permissions
-rw-r--r--

6649270: Change by-default openjdk building in control/make/makefile to use open source tree
Summary: Change build rules to allow for openjdk builds by default when building the closed or production build.
Reviewed-by: xdono

duke@2 1 #
duke@2 2 # Copyright 1995-2007 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
duke@2 31 # Define absolute paths to TOPDIRs
duke@2 32 ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)")
duke@2 33 ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
duke@2 34 ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
duke@2 35 ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
duke@2 36 ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
duke@2 37 ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
duke@2 38 ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
duke@2 39 ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
duke@2 40 ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
duke@2 41 ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
duke@2 42
duke@2 43 # Macro to return true or false if a file exists and is readable
duke@2 44 define MkExists
duke@2 45 $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
duke@2 46 endef
duke@2 47
duke@2 48 HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
duke@2 49 ifndef BUILD_HOTSPOT
duke@2 50 ifdef ALT_HOTSPOT_IMPORT_PATH
duke@2 51 BUILD_HOTSPOT := false
duke@2 52 else
duke@2 53 BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
duke@2 54 endif
duke@2 55 endif
duke@2 56
duke@2 57 LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile)
duke@2 58 ifndef BUILD_LANGTOOLS
duke@2 59 ifdef ALT_LANGTOOLS_DIST
duke@2 60 BUILD_LANGTOOLS := false
duke@2 61 else
duke@2 62 BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE)
duke@2 63 endif
duke@2 64 endif
duke@2 65
duke@2 66 CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile)
duke@2 67 ifndef BUILD_CORBA
duke@2 68 ifdef ALT_CORBA_DIST
duke@2 69 BUILD_CORBA := false
duke@2 70 else
duke@2 71 BUILD_CORBA := $(CORBA_SRC_AVAILABLE)
duke@2 72 endif
duke@2 73 endif
duke@2 74
duke@2 75 JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
duke@2 76 ifndef BUILD_JAXP
duke@2 77 ifdef ALT_JAXP_DIST
duke@2 78 BUILD_JAXP := false
duke@2 79 else
duke@2 80 BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
duke@2 81 endif
duke@2 82 endif
duke@2 83
duke@2 84 JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
duke@2 85 ifndef BUILD_JAXWS
duke@2 86 ifdef ALT_JAXWS_DIST
duke@2 87 BUILD_JAXWS := false
duke@2 88 else
duke@2 89 BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
duke@2 90 endif
duke@2 91 endif
duke@2 92
duke@2 93 JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
duke@2 94 ifndef BUILD_JDK
duke@2 95 BUILD_JDK := $(JDK_SRC_AVAILABLE)
duke@2 96 endif
duke@2 97 ifeq ($(JDK_SRC_AVAILABLE),true)
duke@2 98 JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
duke@2 99 ifndef OPENJDK
duke@2 100 ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
duke@2 101 OPENJDK = true
duke@2 102 endif
duke@2 103 endif
duke@2 104 endif
duke@2 105
duke@2 106 DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
duke@2 107 ifndef BUILD_DEPLOY
duke@2 108 BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
duke@2 109 endif
duke@2 110
duke@2 111 INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
duke@2 112 ifndef BUILD_INSTALL
duke@2 113 ifdef DEV_ONLY
duke@2 114 BUILD_INSTALL := false
duke@2 115 else
duke@2 116 BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE)
duke@2 117 endif
duke@2 118 endif
duke@2 119
duke@2 120 SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile)
duke@2 121 ifndef BUILD_SPONSORS
duke@2 122 ifdef DEV_ONLY
duke@2 123 BUILD_SPONSORS := false
duke@2 124 else
duke@2 125 BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE)
duke@2 126 endif
duke@2 127 endif
duke@2 128
duke@2 129
duke@2 130 # Do we build the source and openjdk binary plug bundles?
duke@2 131 BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk
duke@2 132 BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
duke@2 133
duke@2 134 # Current things we do NOT build for OPENJDK
duke@2 135 ifdef OPENJDK
duke@2 136 BUILD_DEPLOY = false
duke@2 137 BUILD_INSTALL = false
duke@2 138 BUILD_SPONSORS = false
duke@2 139 BUNDLE_RULES_AVAILABLE := false
duke@2 140 # These could be over-ridden on the command line or in environment
duke@2 141 ifndef SKIP_FASTDEBUG_BUILD
duke@2 142 SKIP_FASTDEBUG_BUILD = true
duke@2 143 endif
duke@2 144 ifndef SKIP_DEBUG_BUILD
duke@2 145 SKIP_DEBUG_BUILD = true
duke@2 146 endif
duke@2 147 ifndef SKIP_COMPARE_IMAGES
duke@2 148 SKIP_COMPARE_IMAGES = true
duke@2 149 endif
duke@2 150 SKIP_OPENJDK_BUILD = true
duke@2 151 else
duke@2 152 ifndef SKIP_OPENJDK_BUILD
duke@2 153 SKIP_OPENJDK_BUILD = false
duke@2 154 endif
duke@2 155 endif
duke@2 156
duke@2 157 # Solaris 64 bit builds are not complete enough to ever do this
duke@2 158 ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64)
duke@2 159 SKIP_OPENJDK_BUILD = true
duke@2 160 endif
duke@2 161
duke@2 162 # Many reasons why we would want to skip the comparison to previous jdk
duke@2 163 ifndef SKIP_COMPARE_IMAGES
duke@2 164 ifeq ($(BUILD_JDK), false)
duke@2 165 SKIP_COMPARE_IMAGES = true
duke@2 166 endif
duke@2 167 ifeq ($(BUILD_DEPLOY), false)
duke@2 168 SKIP_COMPARE_IMAGES = true
duke@2 169 endif
duke@2 170 ifeq ($(BUILD_INSTALL), false)
duke@2 171 SKIP_COMPARE_IMAGES = true
duke@2 172 endif
duke@2 173 ifdef DEV_ONLY
duke@2 174 SKIP_COMPARE_IMAGES = true
duke@2 175 endif
duke@2 176 endif
duke@2 177
duke@2 178 # Select defaults if these are not set to true or false
duke@2 179 ifndef SKIP_DEBUG_BUILD
duke@2 180 SKIP_DEBUG_BUILD=true
duke@2 181 endif
duke@2 182 ifndef SKIP_FASTDEBUG_BUILD
duke@2 183 SKIP_FASTDEBUG_BUILD=false
duke@2 184 endif
duke@2 185
duke@2 186 # Output directory for hotspot build
duke@2 187 HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
duke@2 188
duke@2 189 # If we are building components
duke@2 190 ifndef ALT_LANGTOOLS_DIST
duke@2 191 LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
duke@2 192 ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
duke@2 193 endif
duke@2 194 ifndef ALT_CORBA_DIST
duke@2 195 CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
duke@2 196 ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
duke@2 197 endif
duke@2 198 ifndef ALT_JAXP_DIST
duke@2 199 JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
duke@2 200 ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
duke@2 201 endif
duke@2 202 ifndef ALT_JAXWS_DIST
duke@2 203 JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
duke@2 204 ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
duke@2 205 endif
duke@2 206
duke@2 207 # Common make arguments (supplied to all component builds)
duke@2 208 COMMON_BUILD_ARGUMENTS = \
duke@2 209 JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
duke@2 210 JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
duke@2 211 EXTERNALSANITYCONTROL=true \
duke@2 212 TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
duke@2 213 MILESTONE=$(MILESTONE) \
duke@2 214 BUILD_NUMBER=$(BUILD_NUMBER) \
duke@2 215 JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
duke@2 216 FULL_VERSION=$(FULL_VERSION) \
duke@2 217 PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
duke@2 218 JDK_VERSION=$(JDK_VERSION) \
duke@2 219 JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
duke@2 220 JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
duke@2 221 JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
duke@2 222 JDK_MICRO_VERSION=$(JDK_MICRO_VERSION)
duke@2 223
duke@2 224 ifdef ARCH_DATA_MODEL
duke@2 225 COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
duke@2 226 endif
duke@2 227
duke@2 228 ifeq ($(DEBUG_NAME), debug)
duke@2 229 COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
duke@2 230 endif
duke@2 231
duke@2 232 ifeq ($(DEBUG_NAME), fastdebug)
duke@2 233 COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
duke@2 234 endif
duke@2 235
duke@2 236 ifdef COOKED_JDK_UPDATE_VERSION
duke@2 237 COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
duke@2 238 endif
duke@2 239
duke@2 240 ifdef COOKED_BUILD_NUMBER
duke@2 241 COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
duke@2 242 endif
duke@2 243
duke@2 244 ifdef ANT_HOME
duke@2 245 COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
duke@2 246 endif
duke@2 247
duke@2 248 ifdef FINDBUGS_HOME
duke@2 249 COMMON_BUILD_ARGUMENTS += FINDBUGS_HOME="$(FINDBUGS_HOME)"
duke@2 250 endif
duke@2 251
duke@2 252

mercurial