< prev index next >

make/Images.gmk

Print this page

        

*** 1,7 **** # ! # Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this --- 1,7 ---- # ! # Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as # published by the Free Software Foundation. Oracle designates this
*** 25,44 **** default: all include $(SPEC) include MakeBase.gmk - include Execute.gmk include Modules.gmk JDK_TARGETS := JRE_TARGETS := # Hook to include the corresponding custom file, if present. $(eval $(call IncludeCustomExtension, Images-pre.gmk)) ! ################################################################################ # All modules for the current target platform. ALL_MODULES := $(call FindAllModules) $(eval $(call ReadImportMetaData)) --- 25,44 ---- default: all include $(SPEC) include MakeBase.gmk include Modules.gmk + TOOL_TARGETS := JDK_TARGETS := JRE_TARGETS := # Hook to include the corresponding custom file, if present. $(eval $(call IncludeCustomExtension, Images-pre.gmk)) ! ############################################################################ # All modules for the current target platform. ALL_MODULES := $(call FindAllModules) $(eval $(call ReadImportMetaData))
*** 54,63 **** --- 54,66 ---- BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod) + # Use this file inside the image as target for make rule + JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX) + JLINK_ORDER_RESOURCES := **module-info.class JLINK_JLI_CLASSES := ifeq ($(ENABLE_GENERATE_CLASSLIST), true) JLINK_ORDER_RESOURCES += @$(SUPPORT_OUTPUTDIR)/link_opt/classlist JLINK_JLI_CLASSES := --generate-jli-classes=@$(SUPPORT_OUTPUTDIR)/link_opt/default_jli_trace.txt
*** 83,147 **** ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true) JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods endif ! $(eval $(call SetupExecute, jlink_jdk, \ ! WARN := Creating jdk image, \ ! DEPS := $(JMODS) $(BASE_RELEASE_FILE) \ ! $(call DependOnVariable, JDK_MODULES_LIST), \ ! OUTPUT_DIR := $(JDK_IMAGE_DIR), \ ! SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \ ! PRE_COMMAND := $(RM) -r $(JDK_IMAGE_DIR), \ ! COMMAND := $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \ ! $(JLINK_JDK_EXTRA_OPTS) --output $(JDK_IMAGE_DIR), \ ! )) ! ! JLINK_JDK_TARGETS := $(jlink_jdk) ! ! $(eval $(call SetupExecute, jlink_jre, \ ! WARN := Creating legacy jre image, \ ! DEPS := $(JMODS) $(BASE_RELEASE_FILE) \ ! $(call DependOnVariable, JDK_MODULES_LIST), \ ! OUTPUT_DIR := $(JDK_IMAGE_DIR), \ ! SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \ ! PRE_COMMAND := $(RM) -r $(JRE_IMAGE_DIR), \ ! COMMAND := $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \ ! $(JLINK_JRE_EXTRA_OPTS) --output $(JRE_IMAGE_DIR), \ ! )) ! ! JLINK_JRE_TARGETS := $(jlink_jre) ! ! ifeq ($(BUILD_CDS_ARCHIVE), true) ! ifeq ($(OPENJDK_TARGET_OS), windows) ! CDS_ARCHIVE := bin/server/classes.jsa ! else ! CDS_ARCHIVE := lib/server/classes.jsa ! endif ! ! $(eval $(call SetupExecute, gen_cds_archive_jdk, \ ! WARN := Creating CDS archive for jdk image, \ ! DEPS := $(jlink_jdk), \ ! OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_ARCHIVE), \ ! SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \ ! COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \ ! -Xmx128M -Xms128M $(LOG_INFO), \ ! )) ! ! JDK_TARGETS += $(gen_cds_archive_jdk) ! $(eval $(call SetupExecute, gen_cds_archive_jre, \ ! WARN := Creating CDS archive for jre image, \ ! DEPS := $(jlink_jre), \ ! OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_ARCHIVE), \ ! SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \ ! COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \ ! -Xmx128M -Xms128M $(LOG_INFO), \ ! )) ! ! JDK_TARGETS += $(gen_cds_archive_jdk) ! endif ################################################################################ # src.zip $(JDK_IMAGE_DIR)/lib/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip --- 86,127 ---- ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true) JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods endif ! $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ ! $(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE) ! $(call LogWarn, Creating jdk image) ! $(RM) -r $(JDK_IMAGE_DIR) ! $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \ ! $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \ ! $(JLINK_JDK_EXTRA_OPTS) \ ! --output $(JDK_IMAGE_DIR) \ ! ) ! ifeq ($(BUILD_CDS_ARCHIVE), true) ! $(call LogWarn, Creating CDS archive for jdk image) ! $(JDK_IMAGE_DIR)/bin/java -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO) ! endif ! $(TOUCH) $@ ! ! $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \ ! $(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE) ! $(call LogWarn, Creating legacy jre image) ! $(RM) -r $(JRE_IMAGE_DIR) ! $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \ ! $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \ ! $(JLINK_JRE_EXTRA_OPTS) \ ! --output $(JRE_IMAGE_DIR) \ ! ) ! ifeq ($(BUILD_CDS_ARCHIVE), true) ! $(call LogWarn, Creating CDS archive for jre image) ! $(JRE_IMAGE_DIR)/bin/java -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO) ! endif ! $(TOUCH) $@ ! TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) ! TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) ################################################################################ # src.zip $(JDK_IMAGE_DIR)/lib/src.zip: $(SUPPORT_OUTPUTDIR)/src.zip
*** 160,170 **** $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \ -type f -a ! \( -name "_the*" -o -name "javac_state" \) ) \ ) ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) ! ifeq ($(call isTargetOs, macosx), true) DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES)) else DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES)) endif endif --- 140,150 ---- $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/demos/image \ -type f -a ! \( -name "_the*" -o -name "javac_state" \) ) \ ) ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) ! ifeq ($(OPENJDK_TARGET_OS), macosx) DEMO_FILES := $(call not-containing, .dSYM, $(DEMO_FILES)) else DEMO_FILES := $(filter-out %.debuginfo %.pdb %.map, $(DEMO_FILES)) endif endif
*** 181,198 **** ################################################################################ # Code coverage data files ifeq ($(GCOV_ENABLED), true) ! $(eval $(call SetupCopyFiles,COPY_GCOV_GCNO, \ SRC := $(OUTPUTDIR), \ DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ ! FILES := $(call FindFiles, $(HOTSPOT_OUTPUTDIR) \ ! $(SUPPORT_OUTPUTDIR)/native, *.gcno) \ ! )) ! SYMBOLS_TARGETS += $(COPY_GCOV_GCNO) endif ################################################################################ # Debug symbols --- 161,185 ---- ################################################################################ # Code coverage data files ifeq ($(GCOV_ENABLED), true) ! GCOV_FIND_EXPR := -type f -name "*.gcno" ! ! $(eval $(call SetupCopyFiles,COPY_HOTSPOT_GCOV_GCNO, \ SRC := $(OUTPUTDIR), \ DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ ! FILES := $(shell $(FIND) $(HOTSPOT_OUTPUTDIR) $(GCOV_FIND_EXPR)))) ! ! SYMBOLS_TARGETS += $(COPY_HOTSPOT_GCOV_GCNO) ! ! $(eval $(call SetupCopyFiles,COPY_JDK_GCOV_GCNO, \ ! SRC := $(OUTPUTDIR), \ ! DEST := $(SYMBOLS_IMAGE_DIR)/gcov, \ ! FILES := $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/native $(GCOV_FIND_EXPR)))) ! SYMBOLS_TARGETS += $(COPY_JDK_GCOV_GCNO) endif ################################################################################ # Debug symbols
*** 201,211 **** ALL_JDK_MODULES := $(JDK_MODULES) ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \ $(call FindTransitiveDepsForModule, $m))) ! ifeq ($(call isTargetOs, windows), true) LIBS_TARGET_SUBDIR := bin else LIBS_TARGET_SUBDIR := lib endif --- 188,198 ---- ALL_JDK_MODULES := $(JDK_MODULES) ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \ $(call FindTransitiveDepsForModule, $m))) ! ifeq ($(OPENJDK_TARGET_OS), windows) LIBS_TARGET_SUBDIR := bin else LIBS_TARGET_SUBDIR := lib endif
*** 220,234 **** DEBUGINFO_SUFFIXES += .diz else DEBUGINFO_SUFFIXES := .debuginfo .pdb .map # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM # dirs. ! ifeq ($(call isTargetOs, macosx), true) ! $(call FillFindCache, \ ! $(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs) FindDebuginfoFiles = \ ! $(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1))) endif endif # Param 1 - either JDK or JRE SetupCopyDebuginfo = \ --- 207,221 ---- DEBUGINFO_SUFFIXES += .diz else DEBUGINFO_SUFFIXES := .debuginfo .pdb .map # On Macosx, if debug symbols have not been zipped, find all files inside *.dSYM # dirs. ! ifeq ($(OPENJDK_TARGET_OS), macosx) ! $(eval $(call FillCacheFind, \ ! $(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs)) FindDebuginfoFiles = \ ! $(if $(wildcard $1), $(call containing, .dSYM/, $(call CacheFind, $1))) endif endif # Param 1 - either JDK or JRE SetupCopyDebuginfo = \
*** 253,267 **** # before actual target prerequisites are declared. $(eval $(call IncludeCustomExtension, Images-post.gmk)) ################################################################################ ! $(JRE_TARGETS): $(JLINK_JRE_TARGETS) ! $(JDK_TARGETS): $(JLINK_JDK_TARGETS) ! jdk: $(JLINK_JDK_TARGETS) $(JDK_TARGETS) ! jre: $(JLINK_JRE_TARGETS) $(JRE_TARGETS) symbols: $(SYMBOLS_TARGETS) all: jdk jre symbols .PHONY: default all jdk jre symbols --- 240,254 ---- # before actual target prerequisites are declared. $(eval $(call IncludeCustomExtension, Images-post.gmk)) ################################################################################ ! $(JRE_TARGETS): $(TOOL_JRE_TARGETS) ! $(JDK_TARGETS): $(TOOL_JDK_TARGETS) ! jdk: $(TOOL_JDK_TARGETS) $(JDK_TARGETS) ! jre: $(TOOL_JRE_TARGETS) $(JRE_TARGETS) symbols: $(SYMBOLS_TARGETS) all: jdk jre symbols .PHONY: default all jdk jre symbols
< prev index next >