author | duke |
Wed, 05 Jul 2017 18:46:58 +0200 | |
changeset 16416 | bcebd3fdefc9 |
parent 16127 | 2b9ee77336a8 |
child 16511 | a059e818459d |
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 |
|
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
33 |
# Prepare the find cache. Only used if running on windows. |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
34 |
$(eval $(call FillCacheFind,\ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
35 |
$(wildcard $(JDK_OUTPUTDIR)/bin \ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
36 |
$(JDK_OUTPUTDIR)/lib \ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
37 |
$(IMAGES_OUTPUTDIR)/lib \ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
38 |
$(JDK_OUTPUTDIR)/include \ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
39 |
$(JDK_OUTPUTDIR)/sample \ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
40 |
$(JDK_OUTPUTDIR)/demo))) |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
41 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
42 |
include Tools.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
43 |
|
15681 | 44 |
include Profiles.gmk |
45 |
||
13702 | 46 |
# Note: This double-colon rule is intentional, to support |
47 |
# custom make file integration. |
|
48 |
images:: jre-image jdk-image |
|
49 |
||
50 |
overlay-images: jre-overlay-image jdk-overlay-image |
|
51 |
||
52 |
||
53 |
-include $(CUSTOM_MAKE_DIR)/Images.gmk |
|
54 |
||
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
55 |
|
13702 | 56 |
# Processing license files from source area to image area |
57 |
# These will be modified to have the platform specific EOL chars. |
|
58 |
define process-doc-file |
|
14231 | 59 |
$(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 60 |
$(MKDIR) -p $(@D) |
61 |
$(RM) $@ |
|
15823
9882cddb33b9
8007387: "sed: RE error: illegal byte sequence" when building images on Mac
erikj
parents:
15693
diff
changeset
|
62 |
LC_ALL=C $(SED) 's/$$//g' $< > $@ |
13702 | 63 |
$(CHMOD) 444 $@ |
64 |
endef |
|
65 |
||
14231 | 66 |
define AddFileToCopy |
67 |
# Param 1 - src root dir |
|
68 |
# Param 2 - dest root dir |
|
69 |
# Param 3 - src file |
|
70 |
# Param 4 - variable to add targets to |
|
71 |
||
72 |
# Remove src dir root from src file |
|
73 |
$2_$3_FILE := $$(patsubst $1/%,%,$3) |
|
74 |
||
75 |
$2/$$($2_$3_FILE): $3 |
|
76 |
$(ECHO) $(LOG_INFO) Copying $$(patsubst $(OUTPUT_ROOT)/%,%,$$@) |
|
77 |
$$(install-file) |
|
78 |
||
79 |
$4 += $2/$$($2_$3_FILE) |
|
80 |
endef |
|
13702 | 81 |
|
12892 | 82 |
################################################################################ |
83 |
# |
|
84 |
# JRE and JDK build rules |
|
85 |
# |
|
86 |
################################################################################ |
|
13702 | 87 |
# |
88 |
# Variable prefixes explained: |
|
15681 | 89 |
# JRE_ refers to files in the j2re-*-image. |
13702 | 90 |
# JDK_ refers to files in the j2sdk-image outside of the jre subdir. |
91 |
# JDKJRE_ refers to files in the j2sdk-image inside the jre subdir. |
|
92 |
# |
|
12892 | 93 |
|
94 |
################################################################################ |
|
95 |
# /bin dir |
|
96 |
||
15681 | 97 |
ifeq ($(PROFILE),) |
98 |
NOT_JRE_BIN_FILES := \ |
|
12892 | 99 |
appletviewer$(EXE_SUFFIX) \ |
100 |
extcheck$(EXE_SUFFIX) \ |
|
101 |
idlj$(EXE_SUFFIX) \ |
|
102 |
jar$(EXE_SUFFIX) \ |
|
103 |
jarsigner$(EXE_SUFFIX) \ |
|
104 |
java-rmi.cgi \ |
|
105 |
javac$(EXE_SUFFIX) \ |
|
106 |
javadoc$(EXE_SUFFIX) \ |
|
107 |
javah$(EXE_SUFFIX) \ |
|
108 |
javap$(EXE_SUFFIX) \ |
|
14994
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14596
diff
changeset
|
109 |
jdeps$(EXE_SUFFIX) \ |
12892 | 110 |
jcmd$(EXE_SUFFIX) \ |
111 |
jdb$(EXE_SUFFIX) \ |
|
112 |
jps$(EXE_SUFFIX) \ |
|
113 |
jrunscript$(EXE_SUFFIX) \ |
|
114 |
jstat$(EXE_SUFFIX) \ |
|
115 |
jstatd$(EXE_SUFFIX) \ |
|
116 |
jstack$(EXE_SUFFIX) \ |
|
117 |
packagebean$(SCRIPT_SUFFIX) \ |
|
118 |
rmic$(EXE_SUFFIX) \ |
|
119 |
serialver$(EXE_SUFFIX) \ |
|
120 |
unregbean$(EXE_SUFFIX) \ |
|
121 |
jconsole$(EXE_SUFFIX) \ |
|
122 |
jinfo$(EXE_SUFFIX) \ |
|
123 |
jmap$(EXE_SUFFIX) \ |
|
124 |
native2ascii$(EXE_SUFFIX) \ |
|
125 |
xjc$(EXE_SUFFIX) \ |
|
126 |
wsgen$(EXE_SUFFIX) \ |
|
127 |
wsimport$(EXE_SUFFIX) \ |
|
128 |
schemagen$(EXE_SUFFIX) \ |
|
129 |
jsadebugd$(EXE_SUFFIX) \ |
|
130 |
jhat$(EXE_SUFFIX) |
|
15681 | 131 |
endif |
12892 | 132 |
|
133 |
WINDOWS_JDK_BIN_FILES = \ |
|
134 |
$(EXE_SUFFIX) \ |
|
13702 | 135 |
$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \ |
14231 | 136 |
$(notdir $(MSVCR_DLL)) |
13702 | 137 |
|
138 |
WINDOWS_JDKJRE_BIN_FILES := \ |
|
139 |
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
|
140 |
$(SALIB_NAME) |
|
12892 | 141 |
|
142 |
# Find all files in bin dir |
|
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
143 |
ALL_BIN_LIST := $(call CacheFind,$(JDK_OUTPUTDIR)/bin) |
13164 | 144 |
|
14231 | 145 |
# Prevent sjavac from entering the images. |
146 |
ALL_BIN_LIST := $(filter-out %/sjavac,$(ALL_BIN_LIST)) |
|
147 |
||
13702 | 148 |
# For unknown reason the debuginfo files for executables are not put into images |
13164 | 149 |
# e.g filter them out |
13702 | 150 |
ifneq ($(OPENJDK_TARGET_OS),windows) |
151 |
ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST)) |
|
152 |
else |
|
153 |
# On windows, the libraries are in the bin dir, only filter out debuginfo files |
|
154 |
# for executables. "java" is both a library and executable. |
|
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
155 |
ALL_BIN_EXEC_FILES := $(filter-out java.exe,$(notdir $(filter %.exe,$(ALL_BIN_LIST)))) |
13702 | 156 |
ALL_BIN_DEBUG_FILTER := $(addprefix %,$(patsubst %.exe,%.debuginfo,$(ALL_BIN_EXEC_FILES)) \ |
157 |
$(patsubst %.exe,%.diz,$(ALL_BIN_EXEC_FILES))) %.pdb |
|
158 |
ALL_BIN_LIST := $(filter-out $(ALL_BIN_DEBUG_FILTER),$(ALL_BIN_LIST)) |
|
159 |
endif |
|
13164 | 160 |
|
14231 | 161 |
JDKJRE_BIN_LIST := $(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES)), $(ALL_BIN_LIST)) |
162 |
JRE_BIN_LIST := $(filter-out $(addprefix %,$(WINDOWS_JDKJRE_BIN_FILES)), $(JDKJRE_BIN_LIST)) |
|
163 |
||
13164 | 164 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
12892 | 165 |
JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST)) |
14231 | 166 |
# On windows x86, the server jvm is filtered out from the j2re image. This could possibly |
167 |
# be handled by profiles in the future. If no client jvm is built, leave server in. |
|
168 |
ifeq ($(OPENJDK_TARGET_CPU),x86) |
|
169 |
ifeq ($(JVM_VARIANT_CLIENT),true) |
|
170 |
JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%,$(JRE_BIN_LIST)) |
|
171 |
endif |
|
172 |
endif |
|
12892 | 173 |
else |
174 |
JDK_BIN_LIST := $(ALL_BIN_LIST) |
|
175 |
endif |
|
13702 | 176 |
|
177 |
ifneq ($(OPENJDK_TARGET_CPU_ISADIR),) |
|
178 |
OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)% |
|
179 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
180 |
|
14231 | 181 |
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)),\ |
182 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
|
183 |
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)),\ |
|
184 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
|
185 |
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)),\ |
|
186 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS))) |
|
13702 | 187 |
|
14231 | 188 |
$(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)),\ |
189 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
|
190 |
$(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)),\ |
|
191 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
|
192 |
$(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)),\ |
|
193 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS))) |
|
12892 | 194 |
|
195 |
################################################################################ |
|
196 |
# /lib dir |
|
13702 | 197 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
198 |
JDKJRE_LIB_FILES := \ |
|
199 |
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
|
12892 | 200 |
$(SALIB_NAME) |
13702 | 201 |
endif |
12892 | 202 |
|
15681 | 203 |
ifeq ($(PROFILE),) |
204 |
NOT_JRE_LIB_FILES := \ |
|
12892 | 205 |
tools.jar \ |
206 |
jconsole.jar \ |
|
207 |
sa-jdi.jar \ |
|
208 |
dt.jar \ |
|
209 |
orb.idl \ |
|
210 |
ir.idl \ |
|
211 |
ct.sym |
|
212 |
||
15681 | 213 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
214 |
NOT_JRE_LIB_FILES += jawt.lib jvm.lib |
|
215 |
endif |
|
13702 | 216 |
endif |
217 |
||
12892 | 218 |
JDK_LIB_FILES := $(NOT_JRE_LIB_FILES) |
13164 | 219 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
12892 | 220 |
JDK_LIB_FILES += jexec |
221 |
endif |
|
222 |
||
14231 | 223 |
# Find all files to copy from $(JDK_OUTPUTDIR)/lib |
14596
a1f29d55b5ee
8004281: build-infra: Move all jar creation to images target and put jars in images/lib
erikj
parents:
14231
diff
changeset
|
224 |
# Jar files are not expected to be here |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
225 |
ALL_JDKOUT_LIB_LIST := $(call not-containing,_the.,$(filter-out %.jar,\ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
226 |
$(call CacheFind,$(JDK_OUTPUTDIR)/lib))) |
14231 | 227 |
# Find all files to copy from $(IMAGES_OUTPUTDIR)/lib |
14596
a1f29d55b5ee
8004281: build-infra: Move all jar creation to images target and put jars in images/lib
erikj
parents:
14231
diff
changeset
|
228 |
# This is were the jar files are and might not exist if building overlay-images |
14231 | 229 |
ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib),) |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
230 |
ALL_IMAGES_LIB_LIST := $(call not-containing,_the.,\ |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
231 |
$(call CacheFind,$(IMAGES_OUTPUTDIR)/lib)) |
14231 | 232 |
endif |
233 |
||
234 |
# Filter files to copy for each destination |
|
235 |
JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\ |
|
236 |
$(ALL_JDKOUT_LIB_LIST)) |
|
237 |
JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_JDKOUT_LIB_LIST)) |
|
238 |
JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_JDKOUT_LIB_LIST)) |
|
239 |
||
240 |
JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\ |
|
241 |
$(ALL_IMAGES_LIB_LIST)) |
|
242 |
JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %,$(NOT_JRE_LIB_FILES)),$(ALL_IMAGES_LIB_LIST)) |
|
243 |
JDK_IMAGES_LIB_LIST := $(filter $(addprefix %,$(JDK_LIB_FILES)),$(ALL_IMAGES_LIB_LIST)) |
|
12892 | 244 |
|
14231 | 245 |
# Iterate over files to copy to create rules for each one |
246 |
$(foreach f,$(JRE_JDKOUT_LIB_LIST),\ |
|
247 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
|
248 |
$(foreach f,$(JDK_JDKOUT_LIB_LIST),\ |
|
249 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
|
250 |
$(foreach f,$(JDKJRE_JDKOUT_LIB_LIST),\ |
|
251 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
|
12892 | 252 |
|
14231 | 253 |
$(foreach f,$(JRE_IMAGES_LIB_LIST),\ |
254 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
|
255 |
$(foreach f,$(JDK_IMAGES_LIB_LIST),\ |
|
256 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
|
257 |
$(foreach f,$(JDKJRE_IMAGES_LIB_LIST),\ |
|
258 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
|
259 |
||
260 |
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)),\ |
|
261 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_OVERLAY_LIB_TARGETS))) |
|
262 |
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)),\ |
|
263 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_OVERLAY_LIB_TARGETS))) |
|
264 |
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)),\ |
|
265 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_OVERLAY_LIB_TARGETS))) |
|
13702 | 266 |
|
15885
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
267 |
ifneq ($(PROFILE),) |
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
268 |
# Files in lib$(PROFILE) are excluded from the generic copying routines so |
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
269 |
# we have to add them back in here |
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
270 |
$(foreach f,$(CUSTOM_PROFILE_JARS),\ |
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
271 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR)/lib$(PROFILE),$(JRE_IMAGE_DIR)/lib,$f,JRE_LIB_TARGETS))) |
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
272 |
endif |
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
273 |
|
12892 | 274 |
# CTE plugin security change require new empty directory lib/applet |
275 |
$(JRE_IMAGE_DIR)/lib/applet: |
|
14231 | 276 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 277 |
$(MKDIR) -p $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
278 |
|
12892 | 279 |
$(JDK_IMAGE_DIR)/jre/lib/applet: |
14231 | 280 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 281 |
$(MKDIR) -p $@ |
282 |
||
13702 | 283 |
# In the old build, JObjC.jar is not part of the meta-index |
12892 | 284 |
$(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS) |
14231 | 285 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 286 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` |
12892 | 287 |
|
288 |
$(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS) |
|
14231 | 289 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 290 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` |
12892 | 291 |
|
292 |
$(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS) |
|
14231 | 293 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 294 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
295 |
|
13702 | 296 |
$(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS) |
14231 | 297 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 298 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
299 |
||
300 |
################################################################################ |
|
301 |
# /man dir |
|
14231 | 302 |
# Avoid evaluating this whole section on windows for speed and stability |
303 |
ifneq ($(OPENJDK_TARGET_OS),windows) |
|
304 |
JRE_MAN_PAGES := \ |
|
12892 | 305 |
java.1 \ |
306 |
keytool.1 \ |
|
307 |
orbd.1 \ |
|
308 |
pack200.1 \ |
|
309 |
policytool.1 \ |
|
310 |
rmid.1 \ |
|
311 |
rmiregistry.1 \ |
|
312 |
servertool.1 \ |
|
313 |
tnameserv.1 \ |
|
314 |
unpack200.1 |
|
315 |
||
14231 | 316 |
ifndef OPENJDK |
317 |
JRE_MAN_PAGES += javaws.1 |
|
318 |
endif |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
319 |
|
14231 | 320 |
JDK_MAN_PAGES = \ |
12892 | 321 |
$(JRE_MAN_PAGES) \ |
322 |
appletviewer.1 \ |
|
323 |
extcheck.1 \ |
|
324 |
idlj.1 \ |
|
325 |
jar.1 \ |
|
326 |
jarsigner.1 \ |
|
327 |
javac.1 \ |
|
328 |
javadoc.1 \ |
|
329 |
javah.1 \ |
|
330 |
javap.1 \ |
|
331 |
jconsole.1 \ |
|
332 |
jcmd.1 \ |
|
333 |
jdb.1 \ |
|
334 |
jhat.1 \ |
|
335 |
jinfo.1 \ |
|
336 |
jmap.1 \ |
|
337 |
jps.1 \ |
|
338 |
jrunscript.1 \ |
|
339 |
jsadebugd.1 \ |
|
340 |
jstack.1 \ |
|
341 |
jstat.1 \ |
|
342 |
jstatd.1 \ |
|
343 |
native2ascii.1 \ |
|
344 |
rmic.1 \ |
|
345 |
schemagen.1 \ |
|
346 |
serialver.1 \ |
|
347 |
wsgen.1 \ |
|
348 |
wsimport.1 \ |
|
349 |
xjc.1 |
|
350 |
||
14231 | 351 |
ifndef OPENJDK |
352 |
JDK_MAN_PAGES += jvisualvm.1 |
|
353 |
endif |
|
13497
2c09fb7cdf7f
7192804: Build should not install jvisualvm man page for OpenJDK
andrew
parents:
13164
diff
changeset
|
354 |
|
14231 | 355 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
356 |
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc |
|
357 |
MAN1_SUBDIR:=man |
|
358 |
endif |
|
359 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
360 |
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc |
|
361 |
MAN1_SUBDIR:=sun/man/man1 |
|
362 |
endif |
|
363 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
364 |
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/bsd/doc |
|
365 |
MAN1_SUBDIR:=man |
|
366 |
JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES)) |
|
367 |
JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES)) |
|
368 |
endif |
|
13164 | 369 |
|
12892 | 370 |
|
14231 | 371 |
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
372 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 373 |
$(install-file) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
374 |
|
14231 | 375 |
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
376 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 377 |
$(install-file) |
378 |
||
14231 | 379 |
$(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
380 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 381 |
$(install-file) |
382 |
||
14231 | 383 |
$(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
384 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 385 |
$(install-file) |
386 |
||
14231 | 387 |
define install-ja-manpage |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
388 |
$(MKDIR) -p $(@D) |
12892 | 389 |
$(CAT) $< \ |
390 |
| $(NATIVE2ASCII) -encoding eucJP \ |
|
391 |
| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \ |
|
392 |
| $(NATIVE2ASCII) -reverse -encoding $1 \ |
|
393 |
> $@ |
|
14231 | 394 |
endef |
12892 | 395 |
|
14231 | 396 |
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
397 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 398 |
$(call install-ja-manpage,UTF-8) |
399 |
||
14231 | 400 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
401 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 402 |
$(call install-ja-manpage,UTF-8) |
403 |
||
14231 | 404 |
$(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
405 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 406 |
$(call install-ja-manpage,PCK) |
407 |
||
14231 | 408 |
$(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
409 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 410 |
$(call install-ja-manpage,PCK) |
411 |
||
14231 | 412 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
413 |
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
414 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
415 |
$(install-file) |
|
12892 | 416 |
|
14231 | 417 |
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
418 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
419 |
$(install-file) |
|
420 |
endif |
|
12892 | 421 |
|
14231 | 422 |
# Old build creates empty man page for this, mimicing behaviour. |
423 |
$(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: |
|
424 |
$(ECHO) $(LOG_INFO) Creating dummy $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
12892 | 425 |
$(MKDIR) -p $(@D) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
426 |
$(TOUCH) $@ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
427 |
|
14231 | 428 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
429 |
$(JRE_IMAGE_DIR)/man/ja: |
|
430 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
431 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
13164 | 432 |
|
14231 | 433 |
$(JDK_IMAGE_DIR)/man/ja: |
434 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
435 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
436 |
endif |
|
13164 | 437 |
|
14231 | 438 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
439 |
$(JRE_IMAGE_DIR)/man/ja: |
|
440 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
441 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
12892 | 442 |
|
14231 | 443 |
$(JDK_IMAGE_DIR)/man/ja: |
444 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
445 |
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
|
446 |
endif |
|
12892 | 447 |
|
14231 | 448 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
449 |
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \ |
|
450 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \ |
|
451 |
$(JRE_IMAGE_DIR)/man/ja |
|
12892 | 452 |
|
14231 | 453 |
JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \ |
454 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \ |
|
455 |
$(JDK_IMAGE_DIR)/man/ja |
|
456 |
endif |
|
12892 | 457 |
|
14231 | 458 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
459 |
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \ |
|
460 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/,$(JRE_MAN_PAGES)) \ |
|
461 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \ |
|
462 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JRE_MAN_PAGES)) |
|
12892 | 463 |
|
14231 | 464 |
JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \ |
465 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/,$(JDK_MAN_PAGES)) \ |
|
466 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \ |
|
467 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JDK_MAN_PAGES)) |
|
468 |
endif |
|
12892 | 469 |
|
14231 | 470 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
471 |
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \ |
|
472 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \ |
|
473 |
$(JRE_IMAGE_DIR)/man/ja |
|
13164 | 474 |
|
14231 | 475 |
JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \ |
476 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \ |
|
477 |
$(JDK_IMAGE_DIR)/man/ja |
|
478 |
endif |
|
479 |
||
480 |
endif # Windows |
|
13164 | 481 |
|
12892 | 482 |
################################################################################ |
483 |
# /demo dir |
|
484 |
||
13702 | 485 |
# FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied. |
12892 | 486 |
|
487 |
# The db demo contains an empty dir that needs to be copied. The other |
|
488 |
# directories will always trigger the rule for recompile since |
|
489 |
# _the.list_of_packages files are touched. |
|
14231 | 490 |
$(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/% |
12892 | 491 |
if [ ! -d "$@" ]; then \ |
14231 | 492 |
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \ |
12892 | 493 |
$(MKDIR) -p $(@D); \ |
494 |
if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \ |
|
495 |
fi |
|
496 |
||
497 |
# Find all files including directories |
|
14231 | 498 |
JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%,$(JDK_IMAGE_DIR)/demo/%,\ |
13702 | 499 |
$(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) )) |
500 |
||
501 |
||
502 |
||
14231 | 503 |
# Param 1 is source file |
504 |
define CreateOverlayDemoRule |
|
505 |
$1_TARGET:=$$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),\ |
|
13702 | 506 |
$$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1)) |
14231 | 507 |
$$($1_TARGET): $1 |
508 |
$(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)' |
|
509 |
$$(call install-file) |
|
13702 | 510 |
|
14231 | 511 |
JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET) |
512 |
endef |
|
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
513 |
JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX),$(call CacheFind,$(JDK_OUTPUTDIR)/demo)) |
14231 | 514 |
$(foreach lib,$(JDK_OVERLAY_DEMO_SOURCES),$(eval $(call CreateOverlayDemoRule,$(lib)))) |
12892 | 515 |
|
516 |
################################################################################ |
|
517 |
# /sample dir |
|
518 |
||
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
519 |
$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample),\ |
14231 | 520 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS))) |
12892 | 521 |
|
522 |
################################################################################ |
|
523 |
# /db dir |
|
524 |
||
525 |
ifndef OPENJDK |
|
526 |
$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/% |
|
527 |
$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<) |
|
528 |
$(MKDIR) -p $(JDK_IMAGE_DIR)/db |
|
14231 | 529 |
cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x index.html 2> /dev/null |
12892 | 530 |
$(MKDIR) -p $(@D) |
531 |
$(TOUCH) $@ |
|
532 |
||
533 |
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html |
|
14231 | 534 |
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
12892 | 535 |
$(install-file) |
536 |
||
537 |
JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\ |
|
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
538 |
$(call not-containing,demo,$(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip))) \ |
12892 | 539 |
$(JDK_IMAGE_DIR)/db/README-JDK.html |
540 |
||
541 |
endif |
|
542 |
||
543 |
################################################################################ |
|
544 |
# /include dir |
|
545 |
||
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
546 |
$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include),\ |
14231 | 547 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS))) |
12892 | 548 |
|
549 |
################################################################################ |
|
550 |
# doc files |
|
551 |
||
552 |
ifdef OPENJDK |
|
553 |
JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
554 |
JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
555 |
JRE_DOC_LOCATION := $(JDK_TOPDIR) |
|
556 |
JDK_DOC_LOCATION := $(JDK_TOPDIR) |
|
557 |
else |
|
558 |
JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt |
|
559 |
JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt |
|
13164 | 560 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
12892 | 561 |
JRE_DOC_FILES += README.txt |
562 |
else |
|
563 |
JRE_DOC_FILES += README |
|
564 |
endif |
|
14231 | 565 |
JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE |
12892 | 566 |
JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre |
567 |
JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk |
|
568 |
endif |
|
569 |
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/,$(JRE_DOC_FILES)) |
|
570 |
JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/,$(JRE_DOC_FILES)) |
|
571 |
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/,$(JDK_DOC_FILES)) |
|
572 |
||
573 |
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
|
13702 | 574 |
$(process-doc-file) |
12892 | 575 |
|
576 |
$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/% |
|
13702 | 577 |
$(process-doc-file) |
12892 | 578 |
|
579 |
$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README |
|
13702 | 580 |
$(process-doc-file) |
12892 | 581 |
|
582 |
$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README |
|
13702 | 583 |
$(process-doc-file) |
12892 | 584 |
|
585 |
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
|
13702 | 586 |
$(process-doc-file) |
12892 | 587 |
|
588 |
$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/% |
|
13702 | 589 |
$(process-doc-file) |
12892 | 590 |
|
591 |
$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/% |
|
13702 | 592 |
$(process-doc-file) |
12892 | 593 |
|
594 |
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release |
|
595 |
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release |
|
596 |
||
13702 | 597 |
JRE_OVERLAY_INFO_FILE := $(JRE_OVERLAY_IMAGE_DIR)/release |
598 |
JDK_OVERLAY_INFO_FILE := $(JDK_OVERLAY_IMAGE_DIR)/release |
|
599 |
||
12892 | 600 |
# Common way to emit a line into the release or info file |
601 |
define info-file-item # name value |
|
602 |
$(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
|
603 |
endef |
|
604 |
||
13702 | 605 |
define create-info-file |
606 |
$(MKDIR) -p $(@D) |
|
607 |
$(RM) $@ |
|
608 |
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
|
609 |
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
|
610 |
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
|
611 |
$(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)") |
|
16041
b9d38accf302
8005545: Add System property to identify ARCH specific details such as ARM hard-float binaries
vladidan
parents:
15693
diff
changeset
|
612 |
if [ -n "$(JDK_ARCH_ABI_PROP_NAME)" ]; then $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"); fi |
13702 | 613 |
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
614 |
endef |
|
615 |
||
12892 | 616 |
ALL_SOURCE_TIPS = $(shell \ |
617 |
if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \ |
|
618 |
$(CAT) $(OUTPUT_ROOT)/source_tips ; \ |
|
619 |
fi) |
|
620 |
||
621 |
$(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
14231 | 622 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 623 |
$(call create-info-file) |
15681 | 624 |
ifneq ($(PROFILE),) |
625 |
$(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))") |
|
626 |
endif |
|
12892 | 627 |
|
628 |
$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
14231 | 629 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 630 |
$(call create-info-file) |
631 |
||
632 |
$(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
14231 | 633 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 634 |
$(call create-info-file) |
635 |
||
636 |
$(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
14231 | 637 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 638 |
$(call create-info-file) |
12892 | 639 |
|
640 |
$(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip |
|
14231 | 641 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 642 |
$(install-file) |
643 |
||
644 |
################################################################################ |
|
645 |
# Post processing (strip etc) |
|
646 |
||
647 |
ifneq ($(POST_STRIP_CMD),) |
|
13164 | 648 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
649 |
EXEC_LIST_BIN:=$(filter-out %$(notdir $(MSVCR_DLL)),$(filter %.exe %.dll,$(ALL_BIN_LIST))) |
12892 | 650 |
else |
651 |
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed |
|
13702 | 652 |
EXEC_LIST_BIN:=$(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX)` \ |
12892 | 653 |
| $(EGREP) 'ELF' | $(CUT) -d':' -f1) |
13702 | 654 |
# On mac, the old build searches for static libraries for stripping instead of shared. |
655 |
# Not clear if it's intentional. |
|
656 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
|
657 |
EXEC_LIST_LIB:=$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX)) |
|
658 |
endif |
|
12892 | 659 |
endif |
14231 | 660 |
# Filter out sjavac |
661 |
EXEC_LIST_BIN:=$(filter-out %sjavac$(EXE_SUFFIX),$(EXEC_LIST_BIN)) |
|
13702 | 662 |
|
663 |
# Filter out the overlay specific bin files |
|
664 |
EXEC_LIST:=$(filter-out $(OVERLAY_FILTER),$(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
|
665 |
EXEC_LIST_OVERLAY:=$(filter $(OVERLAY_FILTER),$(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
|
666 |
||
12892 | 667 |
# Filter out non JRE files and convert to unique touch files to depend on |
15681 | 668 |
JRE_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped,\ |
13702 | 669 |
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\ |
670 |
$(EXEC_LIST))) |
|
13164 | 671 |
|
13702 | 672 |
JDKJRE_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \ |
13164 | 673 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \ |
12892 | 674 |
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST))) |
675 |
||
13702 | 676 |
JDK_BIN_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \ |
13164 | 677 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \ |
678 |
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST))) |
|
679 |
||
13702 | 680 |
# Do the same for overlay image |
681 |
JRE_OVERLAY_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped,\ |
|
682 |
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)),\ |
|
683 |
$(EXEC_LIST_OVERLAY))) |
|
684 |
||
685 |
JDKJRE_OVERLAY_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \ |
|
686 |
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \ |
|
687 |
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY))) |
|
688 |
||
689 |
JDK_OVERLAY_BIN_STRIP_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \ |
|
690 |
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \ |
|
691 |
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY))) |
|
692 |
||
693 |
define mcs-file |
|
694 |
$(if $(POST_MCS_CMD),$(POST_MCS_CMD) $<) |
|
695 |
endef |
|
696 |
||
697 |
define strip-file |
|
14231 | 698 |
$(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<) |
13702 | 699 |
$(CHMOD) u+w $< |
700 |
$(POST_STRIP_CMD) $< |
|
701 |
$(call mcs-file) |
|
702 |
$(CHMOD) go-w $< |
|
703 |
$(MKDIR) -p $(@D) |
|
704 |
$(TOUCH) $@ |
|
705 |
endef |
|
706 |
||
12892 | 707 |
# Setup a rule for stripping files based on touch files |
15681 | 708 |
$(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/% |
13702 | 709 |
$(call strip-file) |
710 |
||
711 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/% |
|
712 |
$(call strip-file) |
|
13164 | 713 |
|
13702 | 714 |
$(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/% |
715 |
$(call strip-file) |
|
13164 | 716 |
|
13702 | 717 |
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/% |
718 |
$(call strip-file) |
|
13164 | 719 |
|
12892 | 720 |
endif |
721 |
||
722 |
################################################################################ |
|
723 |
# Main targets |
|
724 |
||
725 |
jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \ |
|
726 |
$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
|
13702 | 727 |
$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) |
12892 | 728 |
|
729 |
jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \ |
|
730 |
$(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \ |
|
731 |
$(JDK_IMAGE_DIR)/jre/lib/applet \ |
|
732 |
$(JDK_DEMO_TARGETS) \ |
|
733 |
$(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \ |
|
734 |
$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \ |
|
735 |
$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \ |
|
736 |
$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \ |
|
13702 | 737 |
$(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \ |
13164 | 738 |
$(JDK_IMAGE_DIR)/src.zip |
12892 | 739 |
|
13702 | 740 |
jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \ |
741 |
$(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST) |
|
742 |
||
743 |
jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \ |
|
744 |
$(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \ |
|
745 |
$(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \ |
|
746 |
$(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST) |
|
747 |
||
15681 | 748 |
ifneq ($(PROFILE),) |
15693
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
749 |
PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS)) |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
750 |
|
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
751 |
PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
752 |
|
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
753 |
$(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS) |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
754 |
$(TOOL_CHECKDEPS) $(JRE_IMAGE_DIR) \ |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
755 |
$(call profile_name, $(call profile_number, $(PROFILE))) |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
756 |
$(TOUCH) $@ |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
757 |
|
15681 | 758 |
profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \ |
759 |
$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
|
15693
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
760 |
$(JRE_INFO_FILE) $(JRE_STRIP_LIST) $(PROFILE_IMAGE_JARS_CHECKED) |
15681 | 761 |
|
762 |
.PHONY: profile-image |
|
763 |
||
764 |
endif # Profile |
|
765 |
||
12892 | 766 |
################################################################################ |
767 |
||
768 |
.PHONY: default images jre-image jdk-image |