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