duke@2: # duke@2: # Copyright 1995-2007 Sun Microsystems, Inc. All Rights Reserved. duke@2: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@2: # duke@2: # This code is free software; you can redistribute it and/or modify it duke@2: # under the terms of the GNU General Public License version 2 only, as duke@2: # published by the Free Software Foundation. Sun designates this duke@2: # particular file as subject to the "Classpath" exception as provided duke@2: # by Sun in the LICENSE file that accompanied this code. duke@2: # duke@2: # This code is distributed in the hope that it will be useful, but WITHOUT duke@2: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@2: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@2: # version 2 for more details (a copy is included in the LICENSE file that duke@2: # accompanied this code). duke@2: # duke@2: # You should have received a copy of the GNU General Public License version duke@2: # 2 along with this work; if not, write to the Free Software Foundation, duke@2: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@2: # duke@2: # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, duke@2: # CA 95054 USA or visit www.sun.com if you need additional information or duke@2: # have any questions. duke@2: # duke@2: duke@2: # duke@2: # Common variables used by all the Java makefiles. This file should duke@2: # not contain rules. duke@2: # duke@2: duke@2: # Define absolute paths to TOPDIRs duke@2: ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)") duke@2: ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)") duke@2: ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)") duke@2: ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)") duke@2: ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)") duke@2: ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)") duke@2: ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)") duke@2: ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)") duke@2: ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)") duke@2: ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)") duke@2: duke@2: # Macro to return true or false if a file exists and is readable duke@2: define MkExists duke@2: $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi) duke@2: endef duke@2: duke@2: HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_HOTSPOT duke@2: ifdef ALT_HOTSPOT_IMPORT_PATH duke@2: BUILD_HOTSPOT := false duke@2: else duke@2: BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE) duke@2: endif duke@2: endif duke@2: duke@2: LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_LANGTOOLS duke@2: ifdef ALT_LANGTOOLS_DIST duke@2: BUILD_LANGTOOLS := false duke@2: else duke@2: BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE) duke@2: endif duke@2: endif duke@2: duke@2: CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_CORBA duke@2: ifdef ALT_CORBA_DIST duke@2: BUILD_CORBA := false duke@2: else duke@2: BUILD_CORBA := $(CORBA_SRC_AVAILABLE) duke@2: endif duke@2: endif duke@2: duke@2: JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_JAXP duke@2: ifdef ALT_JAXP_DIST duke@2: BUILD_JAXP := false duke@2: else duke@2: BUILD_JAXP := $(JAXP_SRC_AVAILABLE) duke@2: endif duke@2: endif duke@2: duke@2: JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_JAXWS duke@2: ifdef ALT_JAXWS_DIST duke@2: BUILD_JAXWS := false duke@2: else duke@2: BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE) duke@2: endif duke@2: endif duke@2: duke@2: JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_JDK duke@2: BUILD_JDK := $(JDK_SRC_AVAILABLE) duke@2: endif duke@2: ifeq ($(JDK_SRC_AVAILABLE),true) duke@2: JDK_CLOSED_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/src/closed) duke@2: ifndef OPENJDK duke@2: ifeq ($(JDK_CLOSED_SRC_AVAILABLE),false) duke@2: OPENJDK = true duke@2: endif duke@2: endif duke@2: endif duke@2: duke@2: DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_DEPLOY duke@2: BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE) duke@2: endif duke@2: duke@2: INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_INSTALL duke@2: ifdef DEV_ONLY duke@2: BUILD_INSTALL := false duke@2: else duke@2: BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE) duke@2: endif duke@2: endif duke@2: duke@2: SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile) duke@2: ifndef BUILD_SPONSORS duke@2: ifdef DEV_ONLY duke@2: BUILD_SPONSORS := false duke@2: else duke@2: BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE) duke@2: endif duke@2: endif duke@2: duke@2: duke@2: # Do we build the source and openjdk binary plug bundles? duke@2: BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk duke@2: BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES)) duke@2: duke@2: # Current things we do NOT build for OPENJDK duke@2: ifdef OPENJDK duke@2: BUILD_DEPLOY = false duke@2: BUILD_INSTALL = false duke@2: BUILD_SPONSORS = false duke@2: BUNDLE_RULES_AVAILABLE := false duke@2: # These could be over-ridden on the command line or in environment duke@2: ifndef SKIP_FASTDEBUG_BUILD duke@2: SKIP_FASTDEBUG_BUILD = true duke@2: endif duke@2: ifndef SKIP_DEBUG_BUILD duke@2: SKIP_DEBUG_BUILD = true duke@2: endif duke@2: ifndef SKIP_COMPARE_IMAGES duke@2: SKIP_COMPARE_IMAGES = true duke@2: endif duke@2: SKIP_OPENJDK_BUILD = true duke@2: else duke@2: ifndef SKIP_OPENJDK_BUILD duke@2: SKIP_OPENJDK_BUILD = false duke@2: # FIXUP: until freetype fixed on linux and solaris rmi build fixed duke@2: SKIP_OPENJDK_BUILD = true duke@2: endif duke@2: endif duke@2: duke@2: # Solaris 64 bit builds are not complete enough to ever do this duke@2: ifeq ($(PLATFORM)$(ARCH_DATA_MODEL),solaris64) duke@2: SKIP_OPENJDK_BUILD = true duke@2: endif duke@2: duke@2: # Many reasons why we would want to skip the comparison to previous jdk duke@2: ifndef SKIP_COMPARE_IMAGES duke@2: ifeq ($(BUILD_JDK), false) duke@2: SKIP_COMPARE_IMAGES = true duke@2: endif duke@2: ifeq ($(BUILD_DEPLOY), false) duke@2: SKIP_COMPARE_IMAGES = true duke@2: endif duke@2: ifeq ($(BUILD_INSTALL), false) duke@2: SKIP_COMPARE_IMAGES = true duke@2: endif duke@2: ifdef DEV_ONLY duke@2: SKIP_COMPARE_IMAGES = true duke@2: endif duke@2: endif duke@2: duke@2: # Select defaults if these are not set to true or false duke@2: ifndef SKIP_DEBUG_BUILD duke@2: SKIP_DEBUG_BUILD=true duke@2: endif duke@2: ifndef SKIP_FASTDEBUG_BUILD duke@2: SKIP_FASTDEBUG_BUILD=false duke@2: endif duke@2: duke@2: # Output directory for hotspot build duke@2: HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot duke@2: duke@2: # If we are building components duke@2: ifndef ALT_LANGTOOLS_DIST duke@2: LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools duke@2: ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist duke@2: endif duke@2: ifndef ALT_CORBA_DIST duke@2: CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba duke@2: ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist duke@2: endif duke@2: ifndef ALT_JAXP_DIST duke@2: JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp duke@2: ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist duke@2: endif duke@2: ifndef ALT_JAXWS_DIST duke@2: JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws duke@2: ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist duke@2: endif duke@2: duke@2: # Common make arguments (supplied to all component builds) duke@2: COMMON_BUILD_ARGUMENTS = \ duke@2: JDK_TOPDIR=$(ABS_JDK_TOPDIR) \ duke@2: JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \ duke@2: EXTERNALSANITYCONTROL=true \ duke@2: TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \ duke@2: MILESTONE=$(MILESTONE) \ duke@2: BUILD_NUMBER=$(BUILD_NUMBER) \ duke@2: JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \ duke@2: FULL_VERSION=$(FULL_VERSION) \ duke@2: PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \ duke@2: JDK_VERSION=$(JDK_VERSION) \ duke@2: JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \ duke@2: JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \ duke@2: JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \ duke@2: JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) duke@2: duke@2: ifdef ARCH_DATA_MODEL duke@2: COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) duke@2: endif duke@2: duke@2: ifeq ($(DEBUG_NAME), debug) duke@2: COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true duke@2: endif duke@2: duke@2: ifeq ($(DEBUG_NAME), fastdebug) duke@2: COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true duke@2: endif duke@2: duke@2: ifdef COOKED_JDK_UPDATE_VERSION duke@2: COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION) duke@2: endif duke@2: duke@2: ifdef COOKED_BUILD_NUMBER duke@2: COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER) duke@2: endif duke@2: duke@2: ifdef ANT_HOME duke@2: COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)" duke@2: endif duke@2: duke@2: ifdef FINDBUGS_HOME duke@2: COMMON_BUILD_ARGUMENTS += FINDBUGS_HOME="$(FINDBUGS_HOME)" duke@2: endif duke@2: duke@2: