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