| 1 | #
|
|---|
| 2 | # Copyright (c) 1995, 2010, Oracle and/or its affiliates. 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. Oracle designates this
|
|---|
| 8 | # particular file as subject to the "Classpath" exception as provided
|
|---|
| 9 | # by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|---|
| 22 | # or visit www.oracle.com if you need additional information or have any
|
|---|
| 23 | # questions.
|
|---|
| 24 | #
|
|---|
| 25 |
|
|---|
| 26 | #
|
|---|
| 27 | # Common variables used by all the Java makefiles. This file should
|
|---|
| 28 | # not contain rules.
|
|---|
| 29 | #
|
|---|
| 30 |
|
|---|
| 31 | # Always true
|
|---|
| 32 | OPENJDK=true
|
|---|
| 33 |
|
|---|
| 34 | # Define absolute paths to TOPDIRs
|
|---|
| 35 | ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
|
|---|
| 36 | ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
|
|---|
| 37 | ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
|
|---|
| 38 | ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
|
|---|
| 39 | ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
|
|---|
| 40 | ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
|
|---|
| 41 |
|
|---|
| 42 | # Macro to return true or false if a file exists and is readable
|
|---|
| 43 | define MkExists
|
|---|
| 44 | $(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
|
|---|
| 45 | endef
|
|---|
| 46 |
|
|---|
| 47 | HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
|
|---|
| 48 | ifndef BUILD_HOTSPOT
|
|---|
| 49 | ifdef ALT_HOTSPOT_IMPORT_PATH
|
|---|
| 50 | BUILD_HOTSPOT := false
|
|---|
| 51 | else
|
|---|
| 52 | BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
|
|---|
| 53 | endif
|
|---|
| 54 | endif
|
|---|
| 55 |
|
|---|
| 56 | LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile)
|
|---|
| 57 | ifndef BUILD_LANGTOOLS
|
|---|
| 58 | ifdef ALT_LANGTOOLS_DIST
|
|---|
| 59 | BUILD_LANGTOOLS := false
|
|---|
| 60 | else
|
|---|
| 61 | BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE)
|
|---|
| 62 | endif
|
|---|
| 63 | endif
|
|---|
| 64 |
|
|---|
| 65 | CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile)
|
|---|
| 66 | ifndef BUILD_CORBA
|
|---|
| 67 | ifdef ALT_CORBA_DIST
|
|---|
| 68 | BUILD_CORBA := false
|
|---|
| 69 | else
|
|---|
| 70 | BUILD_CORBA := $(CORBA_SRC_AVAILABLE)
|
|---|
| 71 | endif
|
|---|
| 72 | endif
|
|---|
| 73 |
|
|---|
| 74 | JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
|
|---|
| 75 | ifndef BUILD_JAXP
|
|---|
| 76 | ifdef ALT_JAXP_DIST
|
|---|
| 77 | BUILD_JAXP := false
|
|---|
| 78 | else
|
|---|
| 79 | BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
|
|---|
| 80 | endif
|
|---|
| 81 | endif
|
|---|
| 82 |
|
|---|
| 83 | JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
|
|---|
| 84 | ifndef BUILD_JAXWS
|
|---|
| 85 | ifdef ALT_JAXWS_DIST
|
|---|
| 86 | BUILD_JAXWS := false
|
|---|
| 87 | else
|
|---|
| 88 | BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
|
|---|
| 89 | endif
|
|---|
| 90 | endif
|
|---|
| 91 |
|
|---|
| 92 | JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
|
|---|
| 93 | ifndef BUILD_JDK
|
|---|
| 94 | BUILD_JDK := $(JDK_SRC_AVAILABLE)
|
|---|
| 95 | endif
|
|---|
| 96 |
|
|---|
| 97 | # These could be over-ridden on the command line or in environment
|
|---|
| 98 | ifndef SKIP_PRODUCT_BUILD
|
|---|
| 99 | SKIP_PRODUCT_BUILD = false
|
|---|
| 100 | endif
|
|---|
| 101 | ifndef SKIP_FASTDEBUG_BUILD
|
|---|
| 102 | SKIP_FASTDEBUG_BUILD = true
|
|---|
| 103 | endif
|
|---|
| 104 | ifndef SKIP_DEBUG_BUILD
|
|---|
| 105 | SKIP_DEBUG_BUILD = true
|
|---|
| 106 | endif
|
|---|
| 107 | ifndef SKIP_COMPARE_IMAGES
|
|---|
| 108 | SKIP_COMPARE_IMAGES = true
|
|---|
| 109 | endif
|
|---|
| 110 |
|
|---|
| 111 | # Many reasons why we would want to skip the comparison to previous jdk
|
|---|
| 112 | ifndef SKIP_COMPARE_IMAGES
|
|---|
| 113 | ifeq ($(BUILD_JDK), false)
|
|---|
| 114 | SKIP_COMPARE_IMAGES = true
|
|---|
| 115 | endif
|
|---|
| 116 | ifdef DEV_ONLY
|
|---|
| 117 | SKIP_COMPARE_IMAGES = true
|
|---|
| 118 | endif
|
|---|
| 119 | endif
|
|---|
| 120 |
|
|---|
| 121 | # Output directory for hotspot build
|
|---|
| 122 | HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
|
|---|
| 123 |
|
|---|
| 124 | # If we are building components
|
|---|
| 125 | ifndef ALT_LANGTOOLS_DIST
|
|---|
| 126 | LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
|
|---|
| 127 | ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
|
|---|
| 128 | endif
|
|---|
| 129 | ifndef ALT_CORBA_DIST
|
|---|
| 130 | CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
|
|---|
| 131 | ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
|
|---|
| 132 | endif
|
|---|
| 133 | ifndef ALT_JAXP_DIST
|
|---|
| 134 | JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
|
|---|
| 135 | ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
|
|---|
| 136 | endif
|
|---|
| 137 | ifndef ALT_JAXWS_DIST
|
|---|
| 138 | JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
|
|---|
| 139 | ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
|
|---|
| 140 | endif
|
|---|
| 141 |
|
|---|
| 142 | # Common make arguments (supplied to all component builds)
|
|---|
| 143 | COMMON_BUILD_ARGUMENTS = \
|
|---|
| 144 | JDK_TOPDIR=$(ABS_JDK_TOPDIR) \
|
|---|
| 145 | JDK_MAKE_SHARED_DIR=$(ABS_JDK_TOPDIR)/make/common/shared \
|
|---|
| 146 | EXTERNALSANITYCONTROL=true \
|
|---|
| 147 | TARGET_CLASS_VERSION=$(TARGET_CLASS_VERSION) \
|
|---|
| 148 | MILESTONE=$(MILESTONE) \
|
|---|
| 149 | BUILD_NUMBER=$(BUILD_NUMBER) \
|
|---|
| 150 | JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) \
|
|---|
| 151 | FULL_VERSION=$(FULL_VERSION) \
|
|---|
| 152 | PREVIOUS_JDK_VERSION=$(PREVIOUS_JDK_VERSION) \
|
|---|
| 153 | JDK_VERSION=$(JDK_VERSION) \
|
|---|
| 154 | JDK_MKTG_VERSION=$(JDK_MKTG_VERSION) \
|
|---|
| 155 | JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) \
|
|---|
| 156 | JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) \
|
|---|
| 157 | JDK_MICRO_VERSION=$(JDK_MICRO_VERSION)
|
|---|
| 158 |
|
|---|
| 159 | ifdef ARCH_DATA_MODEL
|
|---|
| 160 | COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
|
|---|
| 161 | endif
|
|---|
| 162 |
|
|---|
| 163 | ifeq ($(DEBUG_NAME), debug)
|
|---|
| 164 | COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
|
|---|
| 165 | endif
|
|---|
| 166 |
|
|---|
| 167 | ifeq ($(DEBUG_NAME), fastdebug)
|
|---|
| 168 | COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
|
|---|
| 169 | endif
|
|---|
| 170 |
|
|---|
| 171 | ifdef COOKED_JDK_UPDATE_VERSION
|
|---|
| 172 | COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
|
|---|
| 173 | endif
|
|---|
| 174 |
|
|---|
| 175 | ifdef COOKED_BUILD_NUMBER
|
|---|
| 176 | COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
|
|---|
| 177 | endif
|
|---|
| 178 |
|
|---|
| 179 | ifdef ANT_HOME
|
|---|
| 180 | COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
|
|---|
| 181 | endif
|
|---|
| 182 |
|
|---|