2
|
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 |
# WARNING: This file is shared with other components.
|
|
32 |
#
|
|
33 |
|
|
34 |
ifndef JDK_MAKE_SHARED_DIR
|
|
35 |
JDK_MAKE_SHARED_DIR = $(JDK_TOPDIR)/make/common/shared
|
|
36 |
endif
|
|
37 |
|
|
38 |
ifndef CONTROL_TOPDIR
|
|
39 |
CONTROL_TOPDIR=$(TOPDIR)/control
|
|
40 |
endif
|
|
41 |
ifndef HOTSPOT_TOPDIR
|
|
42 |
HOTSPOT_TOPDIR=$(TOPDIR)/hotspot
|
|
43 |
endif
|
|
44 |
ifndef LANGTOOLS_TOPDIR
|
|
45 |
LANGTOOLS_TOPDIR=$(TOPDIR)/langtools
|
|
46 |
endif
|
|
47 |
ifndef CORBA_TOPDIR
|
|
48 |
CORBA_TOPDIR=$(TOPDIR)/corba
|
|
49 |
endif
|
|
50 |
ifndef JAXP_TOPDIR
|
|
51 |
JAXP_TOPDIR=$(TOPDIR)/jaxp
|
|
52 |
endif
|
|
53 |
ifndef JAXWS_TOPDIR
|
|
54 |
JAXWS_TOPDIR=$(TOPDIR)/jaxws
|
|
55 |
endif
|
|
56 |
ifndef JDK_TOPDIR
|
|
57 |
JDK_TOPDIR=$(TOPDIR)/jdk
|
|
58 |
endif
|
|
59 |
ifndef INSTALL_TOPDIR
|
|
60 |
INSTALL_TOPDIR=$(TOPDIR)/install
|
|
61 |
endif
|
|
62 |
ifndef SPONSORS_TOPDIR
|
|
63 |
SPONSORS_TOPDIR=$(TOPDIR)/sponsors
|
|
64 |
endif
|
|
65 |
ifndef DEPLOY_TOPDIR
|
|
66 |
DEPLOY_TOPDIR=$(TOPDIR)/deploy
|
|
67 |
endif
|
|
68 |
|
|
69 |
# Get shared platform settings
|
|
70 |
include $(JDK_MAKE_SHARED_DIR)/Platform.gmk
|
|
71 |
|
|
72 |
# Default output directory
|
|
73 |
_OUTPUTDIR=$(CONTROL_TOPDIR)/build/$(PLATFORM)-$(ARCH)
|
|
74 |
|
|
75 |
# Get platform specific settings
|
|
76 |
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
|
|
77 |
|
|
78 |
SRC_BUNDLEDIR = $(OUTPUTDIR)/source-bundles
|
|
79 |
ABS_SRC_BUNDLEDIR = $(ABS_OUTPUTDIR)/source-bundles
|
|
80 |
BIN_BUNDLEDIR = $(OUTPUTDIR)/bundles
|
|
81 |
ABS_BIN_BUNDLEDIR = $(ABS_OUTPUTDIR)/bundles
|
|
82 |
JRL_BUNDLEDIR = $(OUTPUTDIR)/java.net
|
|
83 |
ABS_JRL_BUNDLEDIR = $(ABS_OUTPUTDIR)/java.net
|
|
84 |
|
|
85 |
dummy := $(shell $(MKDIR) -p $(BIN_BUNDLEDIR))
|
|
86 |
dummy := $(shell $(MKDIR) -p $(SRC_BUNDLEDIR) )
|
|
87 |
dummy := $(shell $(MKDIR) -p $(JRL_BUNDLEDIR) )
|
|
88 |
|
|
89 |
TEMP_DIR = $(OUTPUTDIR)/tmp
|
|
90 |
ABS_TEMP_DIR = $(ABS_OUTPUTDIR)/tmp
|
|
91 |
|
|
92 |
dummy := $(shell $(MKDIR) -p $(TEMP_DIR))
|
|
93 |
|
|
94 |
# The class version we want for this jdk build
|
|
95 |
TARGET_CLASS_VERSION=5
|
|
96 |
|
|
97 |
# The MESSAGE, WARNING and ERROR files are used to store sanity check and
|
|
98 |
# source check messages, warnings and errors.
|
|
99 |
export ERROR_FILE := $(ABS_OUTPUTDIR)/sanityCheckErrors.txt
|
|
100 |
export WARNING_FILE := $(ABS_OUTPUTDIR)/sanityCheckWarnings.txt
|
|
101 |
export MESSAGE_FILE := $(ABS_OUTPUTDIR)/sanityCheckMessages.txt
|
|
102 |
|
|
103 |
# source bundle generation definitions
|
|
104 |
BUNDLE_DATE := $(shell $(DATE) '+%d_%b_%Y' | $(TR) "[A-Z]" "[a-z]")
|
|
105 |
ifdef ALT_BUNDLE_DATE
|
|
106 |
BUNDLE_DATE := $(ALT_BUNDLE_DATE)
|
|
107 |
endif
|
|
108 |
|
|
109 |
# If the update version contains non-numeric characters, we need
|
|
110 |
# to massage it into a numeric format. Unfortunately, the
|
|
111 |
# Windows VERSIONINFO resource that we stick in jvm.dll cannot
|
|
112 |
# handle non-numeric characters. We have to do this here because
|
|
113 |
# Hotspot (nmake) cannot handle calculations. So we use the
|
|
114 |
# following formula:
|
|
115 |
# COOKED_JDK_UPDATE_VERSION = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
|
|
116 |
#
|
|
117 |
# Here are some examples:
|
|
118 |
# 1.5.0 b01 -> 5,0,0,1
|
|
119 |
# 1.5.0_10 b01 -> 5,0,100,1
|
|
120 |
# 1.4.2 b01 -> 4,2,0,1
|
|
121 |
# 1.4.2_02 b01 -> 4,2,20,1
|
|
122 |
# 1.4.2_02a b01 -> 4,2,21,1
|
|
123 |
# 1.4.2_02b b01 -> 4,2,22,1
|
|
124 |
ifdef JDK_UPDATE_VERSION
|
|
125 |
VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345")
|
|
126 |
CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}')
|
|
127 |
CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}')
|
|
128 |
CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}')
|
|
129 |
ifeq ($(CHAR3),)
|
|
130 |
CHAR3 := 0
|
|
131 |
endif
|
|
132 |
ifeq ($(CHAR1), 0)
|
|
133 |
COOKED_JDK_UPDATE_VERSION := $(CHAR2)$(CHAR3)
|
|
134 |
else
|
|
135 |
COOKED_JDK_UPDATE_VERSION := $(CHAR1)$(CHAR2)$(CHAR3)
|
|
136 |
endif
|
|
137 |
endif
|
|
138 |
|
|
139 |
ifneq ($(JDK_BUILD_NUMBER),)
|
|
140 |
COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) \
|
|
141 |
| $(SED) -e 's/^b//' | $(SED) -e 's/^0//')
|
|
142 |
else
|
|
143 |
COOKED_BUILD_NUMBER = 0
|
|
144 |
endif
|
|
145 |
|