| 1 | #
|
|---|
| 2 | # Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved.
|
|---|
| 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|---|
| 4 | #
|
|---|
| 5 | # This code is free software; you can redistribute it and/or modify it
|
|---|
| 6 | # under the terms of the GNU General Public License version 2 only, as
|
|---|
| 7 | # published by the Free Software Foundation. Sun designates this
|
|---|
| 8 | # particular file as subject to the "Classpath" exception as provided
|
|---|
| 9 | # by Sun in the LICENSE file that accompanied this code.
|
|---|
| 10 | #
|
|---|
| 11 | # This code is distributed in the hope that it will be useful, but WITHOUT
|
|---|
| 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|---|
| 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|---|
| 14 | # version 2 for more details (a copy is included in the LICENSE file that
|
|---|
| 15 | # accompanied this code).
|
|---|
| 16 | #
|
|---|
| 17 | # You should have received a copy of the GNU General Public License version
|
|---|
| 18 | # 2 along with this work; if not, write to the Free Software Foundation,
|
|---|
| 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|---|
| 20 | #
|
|---|
| 21 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|---|
| 22 | # CA 95054 USA or visit www.sun.com if you need additional information or
|
|---|
| 23 | # have any questions.
|
|---|
| 24 | #
|
|---|
| 25 |
|
|---|
| 26 | #
|
|---|
| 27 | # Common variables used by all the Java makefiles. This file should
|
|---|
| 28 | # not contain rules.
|
|---|
| 29 | #
|
|---|
| 30 |
|
|---|
| 31 | # Define absolute paths to TOPDIRs
|
|---|
| 32 | ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)")
|
|---|
| 33 | ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
|
|---|
| 34 | ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
|
|---|
| 35 | ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
|
|---|
| 36 | ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
|
|---|
| 37 | ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
|
|---|
| 38 | ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
|
|---|
| 39 | ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
|
|---|
| 40 | ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
|
|---|
| 41 | ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
|
|---|
| 42 |
|
|---|
| 43 | # Macro to return true or false if a file exists and is readable
|
|---|
| 44 | define MkExists
|
|---|
| 45 | $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
|
|---|
| 46 | endef
|
|---|
| 47 |
|
|---|
| 48 | HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
|
|---|
| 49 | ifndef BUILD_HOTSPOT
|
|---|
| 50 | ifdef ALT_HOTSPOT_IMPORT_PATH
|
|---|
| 51 | BUILD_HOTSPOT := false
|
|---|
| 52 | else
|
|---|
| 53 | BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
|
|---|
| 54 | endif
|
|---|
| 55 | endif
|
|---|
| 56 |
|
|---|
| 57 | LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile)
|
|---|
| 58 | ifndef BUILD_LANGTOOLS
|
|---|
| 59 | ifdef ALT_LANGTOOLS_DIST
|
|---|
| 60 | BUILD_LANGTOOLS := false
|
|---|
| 61 | else
|
|---|
| 62 | BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE)
|
|---|
| 63 | endif
|
|---|
| 64 | endif
|
|---|
| 65 |
|
|---|
| 66 | CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile)
|
|---|
| 67 | ifndef BUILD_CORBA
|
|---|
| 68 | ifdef ALT_CORBA_DIST
|
|---|
| 69 | BUILD_CORBA := false
|
|---|
| 70 | else
|
|---|
| 71 | BUILD_CORBA := $(CORBA_SRC_AVAILABLE)
|
|---|
| 72 | endif
|
|---|
| 73 | endif
|
|---|
| 74 |
|
|---|
| 75 | JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
|
|---|
| 76 | ifndef BUILD_JAXP
|
|---|
| 77 | ifdef ALT_JAXP_DIST
|
|---|
| 78 | BUILD_JAXP := false
|
|---|
| 79 | else
|
|---|
| 80 | BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
|
|---|
| 81 | endif
|
|---|
| 82 | endif
|
|---|
| 83 |
|
|---|
| 84 | JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
|
|---|
| 85 | ifndef BUILD_JAXWS
|
|---|
| 86 | ifdef ALT_JAXWS_DIST
|
|---|
| 87 | BUILD_JAXWS := false
|
|---|
| 88 | else
|
|---|
| 89 | BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
|
|---|
| 90 | endif
|
|---|
| 91 | endif
|
|---|
| 92 |
|
|---|
| 93 | JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
|
|---|
| 94 | ifndef BUILD_JDK
|
|---|
| 95 | BUILD_JDK := $(JDK_SRC_AVAILABLE)
|
|---|
| 96 | endif
|
|---|
| 97 | ifeq ($(JDK_SRC_AVAILABLE),true)
|
|---|
| 98 | JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed)
|
|---|
| 99 | ifndef OPENJDK
|
|---|
| 100 | ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false)
|
|---|
| 101 | OPENJDK = true
|
|---|
| 102 | endif
|
|---|
| 103 | endif
|
|---|
| 104 | endif
|
|---|
| 105 |
|
|---|
| 106 | DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
|
|---|
| 107 | ifndef BUILD_DEPLOY
|
|---|
| 108 | BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
|
|---|
| 109 | endif
|
|---|
| 110 |
|
|---|
| 111 | INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
|
|---|
| 112 | ifndef BUILD_INSTALL
|
|---|
| 113 | ifdef DEV_ONLY
|
|---|
| 114 | BUILD_INSTALL := false
|
|---|
| 115 | else
|
|---|
| 116 | BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE)
|
|---|
| 117 | endif
|
|---|
| 118 | endif
|
|---|
| 119 |
|
|---|
| 120 | SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile)
|
|---|
| 121 | ifndef BUILD_SPONSORS
|
|---|
| 122 | ifdef DEV_ONLY
|
|---|
| 123 | BUILD_SPONSORS := false
|
|---|
| 124 | else
|
|---|
| 125 | BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE)
|
|---|
| 126 | endif
|
|---|
| 127 | endif
|
|---|
| 128 |
|
|---|
| 129 |
|
|---|
| 130 | # Do we build the source and openjdk binary plug bundles?
|
|---|
| 131 | BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk
|
|---|
| 132 | BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
|
|---|
| 133 |
|
|---|
| 134 | # Current things we do NOT build for OPENJDK
|
|---|
| 135 | ifdef OPENJDK
|
|---|
| 136 | BUILD_DEPLOY = false
|
|---|
| 137 | BUILD_INSTALL = false
|
|---|
| 138 | BUILD_SPONSORS = false
|
|---|
| 139 | BUNDLE_RULES_AVAILABLE := false
|
|---|
| 140 | # These could be over-ridden on the command line or in environment
|
|---|
| 141 | ifndef SKIP_FASTDEBUG_BUILD
|
|---|
| 142 | SKIP_FASTDEBUG_BUILD = true
|
|---|
| 143 | endif
|
|---|
| 144 | ifndef SKIP_DEBUG_BUILD
|
|---|
| 145 | SKIP_DEBUG_BUILD = true
|
|---|
| 146 | endif
|
|---|
| 147 | ifndef SKIP_COMPARE_IMAGES
|
|---|
| 148 | SKIP_COMPARE_IMAGES = true
|
|---|
| 149 | endif
|
|---|
| 150 | SKIP_OPENJDK_BUILD = true
|
|---|
| 151 | else
|
|---|
| 152 | ifndef SKIP_OPENJDK_BUILD
|
|---|
| 153 | SKIP_OPENJDK_BUILD = false
|
|---|
| 154 | endif
|
|---|
| 155 | endif
|
|---|
| 156 |
|
|---|
| 157 | # Many reasons why we would want to skip the comparison to previous jdk
|
|---|
| 158 | ifndef SKIP_COMPARE_IMAGES
|
|---|
| 159 | ifeq ($(BUILD_JDK), false)
|
|---|
| 160 | SKIP_COMPARE_IMAGES = true
|
|---|
| 161 | endif
|
|---|
| 162 | ifeq ($(BUILD_DEPLOY), false)
|
|---|
| 163 | SKIP_COMPARE_IMAGES = true
|
|---|
| 164 | endif
|
|---|
| 165 | ifeq ($(BUILD_INSTALL), false)
|
|---|
| 166 | SKIP_COMPARE_IMAGES = true
|
|---|
| 167 | endif
|
|---|
| 168 | ifdef DEV_ONLY
|
|---|
| 169 | SKIP_COMPARE_IMAGES = true
|
|---|
| 170 | endif
|
|---|
| 171 | endif
|
|---|
| 172 |
|
|---|
| 173 | # Select defaults if these are not set to true or false
|
|---|
| 174 | ifndef SKIP_DEBUG_BUILD
|
|---|
| 175 | SKIP_DEBUG_BUILD=true
|
|---|
| 176 | endif
|
|---|
| 177 | ifndef SKIP_FASTDEBUG_BUILD
|
|---|
| 178 | SKIP_FASTDEBUG_BUILD=false
|
|---|
| 179 | endif
|
|---|
| 180 |
|
|---|
| 181 | # Output directory for hotspot build
|
|---|
| 182 | HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
|
|---|
| 183 |
|
|---|
| 184 | # If we are building components
|
|---|
| 185 | ifndef ALT_LANGTOOLS_DIST
|
|---|
| 186 | LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
|
|---|
| 187 | ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
|
|---|
| 188 | endif
|
|---|
| 189 | ifndef ALT_CORBA_DIST
|
|---|
| 190 | CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
|
|---|
| 191 | ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
|
|---|
| 192 | endif
|
|---|
| 193 | ifndef ALT_JAXP_DIST
|
|---|
| 194 | JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
|
|---|
| 195 | ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
|
|---|
| 196 | endif
|
|---|
| 197 | ifndef ALT_JAXWS_DIST
|
|---|
| 198 | JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
|
|---|
| 199 | ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
|
|---|
| 200 | endif
|
|---|
| 201 |
|
|---|
| 202 | # Common make arguments (supplied to all component builds)
|
|---|
| 203 | COMMON_BUILD_ARGUMENTS = \
|
|---|
| 204 | JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
|
|---|
| 205 | JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
|
|---|
| 206 | EXTERNALSANITYCONTROL=true \
|
|---|
| 207 | TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
|
|---|
| 208 | MILESTONE=$(MILESTONE) \
|
|---|
| 209 | BUILD_NUMBER=$(BUILD_NUMBER) \
|
|---|
| 210 | JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
|
|---|
| 211 | FULL_VERSION=$(FULL_VERSION) \
|
|---|
| 212 | PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
|
|---|
| 213 | JDK_VERSION=$(JDK_VERSION) \
|
|---|
| 214 | JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
|
|---|
| 215 | JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
|
|---|
| 216 | JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
|
|---|
| 217 | JDK_MICRO_VERSION=$(JDK_MICRO_VERSION)
|
|---|
| 218 |
|
|---|
| 219 | ifdef ARCH_DATA_MODEL
|
|---|
| 220 | COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
|
|---|
| 221 | endif
|
|---|
| 222 |
|
|---|
| 223 | ifeq ($(DEBUG_NAME), debug)
|
|---|
| 224 | COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
|
|---|
| 225 | endif
|
|---|
| 226 |
|
|---|
| 227 | ifeq ($(DEBUG_NAME), fastdebug)
|
|---|
| 228 | COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
|
|---|
| 229 | endif
|
|---|
| 230 |
|
|---|
| 231 | ifdef COOKED_JDK_UPDATE_VERSION
|
|---|
| 232 | COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
|
|---|
| 233 | endif
|
|---|
| 234 |
|
|---|
| 235 | ifdef COOKED_BUILD_NUMBER
|
|---|
| 236 | COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
|
|---|
| 237 | endif
|
|---|
| 238 |
|
|---|
| 239 | ifdef ANT_HOME
|
|---|
| 240 | COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
|
|---|
| 241 | endif
|
|---|
| 242 |
|
|---|
| 243 | ifdef FINDBUGS_HOME
|
|---|
| 244 | COMMON_BUILD_ARGUMENTS += FINDBUGS_HOME="$(FINDBUGS_HOME)"
|
|---|
| 245 | endif
|
|---|
| 246 |
|
|---|
| 247 |
|
|---|