source: trunk/openjdk/make/Defs-internal.gmk@ 137

Last change on this file since 137 was 2, checked in by dmik, 15 years ago

Imported OpenJDK 6 b19 sources from Oracle.

File size: 7.0 KB
Line 
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
32ABS_CONTROL_TOPDIR:=$(call OptFullPath,"$(CONTROL_TOPDIR)")
33ABS_LANGTOOLS_TOPDIR:=$(call OptFullPath,"$(LANGTOOLS_TOPDIR)")
34ABS_CORBA_TOPDIR:=$(call OptFullPath,"$(CORBA_TOPDIR)")
35ABS_JAXP_TOPDIR:=$(call OptFullPath,"$(JAXP_TOPDIR)")
36ABS_JAXWS_TOPDIR:=$(call OptFullPath,"$(JAXWS_TOPDIR)")
37ABS_JDK_TOPDIR:=$(call OptFullPath,"$(JDK_TOPDIR)")
38ABS_HOTSPOT_TOPDIR:=$(call OptFullPath,"$(HOTSPOT_TOPDIR)")
39ABS_INSTALL_TOPDIR:=$(call OptFullPath,"$(INSTALL_TOPDIR)")
40ABS_SPONSORS_TOPDIR:=$(call OptFullPath,"$(SPONSORS_TOPDIR)")
41ABS_DEPLOY_TOPDIR:=$(call OptFullPath,"$(DEPLOY_TOPDIR)")
42
43# Macro to return true or false if a file exists and is readable
44define MkExists
45$(shell if [ -r $1 ]; then $(ECHO) true; else $(ECHO) false; fi)
46endef
47
48HOTSPOT_SRC_AVAILABLE := $(call MkExists,$(HOTSPOT_TOPDIR)/make/Makefile)
49ifndef BUILD_HOTSPOT
50 ifdef ALT_HOTSPOT_IMPORT_PATH
51 BUILD_HOTSPOT := false
52 else
53 BUILD_HOTSPOT := $(HOTSPOT_SRC_AVAILABLE)
54 endif
55endif
56
57LANGTOOLS_SRC_AVAILABLE := $(call MkExists,$(LANGTOOLS_TOPDIR)/make/Makefile)
58ifndef BUILD_LANGTOOLS
59 ifdef ALT_LANGTOOLS_DIST
60 BUILD_LANGTOOLS := false
61 else
62 BUILD_LANGTOOLS := $(LANGTOOLS_SRC_AVAILABLE)
63 endif
64endif
65
66CORBA_SRC_AVAILABLE := $(call MkExists,$(CORBA_TOPDIR)/make/Makefile)
67ifndef BUILD_CORBA
68 ifdef ALT_CORBA_DIST
69 BUILD_CORBA := false
70 else
71 BUILD_CORBA := $(CORBA_SRC_AVAILABLE)
72 endif
73endif
74
75JAXP_SRC_AVAILABLE := $(call MkExists,$(JAXP_TOPDIR)/make/Makefile)
76ifndef BUILD_JAXP
77 ifdef ALT_JAXP_DIST
78 BUILD_JAXP := false
79 else
80 BUILD_JAXP := $(JAXP_SRC_AVAILABLE)
81 endif
82endif
83
84JAXWS_SRC_AVAILABLE := $(call MkExists,$(JAXWS_TOPDIR)/make/Makefile)
85ifndef BUILD_JAXWS
86 ifdef ALT_JAXWS_DIST
87 BUILD_JAXWS := false
88 else
89 BUILD_JAXWS := $(JAXWS_SRC_AVAILABLE)
90 endif
91endif
92
93JDK_SRC_AVAILABLE := $(call MkExists,$(JDK_TOPDIR)/make/Makefile)
94ifndef BUILD_JDK
95 BUILD_JDK := $(JDK_SRC_AVAILABLE)
96endif
97ifeq ($(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
104endif
105
106DEPLOY_SRC_AVAILABLE := $(call MkExists,$(DEPLOY_TOPDIR)/make/Makefile)
107ifndef BUILD_DEPLOY
108 BUILD_DEPLOY := $(DEPLOY_SRC_AVAILABLE)
109endif
110
111INSTALL_SRC_AVAILABLE := $(call MkExists,$(INSTALL_TOPDIR)/make/Makefile)
112ifndef BUILD_INSTALL
113 ifdef DEV_ONLY
114 BUILD_INSTALL := false
115 else
116 BUILD_INSTALL := $(INSTALL_SRC_AVAILABLE)
117 endif
118endif
119
120SPONSORS_SRC_AVAILABLE := $(call MkExists,$(SPONSORS_TOPDIR)/make/Makefile)
121ifndef BUILD_SPONSORS
122 ifdef DEV_ONLY
123 BUILD_SPONSORS := false
124 else
125 BUILD_SPONSORS := $(SPONSORS_SRC_AVAILABLE)
126 endif
127endif
128
129
130# Do we build the source and openjdk binary plug bundles?
131BUNDLE_RULES = $(JDK_TOPDIR)/make/closed/bundles.gmk
132BUNDLE_RULES_AVAILABLE := $(call MkExists,$(BUNDLE_RULES))
133
134# Current things we do NOT build for OPENJDK
135ifdef 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
151else
152 ifndef SKIP_OPENJDK_BUILD
153 SKIP_OPENJDK_BUILD = false
154 endif
155endif
156
157# Many reasons why we would want to skip the comparison to previous jdk
158ifndef 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
171endif
172
173# Select defaults if these are not set to true or false
174ifndef SKIP_DEBUG_BUILD
175 SKIP_DEBUG_BUILD=true
176endif
177ifndef SKIP_FASTDEBUG_BUILD
178 SKIP_FASTDEBUG_BUILD=false
179endif
180
181# Output directory for hotspot build
182HOTSPOT_DIR = $(ABS_OUTPUTDIR)/hotspot
183
184# If we are building components
185ifndef ALT_LANGTOOLS_DIST
186 LANGTOOLS_OUTPUTDIR = $(ABS_OUTPUTDIR)/langtools
187 ABS_LANGTOOLS_DIST = $(LANGTOOLS_OUTPUTDIR)/dist
188endif
189ifndef ALT_CORBA_DIST
190 CORBA_OUTPUTDIR = $(ABS_OUTPUTDIR)/corba
191 ABS_CORBA_DIST = $(CORBA_OUTPUTDIR)/dist
192endif
193ifndef ALT_JAXP_DIST
194 JAXP_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxp
195 ABS_JAXP_DIST = $(JAXP_OUTPUTDIR)/dist
196endif
197ifndef ALT_JAXWS_DIST
198 JAXWS_OUTPUTDIR = $(ABS_OUTPUTDIR)/jaxws
199 ABS_JAXWS_DIST = $(JAXWS_OUTPUTDIR)/dist
200endif
201
202# Common make arguments (supplied to all component builds)
203COMMON_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
219ifdef ARCH_DATA_MODEL
220 COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
221endif
222
223ifeq ($(DEBUG_NAME), debug)
224 COMMON_BUILD_ARGUMENTS += VARIANT=DBG DEBUG_CLASSFILES=true
225endif
226
227ifeq ($(DEBUG_NAME), fastdebug)
228 COMMON_BUILD_ARGUMENTS += VARIANT=DBG FASTDEBUG=true DEBUG_CLASSFILES=true
229endif
230
231ifdef COOKED_JDK_UPDATE_VERSION
232 COMMON_BUILD_ARGUMENTS += COOKED_JDK_UPDATE_VERSION=$(COOKED_JDK_UPDATE_VERSION)
233endif
234
235ifdef COOKED_BUILD_NUMBER
236 COMMON_BUILD_ARGUMENTS += COOKED_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
237endif
238
239ifdef ANT_HOME
240 COMMON_BUILD_ARGUMENTS += ANT_HOME="$(ANT_HOME)"
241endif
242
243ifdef FINDBUGS_HOME
244 COMMON_BUILD_ARGUMENTS += FINDBUGS_HOME="$(FINDBUGS_HOME)"
245endif
246
247
Note: See TracBrowser for help on using the repository browser.