author | naoto |
Tue, 21 Aug 2012 11:00:30 -0700 | |
changeset 13583 | dc0017b1a452 |
parent 13164 | 72c5d01a857d |
child 13497 | 2c09fb7cdf7f |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
2 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
26 |
include $(SPEC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
27 |
include MakeBase.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
include JavaCompilation.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
29 |
include Setup.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
30 |
|
12892 | 31 |
default: images |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
33 |
include Tools.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
34 |
|
12892 | 35 |
images: jre-image jdk-image |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
36 |
|
13164 | 37 |
ifeq ($(OPENJDK_TARGET_OS),solaris) |
12892 | 38 |
define install-file |
39 |
$(MKDIR) -p $(@D) |
|
13164 | 40 |
$(CP) -f -r -P '$<' '$(@D)' |
41 |
endef |
|
42 |
else ifeq ($(OPENJDK_TARGET_OS),macosx) |
|
43 |
define install-file |
|
44 |
$(MKDIR) -p $(@D) |
|
45 |
$(CP) -fpRP '$<' '$@' |
|
12892 | 46 |
endef |
47 |
else |
|
48 |
define install-file |
|
49 |
$(MKDIR) -p $(@D) |
|
13164 | 50 |
$(CP) -fP '$<' '$@' |
12892 | 51 |
endef |
52 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
53 |
|
12892 | 54 |
################################################################################ |
55 |
# |
|
56 |
# JRE and JDK build rules |
|
57 |
# |
|
58 |
################################################################################ |
|
59 |
||
60 |
################################################################################ |
|
61 |
# /bin dir |
|
62 |
||
63 |
$(JRE_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/% |
|
64 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
65 |
$(install-file) |
|
66 |
||
67 |
$(JDK_IMAGE_DIR)/bin/%: $(JDK_OUTPUTDIR)/bin/% |
|
68 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
69 |
$(install-file) |
|
70 |
||
71 |
$(JDK_IMAGE_DIR)/jre/bin/%: $(JDK_OUTPUTDIR)/bin/% |
|
72 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
73 |
$(install-file) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
74 |
|
13164 | 75 |
NOT_JRE_BIN_FILES := \ |
12892 | 76 |
appletviewer$(EXE_SUFFIX) \ |
77 |
extcheck$(EXE_SUFFIX) \ |
|
78 |
idlj$(EXE_SUFFIX) \ |
|
79 |
jar$(EXE_SUFFIX) \ |
|
80 |
jarsigner$(EXE_SUFFIX) \ |
|
81 |
java-rmi.cgi \ |
|
82 |
javac$(EXE_SUFFIX) \ |
|
83 |
javadoc$(EXE_SUFFIX) \ |
|
84 |
javah$(EXE_SUFFIX) \ |
|
85 |
javap$(EXE_SUFFIX) \ |
|
86 |
jcmd$(EXE_SUFFIX) \ |
|
87 |
jdb$(EXE_SUFFIX) \ |
|
88 |
jps$(EXE_SUFFIX) \ |
|
89 |
jrunscript$(EXE_SUFFIX) \ |
|
90 |
jstat$(EXE_SUFFIX) \ |
|
91 |
jstatd$(EXE_SUFFIX) \ |
|
92 |
jstack$(EXE_SUFFIX) \ |
|
93 |
packagebean$(SCRIPT_SUFFIX) \ |
|
94 |
rmic$(EXE_SUFFIX) \ |
|
95 |
serialver$(EXE_SUFFIX) \ |
|
96 |
unregbean$(EXE_SUFFIX) \ |
|
97 |
jconsole$(EXE_SUFFIX) \ |
|
98 |
jinfo$(EXE_SUFFIX) \ |
|
99 |
jmap$(EXE_SUFFIX) \ |
|
100 |
native2ascii$(EXE_SUFFIX) \ |
|
101 |
xjc$(EXE_SUFFIX) \ |
|
102 |
wsgen$(EXE_SUFFIX) \ |
|
103 |
wsimport$(EXE_SUFFIX) \ |
|
104 |
schemagen$(EXE_SUFFIX) \ |
|
105 |
jsadebugd$(EXE_SUFFIX) \ |
|
106 |
jhat$(EXE_SUFFIX) |
|
107 |
||
108 |
WINDOWS_JDK_BIN_FILES = \ |
|
109 |
$(EXE_SUFFIX) \ |
|
110 |
$(LIB_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \ |
|
111 |
$(MSVCRNN_DLL) |
|
112 |
||
113 |
# Find all files in bin dir |
|
114 |
ALL_BIN_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f) |
|
13164 | 115 |
|
116 |
# For unknown reason the debuginfo files for binaries are not put into images |
|
117 |
# e.g filter them out |
|
118 |
ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST)) |
|
119 |
||
120 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
12892 | 121 |
JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST)) |
122 |
else |
|
123 |
JDK_BIN_LIST := $(ALL_BIN_LIST) |
|
124 |
endif |
|
125 |
JRE_BIN_LIST := $(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST)) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
126 |
|
12892 | 127 |
JRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_IMAGE_DIR)/%, $(JRE_BIN_LIST)) |
128 |
JDK_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/%, $(JDK_BIN_LIST)) |
|
129 |
JDKJRE_BIN_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/jre/%, $(JRE_BIN_LIST)) |
|
130 |
||
131 |
################################################################################ |
|
132 |
# /lib dir |
|
133 |
||
134 |
$(JRE_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/% |
|
135 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
136 |
$(install-file) |
|
137 |
||
138 |
$(JDK_IMAGE_DIR)/lib/%: $(JDK_OUTPUTDIR)/lib/% |
|
139 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
140 |
$(install-file) |
|
141 |
||
142 |
$(JDK_IMAGE_DIR)/jre/lib/%: $(JDK_OUTPUTDIR)/lib/% |
|
143 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
144 |
$(install-file) |
|
145 |
||
146 |
JDKJRE_LIB_FILES := \ |
|
147 |
$(LIB_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
|
148 |
$(SALIB_NAME) |
|
149 |
||
150 |
NOT_JRE_LIB_FILES := \ |
|
151 |
tools.jar \ |
|
152 |
jconsole.jar \ |
|
153 |
sa-jdi.jar \ |
|
154 |
dt.jar \ |
|
155 |
orb.idl \ |
|
156 |
ir.idl \ |
|
157 |
ct.sym |
|
158 |
||
159 |
JDK_LIB_FILES := $(NOT_JRE_LIB_FILES) |
|
13164 | 160 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
12892 | 161 |
JDK_LIB_FILES += jexec |
162 |
endif |
|
163 |
||
164 |
ALL_LIB_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib \( -type f -o -type l \) ! -name "_the*") |
|
165 |
JRE_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),$(ALL_LIB_LIST)) |
|
166 |
JDKJRE_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_LIB_LIST)) |
|
167 |
JDK_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_LIB_LIST)) |
|
168 |
||
169 |
JRE_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JRE_IMAGE_DIR)/%,$(JRE_LIB_LIST)) |
|
170 |
JDK_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/%,$(JDK_LIB_LIST)) |
|
171 |
JDKJRE_LIB_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/%,$(JDK_IMAGE_DIR)/jre/%,$(JDKJRE_LIB_LIST)) |
|
172 |
||
173 |
# CTE plugin security change require new empty directory lib/applet |
|
174 |
$(JRE_IMAGE_DIR)/lib/applet: |
|
175 |
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
176 |
$(MKDIR) -p $@ |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
177 |
|
12892 | 178 |
$(JDK_IMAGE_DIR)/jre/lib/applet: |
179 |
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
180 |
$(MKDIR) -p $@ |
|
181 |
||
182 |
$(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS) |
|
183 |
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
184 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
|
185 |
||
186 |
$(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS) |
|
187 |
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
188 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
|
189 |
||
190 |
$(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS) |
|
191 |
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
192 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
193 |
|
12892 | 194 |
$(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JRE_LIB_TARGETS) |
195 |
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
196 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
|
197 |
||
198 |
################################################################################ |
|
199 |
# /man dir |
|
200 |
||
201 |
JRE_MAN_PAGES := \ |
|
202 |
java.1 \ |
|
203 |
keytool.1 \ |
|
204 |
orbd.1 \ |
|
205 |
pack200.1 \ |
|
206 |
policytool.1 \ |
|
207 |
rmid.1 \ |
|
208 |
rmiregistry.1 \ |
|
209 |
servertool.1 \ |
|
210 |
tnameserv.1 \ |
|
211 |
unpack200.1 |
|
212 |
||
213 |
ifndef OPENJDK |
|
214 |
JRE_MAN_PAGES += javaws.1 |
|
215 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
216 |
|
12892 | 217 |
JDK_MAN_PAGES = \ |
218 |
$(JRE_MAN_PAGES) \ |
|
219 |
appletviewer.1 \ |
|
220 |
extcheck.1 \ |
|
221 |
idlj.1 \ |
|
222 |
jar.1 \ |
|
223 |
jarsigner.1 \ |
|
224 |
javac.1 \ |
|
225 |
javadoc.1 \ |
|
226 |
javah.1 \ |
|
227 |
javap.1 \ |
|
228 |
jconsole.1 \ |
|
229 |
jcmd.1 \ |
|
230 |
jdb.1 \ |
|
231 |
jhat.1 \ |
|
232 |
jinfo.1 \ |
|
233 |
jmap.1 \ |
|
234 |
jps.1 \ |
|
235 |
jrunscript.1 \ |
|
236 |
jsadebugd.1 \ |
|
237 |
jstack.1 \ |
|
238 |
jstat.1 \ |
|
239 |
jstatd.1 \ |
|
240 |
jvisualvm.1 \ |
|
241 |
native2ascii.1 \ |
|
242 |
rmic.1 \ |
|
243 |
schemagen.1 \ |
|
244 |
serialver.1 \ |
|
245 |
wsgen.1 \ |
|
246 |
wsimport.1 \ |
|
247 |
xjc.1 |
|
248 |
||
13164 | 249 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
12892 | 250 |
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc |
251 |
MAN1_SUBDIR:=man |
|
252 |
endif |
|
13164 | 253 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
12892 | 254 |
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc |
255 |
MAN1_SUBDIR:=sun/man/man1 |
|
256 |
endif |
|
13164 | 257 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
258 |
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/bsd/doc |
|
259 |
MAN1_SUBDIR:=man |
|
260 |
JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES)) |
|
261 |
JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES)) |
|
262 |
endif |
|
263 |
||
12892 | 264 |
|
265 |
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
|
266 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
267 |
$(install-file) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
268 |
|
12892 | 269 |
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
270 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
271 |
$(install-file) |
|
272 |
||
273 |
$(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
|
274 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
275 |
$(install-file) |
|
276 |
||
277 |
$(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
|
278 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
279 |
$(install-file) |
|
280 |
||
281 |
define install-ja-manpage |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
282 |
$(MKDIR) -p $(@D) |
12892 | 283 |
$(CAT) $< \ |
284 |
| $(NATIVE2ASCII) -encoding eucJP \ |
|
285 |
| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \ |
|
286 |
| $(NATIVE2ASCII) -reverse -encoding $1 \ |
|
287 |
> $@ |
|
288 |
endef |
|
289 |
||
290 |
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
291 |
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
292 |
$(call install-ja-manpage,UTF-8) |
|
293 |
||
294 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
295 |
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
296 |
$(call install-ja-manpage,UTF-8) |
|
297 |
||
298 |
$(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
299 |
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
300 |
$(call install-ja-manpage,PCK) |
|
301 |
||
302 |
$(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
303 |
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
304 |
$(call install-ja-manpage,PCK) |
|
305 |
||
13164 | 306 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
12892 | 307 |
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
308 |
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
309 |
$(install-file) |
|
310 |
||
311 |
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
312 |
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
313 |
$(install-file) |
|
314 |
endif |
|
315 |
||
316 |
# Old build creates empty man page for this, mimicing behaviour. |
|
317 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja/man1/jcmd.1: |
|
318 |
$(ECHO) Creating dummy $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
319 |
$(MKDIR) -p $(@D) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
320 |
$(TOUCH) $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
321 |
|
13164 | 322 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
323 |
$(JRE_IMAGE_DIR)/man/ja: |
|
324 |
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
325 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
326 |
||
327 |
$(JDK_IMAGE_DIR)/man/ja: |
|
328 |
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
329 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
330 |
endif |
|
331 |
||
332 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
12892 | 333 |
$(JRE_IMAGE_DIR)/man/ja: |
334 |
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
335 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
336 |
||
337 |
$(JDK_IMAGE_DIR)/man/ja: |
|
338 |
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
339 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
340 |
endif |
|
341 |
||
13164 | 342 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
12892 | 343 |
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \ |
344 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \ |
|
345 |
$(JRE_IMAGE_DIR)/man/ja |
|
346 |
||
347 |
JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \ |
|
348 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \ |
|
349 |
$(JDK_IMAGE_DIR)/man/ja |
|
350 |
endif |
|
351 |
||
13164 | 352 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
12892 | 353 |
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \ |
354 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/,$(JRE_MAN_PAGES)) \ |
|
355 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \ |
|
356 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JRE_MAN_PAGES)) |
|
357 |
||
358 |
JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \ |
|
359 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/,$(JDK_MAN_PAGES)) \ |
|
360 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \ |
|
361 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JDK_MAN_PAGES)) |
|
362 |
endif |
|
363 |
||
13164 | 364 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
365 |
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \ |
|
366 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \ |
|
367 |
$(JRE_IMAGE_DIR)/man/ja |
|
368 |
||
369 |
JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \ |
|
370 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \ |
|
371 |
$(JDK_IMAGE_DIR)/man/ja |
|
372 |
endif |
|
373 |
||
12892 | 374 |
################################################################################ |
375 |
# /demo dir |
|
376 |
||
377 |
ifndef NO_DEMOS |
|
378 |
# FIXME: newdemo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied. |
|
379 |
||
380 |
# The db demo contains an empty dir that needs to be copied. The other |
|
381 |
# directories will always trigger the rule for recompile since |
|
382 |
# _the.list_of_packages files are touched. |
|
383 |
$(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/newdemo/% |
|
384 |
if [ ! -d "$@" ]; then \ |
|
385 |
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \ |
|
386 |
$(MKDIR) -p $(@D); \ |
|
387 |
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \ |
|
388 |
fi |
|
389 |
||
390 |
# Find all files including directories |
|
391 |
JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/newdemo/%,$(JDK_IMAGE_DIR)/demo/%,\ |
|
392 |
$(shell $(FIND) $(JDK_OUTPUTDIR)/newdemo ! -name "_the.*")) |
|
393 |
||
394 |
endif |
|
395 |
||
396 |
################################################################################ |
|
397 |
# /sample dir |
|
398 |
||
399 |
ifndef NO_SAMPLES |
|
400 |
$(JDK_IMAGE_DIR)/sample/%: $(JDK_OUTPUTDIR)/sample/% |
|
401 |
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
|
402 |
$(install-file) |
|
403 |
||
404 |
JDK_SAMPLE_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/sample/%,$(JDK_IMAGE_DIR)/sample/%,\ |
|
405 |
$(shell $(FIND) $(JDK_OUTPUTDIR)/sample -type f)) |
|
406 |
||
407 |
endif |
|
408 |
||
409 |
################################################################################ |
|
410 |
# /db dir |
|
411 |
||
412 |
ifndef OPENJDK |
|
413 |
$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/% |
|
414 |
$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<) |
|
415 |
$(MKDIR) -p $(JDK_IMAGE_DIR)/db |
|
416 |
cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -o $< -x index.html 2> /dev/null |
|
417 |
$(MKDIR) -p $(@D) |
|
418 |
$(TOUCH) $@ |
|
419 |
||
420 |
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html |
|
421 |
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
|
422 |
$(install-file) |
|
13164 | 423 |
$(CHMOD) 644 $(@) |
12892 | 424 |
|
425 |
JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\ |
|
426 |
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*.zip" ! -name "*demo*")) \ |
|
427 |
$(JDK_IMAGE_DIR)/db/README-JDK.html |
|
428 |
||
429 |
endif |
|
430 |
||
431 |
################################################################################ |
|
432 |
# /include dir |
|
433 |
||
434 |
$(JDK_IMAGE_DIR)/include/%: $(JDK_OUTPUTDIR)/include/% |
|
435 |
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
|
436 |
$(install-file) |
|
437 |
||
438 |
JDK_INCLUDE_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/include/%,$(JDK_IMAGE_DIR)/include/%,\ |
|
439 |
$(shell $(FIND) $(JDK_OUTPUTDIR)/include -type f)) |
|
440 |
||
441 |
################################################################################ |
|
442 |
# doc files |
|
443 |
||
444 |
ifdef OPENJDK |
|
445 |
JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
446 |
JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
447 |
JRE_DOC_LOCATION := $(JDK_TOPDIR) |
|
448 |
JDK_DOC_LOCATION := $(JDK_TOPDIR) |
|
449 |
else |
|
450 |
JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt |
|
451 |
JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt |
|
13164 | 452 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
12892 | 453 |
JRE_DOC_FILES += README.txt |
454 |
else |
|
455 |
JRE_DOC_FILES += README |
|
456 |
endif |
|
457 |
ifndef NO_DEMOS |
|
458 |
JDK_DOC_FILES += demo/DEMOS_LICENSE |
|
459 |
endif |
|
460 |
ifndef NO_SAMPLES |
|
461 |
JDK_DOC_FILES += sample/SAMPLES_LICENSE |
|
462 |
endif |
|
463 |
JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre |
|
464 |
JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk |
|
465 |
endif |
|
466 |
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/,$(JRE_DOC_FILES)) |
|
467 |
JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/,$(JRE_DOC_FILES)) |
|
468 |
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/,$(JDK_DOC_FILES)) |
|
469 |
||
470 |
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
|
471 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
472 |
$(install-file) |
|
13164 | 473 |
$(CHMOD) 444 $(@) |
12892 | 474 |
|
475 |
$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/% |
|
476 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
477 |
$(install-file) |
|
13164 | 478 |
$(CHMOD) 444 $(@) |
12892 | 479 |
|
480 |
$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README |
|
481 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
482 |
$(MKDIR) -p $(@D) |
|
483 |
$(CP) $< $@ |
|
13164 | 484 |
$(CHMOD) 444 $(@) |
12892 | 485 |
|
486 |
$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README |
|
487 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
488 |
$(MKDIR) -p $(@D) |
|
489 |
$(CP) $< $@ |
|
13164 | 490 |
$(CHMOD) 444 $(@) |
12892 | 491 |
|
492 |
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
|
493 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
494 |
$(install-file) |
|
13164 | 495 |
$(CHMOD) 444 $(@) |
12892 | 496 |
|
497 |
$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/% |
|
498 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
499 |
$(install-file) |
|
13164 | 500 |
$(CHMOD) 444 $(@) |
12892 | 501 |
|
502 |
$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/% |
|
503 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
504 |
$(install-file) |
|
13164 | 505 |
$(CHMOD) 444 $(@) |
12892 | 506 |
|
507 |
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release |
|
508 |
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release |
|
509 |
||
510 |
# Common way to emit a line into the release or info file |
|
511 |
define info-file-item # name value |
|
512 |
$(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
|
513 |
endef |
|
514 |
||
515 |
ALL_SOURCE_TIPS = $(shell \ |
|
516 |
if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \ |
|
517 |
$(CAT) $(OUTPUT_ROOT)/source_tips ; \ |
|
518 |
fi) |
|
519 |
||
520 |
$(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
521 |
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
522 |
$(MKDIR) -p $(@D) |
|
523 |
$(RM) $@ |
|
524 |
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
|
525 |
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
|
526 |
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
|
527 |
$(call info-file-item, "OS_ARCH", "$(ARCH)") |
|
528 |
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
|
529 |
||
530 |
$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
531 |
$(ECHO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
532 |
$(MKDIR) -p $(@D) |
|
533 |
$(RM) $@ |
|
534 |
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
|
535 |
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
|
536 |
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
|
537 |
$(call info-file-item, "OS_ARCH", "$(ARCH)") |
|
538 |
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
|
539 |
||
540 |
$(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip |
|
541 |
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
542 |
$(install-file) |
|
543 |
||
544 |
################################################################################ |
|
545 |
# Post processing (strip etc) |
|
546 |
||
547 |
ifneq ($(POST_STRIP_CMD),) |
|
13164 | 548 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
12892 | 549 |
EXEC_LIST:=$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*.exe \ |
550 |
-o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)") |
|
551 |
else |
|
552 |
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed |
|
553 |
EXEC_LIST:=$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX) && \ |
|
554 |
$(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \ |
|
555 |
| $(EGREP) 'ELF' | $(CUT) -d':' -f1) |
|
556 |
endif |
|
557 |
# Filter out non JRE files and convert to unique touch files to depend on |
|
13164 | 558 |
JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped,\ |
559 |
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST))) |
|
560 |
||
561 |
JDK_JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \ |
|
562 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \ |
|
12892 | 563 |
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST))) |
564 |
||
13164 | 565 |
JDK_BIN_EXEC_TOUCH_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
566 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \ |
|
567 |
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST))) |
|
568 |
||
12892 | 569 |
# Setup a rule for stripping files based on touch files |
13164 | 570 |
$(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped: $(JRE_IMAGE_DIR)/% |
12892 | 571 |
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<) |
572 |
$(CHMOD) u+w $< |
|
573 |
$(POST_STRIP_CMD) $< |
|
574 |
$(CHMOD) go-w $< |
|
575 |
$(MKDIR) -p $(@D) |
|
576 |
$(TOUCH) $@ |
|
13164 | 577 |
|
578 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/bin/%.stripped: $(JDK_IMAGE_DIR)/bin/% |
|
579 |
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<) |
|
580 |
$(CHMOD) u+w $< |
|
581 |
$(POST_STRIP_CMD) $< |
|
582 |
$(CHMOD) go-w $< |
|
583 |
$(MKDIR) -p $(@D) |
|
584 |
$(TOUCH) $@ |
|
585 |
||
586 |
# Setup a rule for stripping files based on touch files |
|
587 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped: $(JDK_IMAGE_DIR)/jre/% |
|
588 |
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<) |
|
589 |
$(CHMOD) u+w $< |
|
590 |
$(POST_STRIP_CMD) $< |
|
591 |
$(CHMOD) go-w $< |
|
592 |
$(MKDIR) -p $(@D) |
|
593 |
$(TOUCH) $@ |
|
594 |
||
12892 | 595 |
endif |
596 |
||
597 |
################################################################################ |
|
598 |
# Main targets |
|
599 |
||
600 |
jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \ |
|
601 |
$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
|
602 |
$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_EXEC_TOUCH_LIST) |
|
603 |
||
604 |
jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \ |
|
605 |
$(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \ |
|
606 |
$(JDK_IMAGE_DIR)/jre/lib/applet \ |
|
607 |
$(JDK_DEMO_TARGETS) \ |
|
608 |
$(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \ |
|
609 |
$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \ |
|
610 |
$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \ |
|
611 |
$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \ |
|
13164 | 612 |
$(JDK_INFO_FILE) $(JDK_JRE_EXEC_TOUCH_LIST) $(JDK_BIN_EXEC_TOUCH_LIST) \ |
613 |
$(JDK_IMAGE_DIR)/src.zip |
|
12892 | 614 |
|
615 |
################################################################################ |
|
616 |
||
617 |
.PHONY: default images jre-image jdk-image |