ohair | 92de566 | 2012-04-10 08:22:03 -0700 | [diff] [blame] | 1 | # |
dholmes | bb58887 | 2014-12-17 20:25:47 -0500 | [diff] [blame] | 2 | # Copyright (c) 2011, 2014, 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)) |
dholmes | bb58887 | 2014-12-17 20:25:47 -0500 | [diff] [blame] | 164 | # On windows x86, the server jvm is filtered out from the j2re image. This is historical |
| 165 | # and is not applied to compact profiles. If no client jvm is built, leave server in. |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 166 | ifeq ($(OPENJDK_TARGET_CPU), x86) |
| 167 | ifeq ($(JVM_VARIANT_CLIENT), true) |
dholmes | bb58887 | 2014-12-17 20:25:47 -0500 | [diff] [blame] | 168 | ifeq ($(PROFILE), ) |
| 169 | JRE_BIN_LIST := $(filter-out $(JDK_OUTPUTDIR)/bin/server/%, $(JRE_BIN_LIST)) |
| 170 | endif |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 171 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 172 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 173 | else |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 174 | JDK_BIN_LIST := $(ALL_BIN_LIST) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 175 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 176 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 177 | ifneq ($(OPENJDK_TARGET_CPU_ISADIR), ) |
| 178 | OVERLAY_FILTER := $(JDK_OUTPUTDIR)/bin$(OPENJDK_TARGET_CPU_ISADIR)% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 179 | endif |
| 180 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 181 | $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 182 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 183 | $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 184 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 185 | $(foreach f,$(filter-out $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 186 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_BIN_TARGETS))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 187 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 188 | $(foreach f,$(filter $(OVERLAY_FILTER),$(JRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 189 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_OVERLAY_IMAGE_DIR),$f,JRE_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 190 | $(foreach f,$(filter $(OVERLAY_FILTER),$(JDK_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 191 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR),$f,JDK_BIN_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 192 | $(foreach f,$(filter $(OVERLAY_FILTER),$(JDKJRE_BIN_LIST)), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 193 | $(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] | 194 | |
ksrini | e9d8ca6 | 2013-09-27 16:29:44 -0700 | [diff] [blame] | 195 | ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_BITS),solaris-64) |
| 196 | define AddIsadirLink |
| 197 | # Param 1 - src file |
| 198 | # Param 2 - variable to add targets to |
| 199 | |
| 200 | $1_LINK := $$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1) |
| 201 | |
| 202 | $$($1_LINK): |
| 203 | $(ECHO) $(LOG_INFO) Creating link $$(patsubst $(OUTPUT_ROOT)/%,%,$$@) |
| 204 | $(MKDIR) -p $$(@D) |
| 205 | $(LN) -s ../$$(@F) $$@ |
| 206 | |
| 207 | $2 += $$($1_LINK) |
| 208 | endef |
| 209 | |
| 210 | $(foreach f,$(JRE_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JRE_BIN_ISADIR_LINK_TARGETS))) |
| 211 | $(foreach f,$(JDK_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JDK_BIN_ISADIR_LINK_TARGETS))) |
| 212 | $(foreach f,$(JDKJRE_BIN_TARGETS),$(eval $(call AddIsadirLink,$f,JDKJRE_BIN_ISADIR_LINK_TARGETS))) |
| 213 | endif |
| 214 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 215 | ################################################################################ |
| 216 | # /lib dir |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 217 | ifneq ($(OPENJDK_TARGET_OS), macosx) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 218 | JDKJRE_LIB_FILES := \ |
| 219 | $(LIBRARY_PREFIX)attach$(SHARED_LIBRARY_SUFFIX) \ |
| 220 | $(SALIB_NAME) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 221 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 222 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 223 | ifeq ($(PROFILE), ) |
| 224 | NOT_JRE_LIB_FILES := \ |
| 225 | tools.jar \ |
| 226 | jconsole.jar \ |
| 227 | sa-jdi.jar \ |
| 228 | dt.jar \ |
| 229 | orb.idl \ |
| 230 | ir.idl \ |
| 231 | ct.sym |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 232 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 233 | ifeq ($(OPENJDK_TARGET_OS), windows) |
| 234 | NOT_JRE_LIB_FILES += jawt.lib jvm.lib |
| 235 | endif |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 236 | endif |
| 237 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 238 | JDK_LIB_FILES := $(NOT_JRE_LIB_FILES) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 239 | ifeq ($(OPENJDK_TARGET_OS), linux) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 240 | JDK_LIB_FILES += jexec |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 241 | endif |
| 242 | |
erikj | ecca494 | 2013-07-03 10:14:02 +0200 | [diff] [blame] | 243 | ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) # If Linux or Solaris |
| 244 | JDK_LIB_FILES += $(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX) \ |
| 245 | $(LIBRARY_PREFIX)jawt$(SHARED_LIBRARY_SUFFIX) |
| 246 | endif |
| 247 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 248 | # Find all files to copy from $(JDK_OUTPUTDIR)/lib |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 249 | # Jar files are not expected to be here |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 250 | ALL_JDKOUT_LIB_LIST := $(call not-containing,_the., $(filter-out %.jar, \ |
| 251 | $(call CacheFind, $(JDK_OUTPUTDIR)/lib))) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 252 | # Find all files to copy from $(IMAGES_OUTPUTDIR)/lib |
erikj | 62187db | 2012-12-05 10:12:57 +0100 | [diff] [blame] | 253 | # 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] | 254 | ifneq ($(wildcard $(IMAGES_OUTPUTDIR)/lib), ) |
| 255 | ALL_IMAGES_LIB_LIST := $(call not-containing,_the., \ |
| 256 | $(call CacheFind, $(IMAGES_OUTPUTDIR)/lib)) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 257 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 258 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 259 | # Filter files to copy for each destination |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 260 | JRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 261 | $(ALL_JDKOUT_LIB_LIST)) |
| 262 | JDKJRE_JDKOUT_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST)) |
| 263 | JDK_JDKOUT_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_JDKOUT_LIB_LIST)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 264 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 265 | JRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 266 | $(ALL_IMAGES_LIB_LIST)) |
| 267 | JDKJRE_IMAGES_LIB_LIST := $(filter-out $(addprefix %, $(NOT_JRE_LIB_FILES)), $(ALL_IMAGES_LIB_LIST)) |
| 268 | JDK_IMAGES_LIB_LIST := $(filter $(addprefix %, $(JDK_LIB_FILES)), $(ALL_IMAGES_LIB_LIST)) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 269 | |
| 270 | # Iterate over files to copy to create rules for each one |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 271 | $(foreach f,$(JRE_JDKOUT_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 272 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 273 | $(foreach f,$(JDK_JDKOUT_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 274 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 275 | $(foreach f,$(JDKJRE_JDKOUT_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 276 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
| 277 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 278 | $(foreach f,$(JRE_IMAGES_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 279 | $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JRE_IMAGE_DIR),$f,JRE_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 280 | $(foreach f,$(JDK_IMAGES_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 281 | $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_LIB_TARGETS))) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 282 | $(foreach f,$(JDKJRE_IMAGES_LIB_LIST), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 283 | $(eval $(call AddFileToCopy,$(IMAGES_OUTPUTDIR),$(JDK_IMAGE_DIR)/jre,$f,JDKJRE_LIB_TARGETS))) |
| 284 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 285 | $(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] | 286 | $(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] | 287 | $(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] | 288 | $(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] | 289 | $(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] | 290 | $(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] | 291 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 292 | ifneq ($(PROFILE), ) |
| 293 | # Files in lib$(PROFILE) are excluded from the generic copying routines so |
| 294 | # we have to add them back in here |
| 295 | $(foreach f,$(CUSTOM_PROFILE_JARS), \ |
| 296 | $(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] | 297 | endif |
| 298 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 299 | # CTE plugin security change require new empty directory lib/applet |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 300 | $(JRE_IMAGE_DIR)/lib/applet: |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 301 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 302 | $(MKDIR) -p $@ |
| 303 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 304 | $(JDK_IMAGE_DIR)/jre/lib/applet: |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 305 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 306 | $(MKDIR) -p $@ |
| 307 | |
| 308 | $(JRE_IMAGE_DIR)/lib/meta-index: $(JRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 309 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
coleenp | 6a8fc70 | 2013-09-05 10:29:33 -0400 | [diff] [blame] | 310 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 311 | |
| 312 | $(JDK_IMAGE_DIR)/jre/lib/meta-index: $(JDKJRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 313 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
coleenp | 6a8fc70 | 2013-09-05 10:29:33 -0400 | [diff] [blame] | 314 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 315 | |
| 316 | $(JRE_IMAGE_DIR)/lib/ext/meta-index: $(JRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 317 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 318 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
| 319 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 320 | $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index: $(JDKJRE_LIB_TARGETS) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 321 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 322 | $(CD) $(@D) && $(TOOL_BUILDMETAINDEX) -o meta-index *.jar |
| 323 | |
| 324 | ################################################################################ |
| 325 | # /man dir |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 326 | # |
| 327 | # All variables in this section are assigned with simple =, without :, to enable |
| 328 | # more selective overriding from the custom version of this file. |
| 329 | # |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 330 | # Avoid evaluating this whole section on windows for speed and stability |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 331 | ifneq ($(OPENJDK_TARGET_OS), windows) |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 332 | JRE_MAN_PAGES = \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 333 | java.1 \ |
erikj | f513f42 | 2014-01-10 10:25:54 +0100 | [diff] [blame] | 334 | jjs.1 \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 335 | keytool.1 \ |
| 336 | orbd.1 \ |
| 337 | pack200.1 \ |
| 338 | policytool.1 \ |
| 339 | rmid.1 \ |
| 340 | rmiregistry.1 \ |
| 341 | servertool.1 \ |
| 342 | tnameserv.1 \ |
| 343 | unpack200.1 |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 344 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 345 | ifndef OPENJDK |
ksrini | f8bd25a | 2013-10-16 07:37:30 -0700 | [diff] [blame] | 346 | ifneq ($(OPENJDK_TARGET_OS), solaris) |
| 347 | JRE_MAN_PAGES += javaws.1 |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 348 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 349 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 350 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 351 | JDK_MAN_PAGES = \ |
| 352 | $(JRE_MAN_PAGES) \ |
| 353 | appletviewer.1 \ |
| 354 | extcheck.1 \ |
| 355 | idlj.1 \ |
| 356 | jar.1 \ |
| 357 | jarsigner.1 \ |
| 358 | javac.1 \ |
| 359 | javadoc.1 \ |
| 360 | javah.1 \ |
| 361 | javap.1 \ |
| 362 | jconsole.1 \ |
| 363 | jcmd.1 \ |
| 364 | jdb.1 \ |
erikj | f513f42 | 2014-01-10 10:25:54 +0100 | [diff] [blame] | 365 | jdeps.1 \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 366 | jhat.1 \ |
| 367 | jinfo.1 \ |
| 368 | jmap.1 \ |
| 369 | jps.1 \ |
| 370 | jrunscript.1 \ |
| 371 | jsadebugd.1 \ |
| 372 | jstack.1 \ |
| 373 | jstat.1 \ |
| 374 | jstatd.1 \ |
| 375 | native2ascii.1 \ |
| 376 | rmic.1 \ |
| 377 | schemagen.1 \ |
| 378 | serialver.1 \ |
| 379 | wsgen.1 \ |
| 380 | wsimport.1 \ |
| 381 | xjc.1 |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 382 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 383 | # This variable is potentially overridden in the closed makefile. |
| 384 | MAN_SRC_BASEDIR ?= $(JDK_TOPDIR)/src |
erikj | bbedad7 | 2013-05-02 15:59:32 +0200 | [diff] [blame] | 385 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 386 | ifeq ($(OPENJDK_TARGET_OS), linux) |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 387 | MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/linux/doc |
| 388 | MAN1_SUBDIR = man |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 389 | endif |
| 390 | ifeq ($(OPENJDK_TARGET_OS), solaris) |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 391 | MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/solaris/doc |
| 392 | MAN1_SUBDIR = sun/man/man1 |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 393 | endif |
| 394 | ifeq ($(OPENJDK_TARGET_OS), macosx) |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 395 | MAN_SRC_DIR = $(MAN_SRC_BASEDIR)/bsd/doc |
| 396 | MAN1_SUBDIR = man |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 397 | endif |
erikj | af85fc4 | 2012-07-03 16:10:44 -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 | ifeq ($(OPENJDK_TARGET_OS), linux) |
| 451 | $(JRE_IMAGE_DIR)/man/ja: |
| 452 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 453 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 454 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 455 | $(JDK_IMAGE_DIR)/man/ja: |
| 456 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 457 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
| 458 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 459 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 460 | ifeq ($(OPENJDK_TARGET_OS), macosx) |
| 461 | $(JRE_IMAGE_DIR)/man/ja: |
| 462 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 463 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 464 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 465 | $(JDK_IMAGE_DIR)/man/ja: |
| 466 | $(ECHO) $(LOG_INFO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
| 467 | $(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja |
| 468 | endif |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 469 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 470 | ifeq ($(OPENJDK_TARGET_OS), linux) |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 471 | JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 472 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
| 473 | $(JRE_IMAGE_DIR)/man/ja |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 474 | |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 475 | JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 476 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
erikj | f513f42 | 2014-01-10 10:25:54 +0100 | [diff] [blame] | 477 | $(JDK_IMAGE_DIR)/man/ja |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 478 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 479 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 480 | ifeq ($(OPENJDK_TARGET_OS), solaris) |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 481 | JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 482 | $(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/, $(JRE_MAN_PAGES)) \ |
| 483 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
| 484 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JRE_MAN_PAGES)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 485 | |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 486 | JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 487 | $(addprefix $(JDK_IMAGE_DIR)/man/ja/man1/, $(JDK_MAN_PAGES)) \ |
| 488 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
| 489 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/, $(JDK_MAN_PAGES)) |
| 490 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 491 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 492 | ifeq ($(OPENJDK_TARGET_OS), macosx) |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 493 | JRE_MAN_PAGE_LIST = $(addprefix $(JRE_IMAGE_DIR)/man/man1/, $(JRE_MAN_PAGES)) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 494 | $(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JRE_MAN_PAGES)) \ |
| 495 | $(JRE_IMAGE_DIR)/man/ja |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 496 | |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 497 | JDK_MAN_PAGE_LIST = $(addprefix $(JDK_IMAGE_DIR)/man/man1/, $(JDK_MAN_PAGES)) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 498 | $(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/, $(JDK_MAN_PAGES)) \ |
| 499 | $(JDK_IMAGE_DIR)/man/ja |
| 500 | endif |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 501 | |
| 502 | endif # Windows |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 503 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 504 | ################################################################################ |
| 505 | # /demo dir |
| 506 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 507 | # FIXME: demo/applets/GraphLayout/GraphPanel$2.class is sometimes not copied. |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 508 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 509 | # The db demo contains an empty dir that needs to be copied. The other |
| 510 | # directories will always trigger the rule for recompile since |
| 511 | # _the.list_of_packages files are touched. |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 512 | $(JDK_IMAGE_DIR)/demo/%: $(JDK_OUTPUTDIR)/demo/% |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 513 | if [ ! -d "$@" ]; then \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 514 | $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'; \ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 515 | $(MKDIR) -p $(@D); \ |
| 516 | if [ -d "$<" ]; then $(MKDIR) -p $@; else $(CP) '$<' '$@'; fi \ |
| 517 | fi |
| 518 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 519 | # Find all files including directories |
| 520 | JDK_DEMO_TARGETS := $(patsubst $(JDK_OUTPUTDIR)/demo/%, $(JDK_IMAGE_DIR)/demo/%, \ |
| 521 | $(shell $(FIND) $(JDK_OUTPUTDIR)/demo ! \( -name "_the*" -o -name "javac_state" \) )) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 522 | |
| 523 | |
| 524 | |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 525 | # Param 1 is source file |
| 526 | define CreateOverlayDemoRule |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 527 | $1_TARGET := $$(subst $(JDK_OUTPUTDIR),$(JDK_OVERLAY_IMAGE_DIR), \ |
| 528 | $$(dir $1)$(OPENJDK_TARGET_CPU_ISADIR)/$$(notdir $1)) |
| 529 | $$($1_TARGET): $1 |
| 530 | $(ECHO) $(LOG_INFO) Copying '$$(patsubst $(OUTPUT_ROOT)/%,%,$$@)' |
| 531 | $$(call install-file) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 532 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 533 | JDK_OVERLAY_DEMO_TARGETS += $$($1_TARGET) |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 534 | endef |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 535 | JDK_OVERLAY_DEMO_SOURCES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(call CacheFind, $(JDK_OUTPUTDIR)/demo)) |
| 536 | $(foreach lib, $(JDK_OVERLAY_DEMO_SOURCES), $(eval $(call CreateOverlayDemoRule, $(lib)))) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 537 | |
| 538 | ################################################################################ |
| 539 | # /sample dir |
| 540 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 541 | $(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 542 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_SAMPLE_TARGETS))) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 543 | |
| 544 | ################################################################################ |
| 545 | # /db dir |
| 546 | |
| 547 | ifndef OPENJDK |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 548 | $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/% |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 549 | $(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<) |
| 550 | $(MKDIR) -p $(JDK_IMAGE_DIR)/db |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 551 | cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null |
| 552 | 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] | 553 | $(MKDIR) -p $(@D) |
| 554 | $(TOUCH) $@ |
| 555 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 556 | $(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] | 557 | $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
erikj | 9be4ae3 | 2013-10-09 16:22:13 +0200 | [diff] [blame] | 558 | $(MKDIR) -p $(@D) |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 559 | $(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@ |
| 560 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 561 | $(JDK_IMAGE_DIR)/db/3RDPARTY: $(JDK_TOPDIR)/src/closed/share/db/3RDPARTY |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 562 | $(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)' |
erikj | 9be4ae3 | 2013-10-09 16:22:13 +0200 | [diff] [blame] | 563 | $(MKDIR) -p $(@D) |
dwanvik | 6c8f599 | 2013-05-06 05:51:01 +0200 | [diff] [blame] | 564 | $(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 565 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 566 | JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \ |
dwanvik | 77ce968 | 2014-08-28 18:18:48 +0200 | [diff] [blame] | 567 | $(wildcard $(JDK_TOPDIR)/src/closed/share/db/db-derby-*-bin.zip)) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 568 | $(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 569 | |
| 570 | endif |
| 571 | |
| 572 | ################################################################################ |
| 573 | # /include dir |
| 574 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 575 | $(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/include), \ |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 576 | $(eval $(call AddFileToCopy,$(JDK_OUTPUTDIR),$(JDK_IMAGE_DIR),$f,JDK_INCLUDE_TARGETS))) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 577 | |
| 578 | ################################################################################ |
| 579 | # doc files |
| 580 | |
| 581 | ifdef OPENJDK |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 582 | JRE_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
| 583 | JDK_DOC_FILES := LICENSE ASSEMBLY_EXCEPTION THIRD_PARTY_README |
| 584 | JRE_DOC_LOCATION := $(JDK_TOPDIR) |
| 585 | JDK_DOC_LOCATION := $(JDK_TOPDIR) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 586 | else |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 587 | JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt |
| 588 | JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt |
| 589 | ifeq ($(OPENJDK_TARGET_OS), windows) |
| 590 | JRE_DOC_FILES += README.txt |
| 591 | else |
| 592 | JRE_DOC_FILES += README |
| 593 | endif |
| 594 | JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE |
| 595 | JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre |
| 596 | JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 597 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 598 | JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES)) |
| 599 | JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/, $(JRE_DOC_FILES)) |
| 600 | JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/, $(JDK_DOC_FILES)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 601 | |
| 602 | $(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 603 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 604 | |
| 605 | $(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 606 | $(process-doc-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 607 | |
| 608 | $(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README |
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/README.txt: $(JRE_DOC_LOCATION)/README |
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 | $(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/% |
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)/demo/%: $(JDK_DOC_LOCATION)/% |
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)/sample/%: $(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 | JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release |
| 624 | JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release |
| 625 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 626 | JRE_OVERLAY_INFO_FILE := $(JRE_OVERLAY_IMAGE_DIR)/release |
| 627 | JDK_OVERLAY_INFO_FILE := $(JDK_OVERLAY_IMAGE_DIR)/release |
| 628 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 629 | # Common way to emit a line into the release or info file |
| 630 | define info-file-item # name value |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 631 | $(PRINTF) '%s="%s"\n' $1 $2 >> $@ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 632 | endef |
| 633 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 634 | define create-info-file |
| 635 | $(MKDIR) -p $(@D) |
| 636 | $(RM) $@ |
| 637 | $(call info-file-item, "JAVA_VERSION", "$(JDK_VERSION)") |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 638 | $(call info-file-item, "OS_NAME", "$(REQUIRED_OS_NAME)") |
| 639 | $(call info-file-item, "OS_VERSION", "$(REQUIRED_OS_VERSION)") |
| 640 | $(call info-file-item, "OS_ARCH", "$(OPENJDK_TARGET_CPU_LEGACY)") |
vladidan | ea7d6a4 | 2013-02-22 17:12:35 -0500 | [diff] [blame] | 641 | 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] | 642 | $(call info-file-item, "SOURCE", "$(ALL_SOURCE_TIPS)") |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 643 | endef |
| 644 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 645 | ALL_SOURCE_TIPS = $(shell \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 646 | if [ -f $(OUTPUT_ROOT)/source_tips ] ; then \ |
| 647 | $(CAT) $(OUTPUT_ROOT)/source_tips ; \ |
| 648 | fi) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 649 | |
| 650 | $(JRE_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 651 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 652 | $(call create-info-file) |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 653 | ifneq ($(PROFILE), ) |
| 654 | $(call info-file-item, "JAVA_PROFILE", "$(call profile_name, $(call profile_number, $(PROFILE)))") |
| 655 | endif |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 656 | |
| 657 | $(JDK_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 658 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 659 | $(call create-info-file) |
| 660 | |
| 661 | $(JRE_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 662 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 663 | $(call create-info-file) |
| 664 | |
| 665 | $(JDK_OVERLAY_INFO_FILE): $(OUTPUT_ROOT)/spec.gmk $(OUTPUT_ROOT)/source_tips |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 666 | $(ECHO) $(LOG_INFO) Generating $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 667 | $(call create-info-file) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 668 | |
| 669 | $(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 670 | $(ECHO) $(LOG_INFO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 671 | $(install-file) |
| 672 | |
| 673 | ################################################################################ |
| 674 | # Post processing (strip etc) |
| 675 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 676 | ifneq ($(POST_STRIP_CMD), ) |
| 677 | ifeq ($(OPENJDK_TARGET_OS), windows) |
| 678 | EXEC_LIST_BIN := $(filter-out %$(notdir $(MSVCR_DLL)), $(filter %.exe %.dll, $(ALL_BIN_LIST))) |
| 679 | else |
| 680 | # Find all executables in JDK_OUTPUTDIR since they exist when this makefile is parsed |
| 681 | EXEC_LIST_BIN := $(shell $(FILE) `$(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*$(EXE_SUFFIX) ! -name \*.debuginfo` \ |
| 682 | | $(EGREP) 'ELF' | $(CUT) -d':' -f1) |
| 683 | # On mac, the old build searches for static libraries for stripping instead of shared. |
| 684 | # Not clear if it's intentional. |
| 685 | ifneq ($(OPENJDK_TARGET_OS), macosx) |
| 686 | 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] | 687 | endif |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 688 | endif |
| 689 | # Filter out sjavac |
| 690 | EXEC_LIST_BIN := $(filter-out %sjavac$(EXE_SUFFIX), $(EXEC_LIST_BIN)) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 691 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 692 | # Filter out the overlay specific bin files |
| 693 | EXEC_LIST := $(filter-out $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
| 694 | EXEC_LIST_OVERLAY := $(filter $(OVERLAY_FILTER), $(EXEC_LIST_BIN)) $(EXEC_LIST_LIB) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 695 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 696 | # Filter out non JRE files and convert to unique touch files to depend on |
| 697 | JRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped, \ |
| 698 | $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 699 | $(EXEC_LIST))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 700 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 701 | JDKJRE_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 702 | $(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \ |
| 703 | $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST))) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 704 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 705 | JDK_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 706 | $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \ |
| 707 | $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST))) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 708 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 709 | # Do the same for overlay image |
| 710 | JRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped, \ |
| 711 | $(filter-out $(addprefix %, $(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES) $(JDKJRE_LIB_FILES)), \ |
| 712 | $(EXEC_LIST_OVERLAY))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 713 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 714 | JDKJRE_OVERLAY_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 715 | $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/jre/%.stripped, \ |
| 716 | $(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] | 717 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 718 | JDK_OVERLAY_BIN_STRIP_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \ |
| 719 | $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped, \ |
| 720 | $(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST_OVERLAY))) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 721 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 722 | define mcs-file |
| 723 | $(if $(POST_MCS_CMD), $(POST_MCS_CMD) $<) |
| 724 | endef |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 725 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 726 | define strip-file |
ohair | b71409c | 2012-10-26 14:23:29 -0700 | [diff] [blame] | 727 | $(ECHO) Stripping $(LOG_INFO) $(patsubst $(OUTPUT_ROOT)/%,%,$<) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 728 | $(CHMOD) u+w $< |
| 729 | $(POST_STRIP_CMD) $< |
| 730 | $(call mcs-file) |
| 731 | $(CHMOD) go-w $< |
| 732 | $(MKDIR) -p $(@D) |
| 733 | $(TOUCH) $@ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 734 | endef |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 735 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 736 | # Setup a rule for stripping files based on touch files |
| 737 | $(IMAGES_OUTPUTDIR)/_strip_jre$(PROFILE)/%.stripped: $(JRE_IMAGE_DIR)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 738 | $(call strip-file) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 739 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 740 | $(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped: $(JDK_IMAGE_DIR)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 741 | $(call strip-file) |
erikj | af85fc4 | 2012-07-03 16:10:44 -0700 | [diff] [blame] | 742 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 743 | $(IMAGES_OUTPUTDIR)/_strip_jre_overlay/%.stripped: $(JRE_OVERLAY_IMAGE_DIR)/% |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 744 | $(call strip-file) |
| 745 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 746 | $(IMAGES_OUTPUTDIR)/_strip_jdk_overlay/%.stripped: $(JDK_OVERLAY_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 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 749 | endif |
| 750 | |
| 751 | ################################################################################ |
erikj | 7b5a36b | 2014-01-22 12:13:30 +0100 | [diff] [blame] | 752 | |
| 753 | # Include the custom makefile right here, after all variables have been defined |
| 754 | # so that they may be overridden, but before the main targets are declared, so |
| 755 | # that overriding has an effect. |
| 756 | -include $(CUSTOM_MAKE_DIR)/Images.gmk |
| 757 | |
| 758 | ################################################################################ |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 759 | # Main targets |
| 760 | |
| 761 | jre-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) $(JRE_IMAGE_DIR)/lib/applet \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 762 | $(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
| 763 | $(JRE_MAN_PAGE_LIST) $(JRE_DOC_TARGETS) $(JRE_INFO_FILE) $(JRE_STRIP_LIST) \ |
| 764 | $(JRE_BIN_ISADIR_LINK_TARGETS) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 765 | |
| 766 | jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 767 | $(JDK_LIB_TARGETS) $(JDKJRE_LIB_TARGETS) \ |
| 768 | $(JDK_IMAGE_DIR)/jre/lib/applet \ |
| 769 | $(JDK_DEMO_TARGETS) \ |
| 770 | $(JDK_IMAGE_DIR)/jre/lib/meta-index $(JDK_IMAGE_DIR)/jre/lib/ext/meta-index \ |
| 771 | $(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \ |
| 772 | $(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \ |
| 773 | $(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \ |
| 774 | $(JDK_INFO_FILE) $(JDKJRE_STRIP_LIST) $(JDK_BIN_STRIP_LIST) \ |
| 775 | $(JDK_IMAGE_DIR)/src.zip \ |
| 776 | $(JDK_BIN_ISADIR_LINK_TARGETS) $(JDKJRE_BIN_ISADIR_LINK_TARGETS) |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 777 | |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 778 | jre-overlay-image: $(JRE_OVERLAY_BIN_TARGETS) $(JRE_OVERLAY_LIB_TARGETS) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 779 | $(JRE_OVERLAY_INFO_FILE) $(JRE_OVERLAY_STRIP_LIST) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 780 | |
| 781 | jdk-overlay-image: $(JDK_OVERLAY_BIN_TARGETS) $(JDKJRE_OVERLAY_BIN_TARGETS) \ |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 782 | $(JDK_OVERLAY_LIB_TARGETS) $(JDKJRE_OVERLAY_LIB_TARGETS) \ |
| 783 | $(JDK_OVERLAY_DEMO_TARGETS) $(JDK_OVERLAY_INFO_FILE) \ |
| 784 | $(JDKJRE_OVERLAY_STRIP_LIST) $(JDK_OVERLAY_BIN_STRIP_LIST) |
ohair | 46fcac9 | 2012-09-18 11:29:24 -0700 | [diff] [blame] | 785 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 786 | ifneq ($(PROFILE), ) |
| 787 | PROFILE_IMAGE_JARS := $(filter %.jar, $(JRE_LIB_TARGETS)) |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 788 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 789 | PROFILE_IMAGE_JARS_CHECKED := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_jars_checked |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 790 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 791 | $(PROFILE_IMAGE_JARS_CHECKED) : $(PROFILE_IMAGE_JARS) |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 792 | $(TOOL_CHECKDEPS) $(JRE_IMAGE_DIR) \ |
| 793 | $(call profile_name, $(call profile_number, $(PROFILE))) |
| 794 | $(TOUCH) $@ |
| 795 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 796 | profile-image: $(JRE_BIN_TARGETS) $(JRE_LIB_TARGETS) \ |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 797 | $(JRE_IMAGE_DIR)/lib/meta-index $(JRE_IMAGE_DIR)/lib/ext/meta-index \ |
alanb | 95225a5 | 2013-02-19 11:08:43 +0000 | [diff] [blame] | 798 | $(JRE_INFO_FILE) $(JRE_STRIP_LIST) $(PROFILE_IMAGE_JARS_CHECKED) |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 799 | |
ihse | a29e622 | 2013-10-10 15:06:21 +0200 | [diff] [blame] | 800 | .PHONY: profile-image |
dholmes | 85dd5c8 | 2013-01-21 23:17:58 -0500 | [diff] [blame] | 801 | |
| 802 | endif # Profile |
| 803 | |
erikj | e78df74 | 2012-06-07 20:40:50 -0700 | [diff] [blame] | 804 | ################################################################################ |
| 805 | |
| 806 | .PHONY: default images jre-image jdk-image |
katleman | 153d545 | 2013-06-04 14:11:50 -0700 | [diff] [blame] | 807 | |