ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 1 | # |
ksrini | e9d8ca6 | 2013-09-27 16:29:44 -0700 | [diff] [blame] | 2 | # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
| 4 | # |
| 5 | # This code is free software; you can redistribute it and/or modify it |
| 6 | # under the terms of the GNU General Public License version 2 only, as |
| 7 | # published by the Free Software Foundation. Oracle designates this |
| 8 | # particular file as subject to the "Classpath" exception as provided |
| 9 | # by Oracle in the LICENSE file that accompanied this code. |
| 10 | # |
| 11 | # This code is distributed in the hope that it will be useful, but WITHOUT |
| 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 14 | # version 2 for more details (a copy is included in the LICENSE file that |
| 15 | # accompanied this code). |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License version |
| 18 | # 2 along with this work; if not, write to the Free Software Foundation, |
| 19 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | # |
| 21 | # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
| 22 | # or visit www.oracle.com if you need additional information or have any |
| 23 | # questions. |
| 24 | # |
| 25 | |
| 26 | include $(SPEC) |
| 27 | include MakeBase.gmk |
| 28 | include JavaCompilation.gmk |
| 29 | include Setup.gmk |
| 30 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 31 | default: images |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 32 | |
erikj | 754c744 | 2012-12-27 20:18:42 +0100 | [diff] [blame] | 33 | # Prepare the find cache. Only used if running on windows. |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 34 | $(eval $(call FillCacheFind, \ |
erikj | 754c744 | 2012-12-27 20:18:42 +0100 | [diff] [blame] | 35 | $(wildcard $(JDK_OUTPUTDIR)/bin \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 36 | $(JDK_OUTPUTDIR)/lib \ |
| 37 | $(IMAGES_OUTPUTDIR)/lib \ |
| 38 | $(JDK_OUTPUTDIR)/include \ |
| 39 | $(JDK_OUTPUTDIR)/sample \ |
| 40 | $(JDK_OUTPUTDIR)/demo))) |
erikj | 754c744 | 2012-12-27 20:18:42 +0100 | [diff] [blame] | 41 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 42 | include Tools.gmk |
| 43 | |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 44 | include Profiles.gmk |
| 45 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 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 | |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 53 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 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 |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 57 | $(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 58 | $(MKDIR) -p $(@D) |
| 59 | $(RM) $@ |
erikj | 30ba14d | 2013-02-21 14:14:59 +0100 | [diff] [blame] | 60 | LC_ALL=C $(SED) 's/$$//g' $< > $@ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 61 | $(CHMOD) 444 $@ |
| 62 | endef |
| 63 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 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 |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 79 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 80 | ################################################################################ |
| 81 | # |
| 82 | # JRE and JDK build rules |
| 83 | # |
| 84 | ################################################################################ |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 85 | # |
| 86 | # Variable prefixes explained: |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 87 | # JRE_ refers to files in the j2re-*-image. |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 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 | # |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 91 | |
| 92 | ################################################################################ |
| 93 | # /bin dir |
| 94 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 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) |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 129 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 130 | |
| 131 | WINDOWS_JDK_BIN_FILES = \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 132 | $(EXE_SUFFIX) \ |
| 133 | $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \ |
| 134 | $(notdir $(MSVCR_DLL)) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 135 | |
| 136 | WINDOWS_JDKJRE_BIN_FILES := \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 137 | $(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
| 138 | $(SALIB_NAME) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 139 | |
| 140 | # Find all files in bin dir |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 141 | ALL_BIN_LIST := $(call CacheFind, $(JDK_OUTPUTDIR)/bin) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 142 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 143 | # Prevent sjavac from entering the images. |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 144 | ALL_BIN_LIST := $(filter-out %/sjavac, $(ALL_BIN_LIST)) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 145 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 146 | # For unknown reason the debuginfo files for executables are not put into images |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 147 | # e.g filter them out |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 148 | ifneq ($(OPENJDK_TARGET_OS), windows) |
| 149 | ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST)) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 150 | else |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 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)) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 157 | endif |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 158 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 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)) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 161 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 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)) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 169 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 170 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 171 | else |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 172 | JDK_BIN_LIST := $(ALL_BIN_LIST) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 173 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 174 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 175 | ifneq ($(OPENJDK_TARGET_CPU_ISADIR), ) |
| 176 | OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 177 | endif |
| 178 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 179 | $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 180 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 181 | $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 182 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 183 | $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 184 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 185 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 186 | $(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 187 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 188 | $(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 189 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 190 | $(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 191 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS))) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 192 | |
ksrini | e9d8ca6 | 2013-09-27 16:29:44 -0700 | [diff] [blame] | 193 | ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) |
| 194 | define AddIsadirLink |
| 195 | # Param 1 - src file |
| 196 | # Param 2 - variable to add targets to |
| 197 | |
| 198 | $1_LINK := $$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1) |
| 199 | |
| 200 | $$($1_LINK): |
| 201 | $(ECHO) $(LOG_INFO) Creating link $$(patsubst $(OUTPUT_ROOT)/%,%,$$@) |
| 202 | $(MKDIR) -p $$(@D) |
| 203 | $(LN) -s ../$$(@F) $$@ |
| 204 | |
| 205 | $2 += $$($1_LINK) |
| 206 | endef |
| 207 | |
| 208 | $(foreach f,$(JRE_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JRE_BIN_ISADIR_LINK_TARGETS))) |
| 209 | $(foreach f,$(JDK_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JDK_BIN_ISADIR_LINK_TARGETS))) |
| 210 | $(foreach f,$(JDKJRE_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JDKJRE_BIN_ISADIR_LINK_TARGETS))) |
| 211 | endif |
| 212 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 213 | ################################################################################ |
| 214 | # /lib dir |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 215 | ifneq ($(OPENJDK_TARGET_OS), macosx) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 216 | JDKJRE_LIB_FILES := \ |
| 217 | $(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
| 218 | $(SALIB_NAME) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 219 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 220 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 221 | ifeq ($(PROFILE), ) |
| 222 | NOT_JRE_LIB_FILES := \ |
| 223 | tools.jar \ |
| 224 | jconsole.jar \ |
| 225 | sa-jdi.jar \ |
| 226 | dt.jar \ |
| 227 | orb.idl \ |
| 228 | ir.idl \ |
| 229 | ct.sym |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 230 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 231 | ifeq ($(OPENJDK_TARGET_OS), windows) |
| 232 | NOT_JRE_LIB_FILES += jawt.lib jvm.lib |
| 233 | endif |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 234 | endif |
| 235 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 236 | JDK_LIB_FILES := $(NOT_JRE_LIB_FILES) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 237 | ifeq ($(OPENJDK_TARGET_OS), linux) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 238 | JDK_LIB_FILES += jexec |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 239 | endif |
| 240 | |
erikj | ecca494 | 2013-07-03 10:14:02 +0200 | [diff] [blame] | 241 | ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris |
| 242 | JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \ |
| 243 | $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) |
| 244 | endif |
| 245 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 246 | # Find all files to copy from $(JDK_OUTPUTDIR)/lib |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 247 | # Jar files are not expected to be here |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 248 | ALL_JDKOUT_LIB_LIST := $(call not-containing,_the., $(filter-out %.jar, \ |
| 249 | $(call CacheFind, $(JDK_OUTPUTDIR)/lib))) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 250 | # Find all files to copy from $(IMAGES_OUTPUTDIR)/lib |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 251 | # This is were the jar files are and might not exist if building overlay-images |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 252 | ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib), ) |
| 253 | ALL_IMAGES_LIB_LIST := $(call not-containing,_the., \ |
| 254 | $(call CacheFind, $(IMAGES_OUTPUTDIR)/lib)) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 255 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 256 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 257 | # Filter files to copy for each destination |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 258 | JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 259 | $(ALL_JDKOUT_LIB_LIST)) |
| 260 | JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST)) |
| 261 | JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 262 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 263 | JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 264 | $(ALL_IMAGES_LIB_LIST)) |
| 265 | JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_IMAGES_LIB_LIST)) |
| 266 | JDK_IMAGES_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_IMAGES_LIB_LIST)) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 267 | |
| 268 | # Iterate over files to copy to create rules for each one |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 269 | $(foreach f,$(JRE_JDKOUT_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 270 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 271 | $(foreach f,$(JDK_JDKOUT_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 272 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 273 | $(foreach f,$(JDKJRE_JDKOUT_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 274 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
| 275 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 276 | $(foreach f,$(JRE_IMAGES_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 277 | $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 278 | $(foreach f,$(JDK_IMAGES_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 279 | $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 280 | $(foreach f,$(JDKJRE_IMAGES_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 281 | $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
| 282 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 283 | $(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JRE_JDKOUT_LIB_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 284 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_OVERLAY_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 285 | $(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDK_JDKOUT_LIB_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 286 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_OVERLAY_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 287 | $(foreach f,$(filter $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_ISADIR)/%,$(JDKJRE_JDKOUT_LIB_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 288 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR)/jre,$f,JDKJRE_OVERLAY_LIB_TARGETS))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 289 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 290 | ifneq ($(PROFILE), ) |
| 291 | # Files in lib$(PROFILE) are excluded from the generic copying routines so |
| 292 | # we have to add them back in here |
| 293 | $(foreach f,$(CUSTOM_PROFILE_JARS), \ |
| 294 | $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR)/lib$(PROFILE),$(JRE_IMAGE_DIR)/lib,$f,JRE_LIB_TARGETS))) |
erikj | 0f09cdf | 2013-03-12 15:17:19 +0100 | [diff] [blame] | 295 | endif |
| 296 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 297 | # CTE plugin security change require new empty directory lib/applet |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 298 | $(JRE_IMAGE_DIR)/lib/applet: |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 299 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 300 | $(MKDIR) -p $@ |
| 301 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 302 | $(JDK_IMAGE_DIR)/jre/lib/applet: |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 303 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 304 | $(MKDIR) -p $@ |
| 305 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 306 | # In the old build, JObjC.jar is not part of the meta-index |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 307 | $(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 308 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 309 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 310 | |
| 311 | $(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 312 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 313 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index `$(LS) *.jar | $(SED) 's/JObjC\.jar//g'` |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 314 | |
| 315 | $(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 316 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 317 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
| 318 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 319 | $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 320 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 321 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
| 322 | |
| 323 | ################################################################################ |
| 324 | # /man dir |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 325 | # Avoid evaluating this whole section on windows for speed and stability |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 326 | ifneq ($(OPENJDK_TARGET_OS), windows) |
| 327 | JRE_MAN_PAGES := \ |
| 328 | java.1 \ |
| 329 | keytool.1 \ |
| 330 | orbd.1 \ |
| 331 | pack200.1 \ |
| 332 | policytool.1 \ |
| 333 | rmid.1 \ |
| 334 | rmiregistry.1 \ |
| 335 | servertool.1 \ |
| 336 | tnameserv.1 \ |
| 337 | unpack200.1 |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 338 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 339 | ifndef OPENJDK |
ksrini | f8bd25a | 2013-10-16 07:37:30 -0700 | [diff] [blame] | 340 | ifneq ($(OPENJDK_TARGET_OS), solaris) |
| 341 | JRE_MAN_PAGES += javaws.1 |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 342 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 343 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 344 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 345 | JDK_MAN_PAGES = \ |
| 346 | $(JRE_MAN_PAGES) \ |
| 347 | appletviewer.1 \ |
| 348 | extcheck.1 \ |
| 349 | idlj.1 \ |
| 350 | jar.1 \ |
| 351 | jarsigner.1 \ |
| 352 | javac.1 \ |
| 353 | javadoc.1 \ |
| 354 | javah.1 \ |
| 355 | javap.1 \ |
| 356 | jconsole.1 \ |
| 357 | jcmd.1 \ |
| 358 | jdb.1 \ |
| 359 | jhat.1 \ |
| 360 | jinfo.1 \ |
| 361 | jmap.1 \ |
| 362 | jps.1 \ |
| 363 | jrunscript.1 \ |
| 364 | jsadebugd.1 \ |
| 365 | jstack.1 \ |
| 366 | jstat.1 \ |
| 367 | jstatd.1 \ |
| 368 | native2ascii.1 \ |
| 369 | rmic.1 \ |
| 370 | schemagen.1 \ |
| 371 | serialver.1 \ |
| 372 | wsgen.1 \ |
| 373 | wsimport.1 \ |
| 374 | xjc.1 |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 375 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 376 | ifndef OPENJDK |
| 377 | JDK_MAN_PAGES += jvisualvm.1 |
| 378 | endif |
andrew | 5aaf353 | 2012-08-23 15:42:23 +0100 | [diff] [blame] | 379 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 380 | # This variable is potentially overridden in the closed makefile. |
| 381 | MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src |
erikj | bbedad7 | 2013-05-02 15:59:32 +0200 | [diff] [blame] | 382 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 383 | ifeq ($(OPENJDK_TARGET_OS), linux) |
| 384 | MAN_SRC_DIR := $(MAN_SRC_BASEDIR)/linux/doc |
| 385 | MAN1_SUBDIR := man |
| 386 | endif |
| 387 | ifeq ($(OPENJDK_TARGET_OS), solaris) |
| 388 | MAN_SRC_DIR := $(MAN_SRC_BASEDIR)/solaris/doc |
| 389 | MAN1_SUBDIR := sun/man/man1 |
| 390 | endif |
| 391 | ifeq ($(OPENJDK_TARGET_OS), macosx) |
| 392 | MAN_SRC_DIR := $(MAN_SRC_BASEDIR)/bsd/doc |
| 393 | MAN1_SUBDIR := man |
| 394 | JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES)) |
| 395 | JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES)) |
| 396 | endif |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 397 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 398 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 399 | $(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 400 | $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 401 | $(install-file) |
| 402 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 403 | $(JDK_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 404 | $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 405 | $(install-file) |
| 406 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 407 | $(JRE_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 408 | $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 409 | $(install-file) |
| 410 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 411 | $(JDK_IMAGE_DIR)/man/man1/%: $(JDK_OUTPUTDIR)/impdoc/$(MAN1_SUBDIR)/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 412 | $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 413 | $(install-file) |
| 414 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 415 | define install-ja-manpage |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 416 | $(MKDIR) -p $(@D) |
| 417 | $(CAT) $< \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 418 | | $(NATIVE2ASCII) -encoding eucJP \ |
| 419 | | $(SED) 's/@@VERSION@@/$(THIS_JDK_VERSION)/g' \ |
| 420 | | $(NATIVE2ASCII) -reverse -encoding $1 \ |
| 421 | > $@ |
| 422 | endef |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 423 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 424 | $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 425 | $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 426 | $(call install-ja-manpage, UTF-8) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 427 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 428 | $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 429 | $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 430 | $(call install-ja-manpage, UTF-8) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 431 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 432 | $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 433 | $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 434 | $(call install-ja-manpage, PCK) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 435 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 436 | $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 437 | $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 438 | $(call install-ja-manpage, PCK) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 439 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 440 | ifeq ($(OPENJDK_TARGET_OS), solaris) |
| 441 | $(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
| 442 | $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 443 | $(install-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 444 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 445 | $(JDK_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/% |
| 446 | $(ECHO) $(LOG_INFO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 447 | $(install-file) |
| 448 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 449 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 450 | # Old build creates empty man page for this, mimicing behaviour. |
| 451 | $(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: |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 452 | $(ECHO) $(LOG_INFO) Creating dummy $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 453 | $(MKDIR) -p $(@D) |
ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 454 | $(TOUCH) $@ |
| 455 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 456 | ifeq ($(OPENJDK_TARGET_OS), linux) |
| 457 | $(JRE_IMAGE_DIR)/man/ja: |
| 458 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 459 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 460 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 461 | $(JDK_IMAGE_DIR)/man/ja: |
| 462 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 463 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
| 464 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 465 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 466 | ifeq ($(OPENJDK_TARGET_OS), macosx) |
| 467 | $(JRE_IMAGE_DIR)/man/ja: |
| 468 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 469 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 470 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 471 | $(JDK_IMAGE_DIR)/man/ja: |
| 472 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 473 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
| 474 | endif |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 475 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 476 | ifeq ($(OPENJDK_TARGET_OS), linux) |
| 477 | JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
| 478 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
| 479 | $(JRE_IMAGE_DIR)/man/ja |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 480 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 481 | JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
| 482 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
| 483 | $(JDK_IMAGE_DIR)/man/ja |
| 484 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 485 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 486 | ifeq ($(OPENJDK_TARGET_OS), solaris) |
| 487 | JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
| 488 | $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \ |
| 489 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
| 490 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 491 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 492 | JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
| 493 | $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \ |
| 494 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
| 495 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES)) |
| 496 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 497 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 498 | ifeq ($(OPENJDK_TARGET_OS), macosx) |
| 499 | JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
| 500 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
| 501 | $(JRE_IMAGE_DIR)/man/ja |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 502 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 503 | JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
| 504 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
| 505 | $(JDK_IMAGE_DIR)/man/ja |
| 506 | endif |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 507 | |
| 508 | endif # Windows |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 509 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 510 | ################################################################################ |
| 511 | # /demo dir |
| 512 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 513 | # FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied. |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 514 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 515 | # The db demo contains an empty dir that needs to be copied. The other |
| 516 | # directories will always trigger the rule for recompile since |
| 517 | # _the.list_of_packages files are touched. |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 518 | $(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/% |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 519 | if [ ! -d "$@" ]; then \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 520 | $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 521 | $(MKDIR) -p $(@D); \ |
| 522 | if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \ |
| 523 | fi |
| 524 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 525 | # Find all files including directories |
| 526 | JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%, $(JDK_IMAGE_DIR)/demo/%, \ |
| 527 | $(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) )) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 528 | |
| 529 | |
| 530 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 531 | # Param 1 is source file |
| 532 | define CreateOverlayDemoRule |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 533 | $1_TARGET := $$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR), \ |
| 534 | $$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1)) |
| 535 | $$($1_TARGET): $1 |
| 536 | $(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)' |
| 537 | $$(call install-file) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 538 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 539 | JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 540 | endef |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 541 | JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(JDK_OUTPUTDIR)/demo)) |
| 542 | $(foreach lib, $(JDK_OVERLAY_DEMO_SOURCES), $(eval $(call CreateOverlayDemoRule, $(lib)))) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 543 | |
| 544 | ################################################################################ |
| 545 | # /sample dir |
| 546 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 547 | $(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 548 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS))) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 549 | |
| 550 | ################################################################################ |
| 551 | # /db dir |
| 552 | |
| 553 | ifndef OPENJDK |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 554 | $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/% |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 555 | $(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<) |
| 556 | $(MKDIR) -p $(JDK_IMAGE_DIR)/db |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 557 | cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null |
| 558 | cd $(JDK_IMAGE_DIR)/db && $(MV) db-derby-*-bin/* . && $(RM) -r db-derby-*-bin |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 559 | $(MKDIR) -p $(@D) |
| 560 | $(TOUCH) $@ |
| 561 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 562 | $(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 563 | $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
erikj | 9be4ae3 | 2013-10-09 16:22:13 +0200 | [diff] [blame] | 564 | $(MKDIR) -p $(@D) |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 565 | $(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@ |
| 566 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 567 | $(JDK_IMAGE_DIR)/db/3RDPARTY: $(JDK_TOPDIR)/src/closed/share/db/3RDPARTY |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 568 | $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
erikj | 9be4ae3 | 2013-10-09 16:22:13 +0200 | [diff] [blame] | 569 | $(MKDIR) -p $(@D) |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 570 | $(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 571 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 572 | JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \ |
| 573 | $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)) \ |
| 574 | $(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 575 | |
| 576 | endif |
| 577 | |
| 578 | ################################################################################ |
| 579 | # /include dir |
| 580 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 581 | $(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 582 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS))) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 583 | |
| 584 | ################################################################################ |
| 585 | # doc files |
| 586 | |
| 587 | ifdef OPENJDK |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 588 | JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
| 589 | JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
| 590 | JRE_DOC_LOCATION := $(JDK_TOPDIR) |
| 591 | JDK_DOC_LOCATION := $(JDK_TOPDIR) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 592 | else |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 593 | JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt |
| 594 | JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt |
| 595 | ifeq ($(OPENJDK_TARGET_OS), windows) |
| 596 | JRE_DOC_FILES += README.txt |
| 597 | else |
| 598 | JRE_DOC_FILES += README |
| 599 | endif |
| 600 | JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE |
| 601 | JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre |
| 602 | JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 603 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 604 | JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) |
| 605 | JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/, $(JRE_DOC_FILES)) |
| 606 | JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 607 | |
| 608 | $(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 609 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 610 | |
| 611 | $(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 612 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 613 | |
| 614 | $(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 615 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 616 | |
| 617 | $(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 618 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 619 | |
| 620 | $(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 621 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 622 | |
| 623 | $(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 624 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 625 | |
| 626 | $(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 627 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 628 | |
| 629 | JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release |
| 630 | JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release |
| 631 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 632 | JRE_OVERLAY_INFO_FILE := $(JRE_OVERLAY_IMAGE_DIR)/release |
| 633 | JDK_OVERLAY_INFO_FILE := $(JDK_OVERLAY_IMAGE_DIR)/release |
| 634 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 635 | # Common way to emit a line into the release or info file |
| 636 | define info-file-item # name value |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 637 | $(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 638 | endef |
| 639 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 640 | define create-info-file |
| 641 | $(MKDIR) -p $(@D) |
| 642 | $(RM) $@ |
| 643 | $(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 644 | $(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
| 645 | $(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
| 646 | $(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)") |
vladidan | ea7d6a4 | 2013-02-22 17:12:35 -0500 | [diff] [blame] | 647 | if [ -n "$(JDK_ARCH_ABI_PROP_NAME)" ]; then $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"); fi |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 648 | $(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 649 | endef |
| 650 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 651 | ALL_SOURCE_TIPS = $(shell \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 652 | if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \ |
| 653 | $(CAT) $(OUTPUT_ROOT)/source_tips ; \ |
| 654 | fi) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 655 | |
| 656 | $(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 657 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 658 | $(call create-info-file) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 659 | ifneq ($(PROFILE), ) |
| 660 | $(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))") |
| 661 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 662 | |
| 663 | $(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 664 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 665 | $(call create-info-file) |
| 666 | |
| 667 | $(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 668 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 669 | $(call create-info-file) |
| 670 | |
| 671 | $(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 672 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 673 | $(call create-info-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 674 | |
| 675 | $(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 676 | $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 677 | $(install-file) |
| 678 | |
| 679 | ################################################################################ |
| 680 | # Post processing (strip etc) |
| 681 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 682 | ifneq ($(POST_STRIP_CMD), ) |
| 683 | ifeq ($(OPENJDK_TARGET_OS), windows) |
| 684 | EXEC_LIST_BIN := $(filter-out %$(notdir $(MSVCR_DLL)), $(filter %.exe %.dll, $(ALL_BIN_LIST))) |
| 685 | else |
| 686 | # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed |
| 687 | EXEC_LIST_BIN := $(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \ |
| 688 | | $(EGREP) 'ELF' | $(CUT) -d':' -f1) |
| 689 | # On mac, the old build searches for static libraries for stripping instead of shared. |
| 690 | # Not clear if it's intentional. |
| 691 | ifneq ($(OPENJDK_TARGET_OS), macosx) |
| 692 | EXEC_LIST_LIB := $(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f -name \*$(SHARED_LIBRARY_SUFFIX)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 693 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 694 | endif |
| 695 | # Filter out sjavac |
| 696 | EXEC_LIST_BIN := $(filter-out %sjavac$(EXE_SUFFIX), $(EXEC_LIST_BIN)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 697 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 698 | # Filter out the overlay specific bin files |
| 699 | EXEC_LIST := $(filter-out $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
| 700 | EXEC_LIST_OVERLAY := $(filter $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 701 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 702 | # Filter out non JRE files and convert to unique touch files to depend on |
| 703 | JRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped, \ |
| 704 | $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 705 | $(EXEC_LIST))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 706 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 707 | JDKJRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 708 | $(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \ |
| 709 | $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST))) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 710 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 711 | JDK_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 712 | $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \ |
| 713 | $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST))) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 714 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 715 | # Do the same for overlay image |
| 716 | JRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped, \ |
| 717 | $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 718 | $(EXEC_LIST_OVERLAY))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 719 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 720 | JDKJRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 721 | $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \ |
| 722 | $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST_OVERLAY))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 723 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 724 | JDK_OVERLAY_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 725 | $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \ |
| 726 | $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 727 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 728 | define mcs-file |
| 729 | $(if $(POST_MCS_CMD), $(POST_MCS_CMD) $<) |
| 730 | endef |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 731 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 732 | define strip-file |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 733 | $(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 734 | $(CHMOD) u+w $< |
| 735 | $(POST_STRIP_CMD) $< |
| 736 | $(call mcs-file) |
| 737 | $(CHMOD) go-w $< |
| 738 | $(MKDIR) -p $(@D) |
| 739 | $(TOUCH) $@ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 740 | endef |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 741 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 742 | # Setup a rule for stripping files based on touch files |
| 743 | $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 744 | $(call strip-file) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 745 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 746 | $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 747 | $(call strip-file) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 748 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 749 | $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 750 | $(call strip-file) |
| 751 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 752 | $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_IMAGE_DIR)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 753 | $(call strip-file) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 754 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 755 | endif |
| 756 | |
| 757 | ################################################################################ |
| 758 | # Main targets |
| 759 | |
| 760 | jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 761 | $(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
| 762 | $(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \ |
| 763 | $(JRE_BIN_ISADIR_LINK_TARGETS) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 764 | |
| 765 | jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 766 | $(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \ |
| 767 | $(JDK_IMAGE_DIR)/jre/lib/applet \ |
| 768 | $(JDK_DEMO_TARGETS) \ |
| 769 | $(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \ |
| 770 | $(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \ |
| 771 | $(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \ |
| 772 | $(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \ |
| 773 | $(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \ |
| 774 | $(JDK_IMAGE_DIR)/src.zip \ |
| 775 | $(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 776 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 777 | jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 778 | $(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 779 | |
| 780 | jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 781 | $(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \ |
| 782 | $(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \ |
| 783 | $(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 784 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 785 | ifneq ($(PROFILE), ) |
| 786 | PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS)) |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 787 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 788 | PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 789 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 790 | $(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS) |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 791 | $(TOOL_CHECKDEPS) $(JRE_IMAGE_DIR) \ |
| 792 | $(call profile_name, $(call profile_number, $(PROFILE))) |
| 793 | $(TOUCH) $@ |
| 794 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 795 | profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \ |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 796 | $(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 797 | $(JRE_INFO_FILE) $(JRE_STRIP_LIST) $(PROFILE_IMAGE_JARS_CHECKED) |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 798 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 799 | .PHONY: profile-image |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 800 | |
| 801 | endif # Profile |
| 802 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 803 | ################################################################################ |
| 804 | |
| 805 | .PHONY: default images jre-image jdk-image |
katleman | 153d545 | 2013-06-04 14:11:50 -0700 | [diff] [blame] | 806 | |
| 807 | -include $(CUSTOM_MAKE_DIR)/Images.gmk |