author | bharadwaj |
Fri, 18 Apr 2014 14:30:58 -0400 | |
changeset 24089 | 4e49589fbfa8 |
parent 23602 | ff671719d44a |
child 25859 | 3317bb8137f4 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
22963
a28e6f0b511b
8034191: Move relevant parts of build system to new closed repo
ihse
parents:
22342
diff
changeset
|
2 |
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. |
12317
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 |
|
23347
acb1d044a217
8037281: Improve CacheFind and enable on all platforms
erikj
parents:
22963
diff
changeset
|
33 |
# Prepare the find cache. |
20547 | 34 |
$(eval $(call FillCacheFind, \ |
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14596
diff
changeset
|
35 |
$(wildcard $(JDK_OUTPUTDIR)/bin \ |
20547 | 36 |
$(JDK_OUTPUTDIR)/lib \ |
37 |
$(IMAGES_OUTPUTDIR)/lib \ |
|
38 |
$(JDK_OUTPUTDIR)/include \ |
|
39 |
$(JDK_OUTPUTDIR)/sample \ |
|
40 |
$(JDK_OUTPUTDIR)/demo))) |
|
15126
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 |
||
20547 | 95 |
ifeq ($(PROFILE), ) |
96 |
NOT_JRE_BIN_FILES := \ |
|
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) \ |
|
107 |
jdeps$(EXE_SUFFIX) \ |
|
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 = \ |
|
20547 | 132 |
$(EXE_SUFFIX) \ |
133 |
$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \ |
|
134 |
$(notdir $(MSVCR_DLL)) |
|
13702 | 135 |
|
136 |
WINDOWS_JDKJRE_BIN_FILES := \ |
|
20547 | 137 |
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
138 |
$(SALIB_NAME) |
|
12892 | 139 |
|
140 |
# Find all files in bin dir |
|
20547 | 141 |
ALL_BIN_LIST := $(call CacheFind, $(JDK_OUTPUTDIR)/bin) |
13164 | 142 |
|
14231 | 143 |
# Prevent sjavac from entering the images. |
20547 | 144 |
ALL_BIN_LIST := $(filter-out %/sjavac, $(ALL_BIN_LIST)) |
14231 | 145 |
|
13702 | 146 |
# For unknown reason the debuginfo files for executables are not put into images |
13164 | 147 |
# e.g filter them out |
20547 | 148 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
149 |
ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST)) |
|
13702 | 150 |
else |
20547 | 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. |
|
153 |
ALL_BIN_EXEC_FILES := $(filter-out java.exe, $(notdir $(filter %.exe, $(ALL_BIN_LIST)))) |
|
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)) |
|
13702 | 157 |
endif |
13164 | 158 |
|
20547 | 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)) |
|
14231 | 161 |
|
20547 | 162 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
163 |
JDK_BIN_LIST := $(filter $(addprefix %, $(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST)) |
|
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)) |
|
14231 | 169 |
endif |
20547 | 170 |
endif |
12892 | 171 |
else |
20547 | 172 |
JDK_BIN_LIST := $(ALL_BIN_LIST) |
12892 | 173 |
endif |
13702 | 174 |
|
20547 | 175 |
ifneq ($(OPENJDK_TARGET_CPU_ISADIR), ) |
176 |
OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)% |
|
13702 | 177 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
178 |
|
20547 | 179 |
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \ |
14231 | 180 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
20547 | 181 |
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \ |
14231 | 182 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
20547 | 183 |
$(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \ |
14231 | 184 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS))) |
13702 | 185 |
|
20547 | 186 |
$(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \ |
14231 | 187 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
20547 | 188 |
$(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \ |
14231 | 189 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
20547 | 190 |
$(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \ |
14231 | 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) |
20547 | 196 |
JDKJRE_LIB_FILES := \ |
197 |
$(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
|
198 |
$(SALIB_NAME) |
|
13702 | 199 |
endif |
12892 | 200 |
|
20547 | 201 |
ifeq ($(PROFILE), ) |
202 |
NOT_JRE_LIB_FILES := \ |
|
203 |
tools.jar \ |
|
204 |
jconsole.jar \ |
|
205 |
sa-jdi.jar \ |
|
206 |
dt.jar \ |
|
207 |
orb.idl \ |
|
208 |
ir.idl \ |
|
209 |
ct.sym |
|
12892 | 210 |
|
20547 | 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) |
20547 | 218 |
JDK_LIB_FILES += jexec |
12892 | 219 |
endif |
220 |
||
20812 | 221 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris |
222 |
JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \ |
|
223 |
$(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) |
|
224 |
endif |
|
225 |
||
14231 | 226 |
# 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
|
227 |
# Jar files are not expected to be here |
20547 | 228 |
ALL_JDKOUT_LIB_LIST := $(call not-containing,_the., $(filter-out %.jar, \ |
229 |
$(call CacheFind, $(JDK_OUTPUTDIR)/lib))) |
|
14231 | 230 |
# 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
|
231 |
# This is were the jar files are and might not exist if building overlay-images |
20547 | 232 |
ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib), ) |
233 |
ALL_IMAGES_LIB_LIST := $(call not-containing,_the., \ |
|
234 |
$(call CacheFind, $(IMAGES_OUTPUTDIR)/lib)) |
|
14231 | 235 |
endif |
236 |
||
237 |
# Filter files to copy for each destination |
|
20547 | 238 |
JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
239 |
$(ALL_JDKOUT_LIB_LIST)) |
|
240 |
JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST)) |
|
241 |
JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST)) |
|
14231 | 242 |
|
20547 | 243 |
JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
244 |
$(ALL_IMAGES_LIB_LIST)) |
|
245 |
JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_IMAGES_LIB_LIST)) |
|
246 |
JDK_IMAGES_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_IMAGES_LIB_LIST)) |
|
12892 | 247 |
|
14231 | 248 |
# Iterate over files to copy to create rules for each one |
20547 | 249 |
$(foreach f,$(JRE_JDKOUT_LIB_LIST), \ |
14231 | 250 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
20547 | 251 |
$(foreach f,$(JDK_JDKOUT_LIB_LIST), \ |
14231 | 252 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
20547 | 253 |
$(foreach f,$(JDKJRE_JDKOUT_LIB_LIST), \ |
14231 | 254 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
12892 | 255 |
|
20547 | 256 |
$(foreach f,$(JRE_IMAGES_LIB_LIST), \ |
14231 | 257 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
20547 | 258 |
$(foreach f,$(JDK_IMAGES_LIB_LIST), \ |
14231 | 259 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
20547 | 260 |
$(foreach f,$(JDKJRE_IMAGES_LIB_LIST), \ |
14231 | 261 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
262 |
||
20547 | 263 |
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)), \ |
14231 | 264 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_OVERLAY_LIB_TARGETS))) |
20547 | 265 |
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)), \ |
14231 | 266 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_OVERLAY_LIB_TARGETS))) |
20547 | 267 |
$(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)), \ |
14231 | 268 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_OVERLAY_LIB_TARGETS))) |
13702 | 269 |
|
20547 | 270 |
ifneq ($(PROFILE), ) |
271 |
# Files in lib$(PROFILE) are excluded from the generic copying routines so |
|
272 |
# we have to add them back in here |
|
273 |
$(foreach f,$(CUSTOM_PROFILE_JARS), \ |
|
274 |
$(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR)/lib$(PROFILE),$(JRE_IMAGE_DIR)/lib,$f,JRE_LIB_TARGETS))) |
|
15885
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
275 |
endif |
1729959f3994
8009695: embedded/GP/RI: This intermittent error happens too often, makes the build unstable, and waste machine
erikj
parents:
15823
diff
changeset
|
276 |
|
12892 | 277 |
# CTE plugin security change require new empty directory lib/applet |
20547 | 278 |
$(JRE_IMAGE_DIR)/lib/applet: |
14231 | 279 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 280 |
$(MKDIR) -p $@ |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
281 |
|
20547 | 282 |
$(JDK_IMAGE_DIR)/jre/lib/applet: |
14231 | 283 |
$(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 284 |
$(MKDIR) -p $@ |
285 |
||
286 |
$(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS) |
|
14231 | 287 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
22307 | 288 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
12892 | 289 |
|
290 |
$(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS) |
|
14231 | 291 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
22307 | 292 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
12892 | 293 |
|
294 |
$(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS) |
|
14231 | 295 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 296 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
297 |
|
13702 | 298 |
$(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS) |
14231 | 299 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 300 |
$(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
301 |
||
302 |
################################################################################ |
|
303 |
# /man dir |
|
23602 | 304 |
# |
305 |
# All variables in this section are assigned with simple =, without :, to enable |
|
306 |
# more selective overriding from the custom version of this file. |
|
307 |
# |
|
14231 | 308 |
# Avoid evaluating this whole section on windows for speed and stability |
20547 | 309 |
ifneq ($(OPENJDK_TARGET_OS), windows) |
23602 | 310 |
JRE_MAN_PAGES = \ |
20547 | 311 |
java.1 \ |
23601
d15e005afb07
8031300: No jdeps.1 and jjs.1 man pages in jdk8 b122 build and jvisualvm.1 and jcmd.1 missing on macosx
erikj
parents:
23600
diff
changeset
|
312 |
jjs.1 \ |
20547 | 313 |
keytool.1 \ |
314 |
orbd.1 \ |
|
315 |
pack200.1 \ |
|
316 |
policytool.1 \ |
|
317 |
rmid.1 \ |
|
318 |
rmiregistry.1 \ |
|
319 |
servertool.1 \ |
|
320 |
tnameserv.1 \ |
|
321 |
unpack200.1 |
|
12892 | 322 |
|
20547 | 323 |
ifndef OPENJDK |
20550
f9e9b021bee7
8026500: [infra] remove extraneous docs in solaris images
ksrini
parents:
20547
diff
changeset
|
324 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
f9e9b021bee7
8026500: [infra] remove extraneous docs in solaris images
ksrini
parents:
20547
diff
changeset
|
325 |
JRE_MAN_PAGES += javaws.1 |
f9e9b021bee7
8026500: [infra] remove extraneous docs in solaris images
ksrini
parents:
20547
diff
changeset
|
326 |
endif |
20547 | 327 |
endif |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
328 |
|
20547 | 329 |
JDK_MAN_PAGES = \ |
330 |
$(JRE_MAN_PAGES) \ |
|
331 |
appletviewer.1 \ |
|
332 |
extcheck.1 \ |
|
333 |
idlj.1 \ |
|
334 |
jar.1 \ |
|
335 |
jarsigner.1 \ |
|
336 |
javac.1 \ |
|
337 |
javadoc.1 \ |
|
338 |
javah.1 \ |
|
339 |
javap.1 \ |
|
340 |
jconsole.1 \ |
|
341 |
jcmd.1 \ |
|
342 |
jdb.1 \ |
|
23601
d15e005afb07
8031300: No jdeps.1 and jjs.1 man pages in jdk8 b122 build and jvisualvm.1 and jcmd.1 missing on macosx
erikj
parents:
23600
diff
changeset
|
343 |
jdeps.1 \ |
20547 | 344 |
jhat.1 \ |
345 |
jinfo.1 \ |
|
346 |
jmap.1 \ |
|
347 |
jps.1 \ |
|
348 |
jrunscript.1 \ |
|
349 |
jsadebugd.1 \ |
|
350 |
jstack.1 \ |
|
351 |
jstat.1 \ |
|
352 |
jstatd.1 \ |
|
353 |
native2ascii.1 \ |
|
354 |
rmic.1 \ |
|
355 |
schemagen.1 \ |
|
356 |
serialver.1 \ |
|
357 |
wsgen.1 \ |
|
358 |
wsimport.1 \ |
|
359 |
xjc.1 |
|
12892 | 360 |
|
20547 | 361 |
# This variable is potentially overridden in the closed makefile. |
362 |
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
|
363 |
|
20547 | 364 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
23602 | 365 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc |
366 |
MAN1_SUBDIR = man |
|
20547 | 367 |
endif |
368 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
23602 | 369 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc |
370 |
MAN1_SUBDIR = sun/man/man1 |
|
20547 | 371 |
endif |
372 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
23602 | 373 |
MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc |
374 |
MAN1_SUBDIR = man |
|
20547 | 375 |
endif |
13164 | 376 |
|
20547 | 377 |
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
14231 | 378 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 379 |
$(install-file) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
380 |
|
20547 | 381 |
$(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
14231 | 382 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 383 |
$(install-file) |
384 |
||
20547 | 385 |
$(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
14231 | 386 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 387 |
$(install-file) |
388 |
||
20547 | 389 |
$(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
14231 | 390 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 391 |
$(install-file) |
392 |
||
20547 | 393 |
define install-ja-manpage |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
394 |
$(MKDIR) -p $(@D) |
12892 | 395 |
$(CAT) $< \ |
20547 | 396 |
| $(NATIVE2ASCII) -encoding eucJP \ |
397 |
| $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \ |
|
398 |
| $(NATIVE2ASCII) -reverse -encoding $1 \ |
|
399 |
> $@ |
|
400 |
endef |
|
12892 | 401 |
|
20547 | 402 |
$(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
14231 | 403 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
20547 | 404 |
$(call install-ja-manpage, UTF-8) |
12892 | 405 |
|
20547 | 406 |
$(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
14231 | 407 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
20547 | 408 |
$(call install-ja-manpage, UTF-8) |
12892 | 409 |
|
20547 | 410 |
$(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
14231 | 411 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
20547 | 412 |
$(call install-ja-manpage, PCK) |
12892 | 413 |
|
20547 | 414 |
$(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
14231 | 415 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
20547 | 416 |
$(call install-ja-manpage, PCK) |
12892 | 417 |
|
20547 | 418 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
419 |
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
|
420 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
421 |
$(install-file) |
|
12892 | 422 |
|
20547 | 423 |
$(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
424 |
$(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
|
425 |
$(install-file) |
|
426 |
endif |
|
12892 | 427 |
|
20547 | 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 |
|
20547 | 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 |
|
20547 | 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 |
|
20547 | 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 |
|
20547 | 448 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
23602 | 449 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
20547 | 450 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
451 |
$(JRE_IMAGE_DIR)/man/ja |
|
12892 | 452 |
|
23602 | 453 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
20547 | 454 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
23601
d15e005afb07
8031300: No jdeps.1 and jjs.1 man pages in jdk8 b122 build and jvisualvm.1 and jcmd.1 missing on macosx
erikj
parents:
23600
diff
changeset
|
455 |
$(JDK_IMAGE_DIR)/man/ja |
20547 | 456 |
endif |
12892 | 457 |
|
20547 | 458 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
23602 | 459 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
20547 | 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 |
|
23602 | 464 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
20547 | 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 |
|
20547 | 470 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
23602 | 471 |
JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
20547 | 472 |
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
473 |
$(JRE_IMAGE_DIR)/man/ja |
|
13164 | 474 |
|
23602 | 475 |
JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
20547 | 476 |
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
477 |
$(JDK_IMAGE_DIR)/man/ja |
|
478 |
endif |
|
14231 | 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 |
|
20547 | 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 |
||
20547 | 497 |
# Find all files including directories |
498 |
JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%, $(JDK_IMAGE_DIR)/demo/%, \ |
|
499 |
$(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) )) |
|
13702 | 500 |
|
501 |
||
502 |
||
14231 | 503 |
# Param 1 is source file |
504 |
define CreateOverlayDemoRule |
|
20547 | 505 |
$1_TARGET := $$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR), \ |
506 |
$$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1)) |
|
507 |
$$($1_TARGET): $1 |
|
508 |
$(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)' |
|
509 |
$$(call install-file) |
|
13702 | 510 |
|
20547 | 511 |
JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET) |
14231 | 512 |
endef |
20547 | 513 |
JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(JDK_OUTPUTDIR)/demo)) |
514 |
$(foreach lib, $(JDK_OVERLAY_DEMO_SOURCES), $(eval $(call CreateOverlayDemoRule, $(lib)))) |
|
12892 | 515 |
|
516 |
################################################################################ |
|
517 |
# /sample dir |
|
518 |
||
20547 | 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 |
|
20547 | 526 |
$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/% |
12892 | 527 |
$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<) |
528 |
$(MKDIR) -p $(JDK_IMAGE_DIR)/db |
|
17428 | 529 |
cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null |
530 |
cd $(JDK_IMAGE_DIR)/db && $(MV) db-derby-*-bin/* . && $(RM) -r db-derby-*-bin |
|
12892 | 531 |
$(MKDIR) -p $(@D) |
532 |
$(TOUCH) $@ |
|
533 |
||
20547 | 534 |
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html |
14231 | 535 |
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
20544 | 536 |
$(MKDIR) -p $(@D) |
17428 | 537 |
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@ |
538 |
||
20547 | 539 |
$(JDK_IMAGE_DIR)/db/3RDPARTY: $(JDK_TOPDIR)/src/closed/share/db/3RDPARTY |
17428 | 540 |
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
20544 | 541 |
$(MKDIR) -p $(@D) |
17428 | 542 |
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@ |
12892 | 543 |
|
20547 | 544 |
JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \ |
545 |
$(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)) \ |
|
546 |
$(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY |
|
12892 | 547 |
|
548 |
endif |
|
549 |
||
550 |
################################################################################ |
|
551 |
# /include dir |
|
552 |
||
20547 | 553 |
$(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include), \ |
14231 | 554 |
$(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS))) |
12892 | 555 |
|
556 |
################################################################################ |
|
557 |
# doc files |
|
558 |
||
559 |
ifdef OPENJDK |
|
20547 | 560 |
JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
561 |
JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
|
562 |
JRE_DOC_LOCATION := $(JDK_TOPDIR) |
|
563 |
JDK_DOC_LOCATION := $(JDK_TOPDIR) |
|
12892 | 564 |
else |
20547 | 565 |
JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt |
566 |
JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt |
|
567 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
568 |
JRE_DOC_FILES += README.txt |
|
569 |
else |
|
570 |
JRE_DOC_FILES += README |
|
571 |
endif |
|
572 |
JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE |
|
573 |
JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre |
|
574 |
JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk |
|
12892 | 575 |
endif |
20547 | 576 |
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) |
577 |
JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/, $(JRE_DOC_FILES)) |
|
578 |
JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) |
|
12892 | 579 |
|
580 |
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
|
13702 | 581 |
$(process-doc-file) |
12892 | 582 |
|
583 |
$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/% |
|
13702 | 584 |
$(process-doc-file) |
12892 | 585 |
|
586 |
$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README |
|
13702 | 587 |
$(process-doc-file) |
12892 | 588 |
|
589 |
$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README |
|
13702 | 590 |
$(process-doc-file) |
12892 | 591 |
|
592 |
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
|
13702 | 593 |
$(process-doc-file) |
12892 | 594 |
|
595 |
$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/% |
|
13702 | 596 |
$(process-doc-file) |
12892 | 597 |
|
598 |
$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/% |
|
13702 | 599 |
$(process-doc-file) |
12892 | 600 |
|
601 |
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release |
|
602 |
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release |
|
603 |
||
13702 | 604 |
JRE_OVERLAY_INFO_FILE := $(JRE_OVERLAY_IMAGE_DIR)/release |
605 |
JDK_OVERLAY_INFO_FILE := $(JDK_OVERLAY_IMAGE_DIR)/release |
|
606 |
||
12892 | 607 |
# Common way to emit a line into the release or info file |
608 |
define info-file-item # name value |
|
20547 | 609 |
$(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
12892 | 610 |
endef |
611 |
||
13702 | 612 |
define create-info-file |
613 |
$(MKDIR) -p $(@D) |
|
614 |
$(RM) $@ |
|
615 |
$(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
|
20547 | 616 |
$(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
617 |
$(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
|
618 |
$(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
|
619 |
if [ -n "$(JDK_ARCH_ABI_PROP_NAME)" ]; then $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"); fi |
20547 | 620 |
$(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
13702 | 621 |
endef |
622 |
||
12892 | 623 |
ALL_SOURCE_TIPS = $(shell \ |
20547 | 624 |
if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \ |
625 |
$(CAT) $(OUTPUT_ROOT)/source_tips ; \ |
|
626 |
fi) |
|
12892 | 627 |
|
628 |
$(JRE_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) |
20547 | 631 |
ifneq ($(PROFILE), ) |
632 |
$(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))") |
|
633 |
endif |
|
12892 | 634 |
|
635 |
$(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
14231 | 636 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 637 |
$(call create-info-file) |
638 |
||
639 |
$(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
14231 | 640 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 641 |
$(call create-info-file) |
642 |
||
643 |
$(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
|
14231 | 644 |
$(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
13702 | 645 |
$(call create-info-file) |
12892 | 646 |
|
647 |
$(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip |
|
14231 | 648 |
$(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
12892 | 649 |
$(install-file) |
650 |
||
651 |
################################################################################ |
|
652 |
# Post processing (strip etc) |
|
653 |
||
20547 | 654 |
ifneq ($(POST_STRIP_CMD), ) |
655 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
656 |
EXEC_LIST_BIN := $(filter-out %$(notdir $(MSVCR_DLL)), $(filter %.exe %.dll, $(ALL_BIN_LIST))) |
|
657 |
else |
|
658 |
# Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed |
|
659 |
EXEC_LIST_BIN := $(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \ |
|
660 |
| $(EGREP) 'ELF' | $(CUT) -d':' -f1) |
|
661 |
# On mac, the old build searches for static libraries for stripping instead of shared. |
|
662 |
# Not clear if it's intentional. |
|
663 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
|
664 |
EXEC_LIST_LIB := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX)) |
|
12892 | 665 |
endif |
20547 | 666 |
endif |
667 |
# Filter out sjavac |
|
668 |
EXEC_LIST_BIN := $(filter-out %sjavac$(EXE_SUFFIX), $(EXEC_LIST_BIN)) |
|
13702 | 669 |
|
20547 | 670 |
# Filter out the overlay specific bin files |
671 |
EXEC_LIST := $(filter-out $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
|
672 |
EXEC_LIST_OVERLAY := $(filter $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
|
13702 | 673 |
|
20547 | 674 |
# Filter out non JRE files and convert to unique touch files to depend on |
675 |
JRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped, \ |
|
676 |
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
|
677 |
$(EXEC_LIST))) |
|
13164 | 678 |
|
20547 | 679 |
JDKJRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
680 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \ |
|
681 |
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST))) |
|
12892 | 682 |
|
20547 | 683 |
JDK_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
684 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \ |
|
685 |
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST))) |
|
13164 | 686 |
|
20547 | 687 |
# Do the same for overlay image |
688 |
JRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped, \ |
|
689 |
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
|
690 |
$(EXEC_LIST_OVERLAY))) |
|
13702 | 691 |
|
20547 | 692 |
JDKJRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
693 |
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \ |
|
694 |
$(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY))) |
|
13702 | 695 |
|
20547 | 696 |
JDK_OVERLAY_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
697 |
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \ |
|
698 |
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY))) |
|
13702 | 699 |
|
20547 | 700 |
define mcs-file |
701 |
$(if $(POST_MCS_CMD), $(POST_MCS_CMD) $<) |
|
702 |
endef |
|
13702 | 703 |
|
20547 | 704 |
define strip-file |
14231 | 705 |
$(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<) |
13702 | 706 |
$(CHMOD) u+w $< |
707 |
$(POST_STRIP_CMD) $< |
|
708 |
$(call mcs-file) |
|
709 |
$(CHMOD) go-w $< |
|
710 |
$(MKDIR) -p $(@D) |
|
711 |
$(TOUCH) $@ |
|
20547 | 712 |
endef |
13702 | 713 |
|
20547 | 714 |
# Setup a rule for stripping files based on touch files |
715 |
$(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/% |
|
13702 | 716 |
$(call strip-file) |
717 |
||
20547 | 718 |
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/% |
13702 | 719 |
$(call strip-file) |
13164 | 720 |
|
20547 | 721 |
$(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/% |
13702 | 722 |
$(call strip-file) |
13164 | 723 |
|
20547 | 724 |
$(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/% |
13702 | 725 |
$(call strip-file) |
13164 | 726 |
|
12892 | 727 |
endif |
728 |
||
729 |
################################################################################ |
|
23602 | 730 |
|
731 |
# Include the custom makefile right here, after all variables have been defined |
|
732 |
# so that they may be overridden, but before the main targets are declared, so |
|
733 |
# that overriding has an effect. |
|
734 |
$(eval $(call IncludeCustomExtension, jdk, Images.gmk)) |
|
735 |
||
736 |
################################################################################ |
|
12892 | 737 |
# Main targets |
738 |
||
739 |
jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \ |
|
20547 | 740 |
$(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
741 |
$(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \ |
|
742 |
$(JRE_BIN_ISADIR_LINK_TARGETS) |
|
12892 | 743 |
|
744 |
jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \ |
|
20547 | 745 |
$(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \ |
746 |
$(JDK_IMAGE_DIR)/jre/lib/applet \ |
|
747 |
$(JDK_DEMO_TARGETS) \ |
|
748 |
$(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \ |
|
749 |
$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \ |
|
750 |
$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \ |
|
751 |
$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \ |
|
752 |
$(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \ |
|
753 |
$(JDK_IMAGE_DIR)/src.zip \ |
|
754 |
$(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS) |
|
12892 | 755 |
|
13702 | 756 |
jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \ |
20547 | 757 |
$(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST) |
13702 | 758 |
|
759 |
jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \ |
|
20547 | 760 |
$(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \ |
761 |
$(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \ |
|
762 |
$(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST) |
|
13702 | 763 |
|
20547 | 764 |
ifneq ($(PROFILE), ) |
765 |
PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS)) |
|
15693
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
766 |
|
20547 | 767 |
PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked |
15693
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
768 |
|
20547 | 769 |
$(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS) |
15693
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
770 |
$(TOOL_CHECKDEPS) $(JRE_IMAGE_DIR) \ |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
771 |
$(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
|
772 |
$(TOUCH) $@ |
ba31a578f948
8007097: (profiles) Build needs test to ensure that profile definitions are updated
alanb
parents:
15681
diff
changeset
|
773 |
|
20547 | 774 |
profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \ |
15681 | 775 |
$(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
|
776 |
$(JRE_INFO_FILE) $(JRE_STRIP_LIST) $(PROFILE_IMAGE_JARS_CHECKED) |
15681 | 777 |
|
20547 | 778 |
.PHONY: profile-image |
15681 | 779 |
|
780 |
endif # Profile |
|
781 |
||
12892 | 782 |
################################################################################ |
783 |
||
784 |
.PHONY: default images jre-image jdk-image |