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