make/Images.gmk
branchihse-cflags-rewrite-branch
changeset 56726 3a9b7a1f9197
parent 50490 cbae0e359538
child 51215 936823fcf202
equal deleted inserted replaced
56313:d287dfac1304 56726:3a9b7a1f9197
    45 
    45 
    46 JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
    46 JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
    47     $(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
    47     $(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
    48 JDK_MODULES += $(ALL_MODULES)
    48 JDK_MODULES += $(ALL_MODULES)
    49 
    49 
    50 # Modules list for compact builds
       
    51 JRE_COMPACT1_MODULES := \
       
    52     java.logging \
       
    53     java.scripting \
       
    54     jdk.localedata \
       
    55     jdk.crypto.cryptoki \
       
    56     jdk.crypto.ec \
       
    57     jdk.unsupported \
       
    58     #
       
    59 
       
    60 JRE_COMPACT2_MODULES := \
       
    61     $(JRE_COMPACT1_MODULES) \
       
    62     java.rmi \
       
    63     java.sql \
       
    64     java.xml \
       
    65     jdk.xml.dom \
       
    66     jdk.httpserver \
       
    67     #
       
    68 
       
    69 JRE_COMPACT3_MODULES := \
       
    70     $(JRE_COMPACT2_MODULES) \
       
    71     java.smartcardio \
       
    72     java.compiler \
       
    73     java.instrument \
       
    74     java.management \
       
    75     java.management.rmi \
       
    76     java.naming \
       
    77     java.prefs \
       
    78     java.security.jgss \
       
    79     java.security.sasl \
       
    80     java.sql.rowset \
       
    81     java.xml.crypto \
       
    82     jdk.management \
       
    83     jdk.naming.dns \
       
    84     jdk.naming.rmi \
       
    85     jdk.sctp \
       
    86     jdk.security.auth \
       
    87     #
       
    88 
       
    89 JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))
    50 JRE_MODULES_LIST := $(call CommaList, $(JRE_MODULES))
    90 JDK_MODULES_LIST := $(call CommaList, $(JDK_MODULES))
    51 JDK_MODULES_LIST := $(call CommaList, $(JDK_MODULES))
    91 JRE_COMPACT1_MODULES_LIST := $(call CommaList, $(JRE_COMPACT1_MODULES))
       
    92 JRE_COMPACT2_MODULES_LIST := $(call CommaList, $(JRE_COMPACT2_MODULES))
       
    93 JRE_COMPACT3_MODULES_LIST := $(call CommaList, $(JRE_COMPACT3_MODULES))
       
    94 
    52 
    95 ################################################################################
    53 ################################################################################
    96 
    54 
    97 BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
    55 BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
    98 
    56 
   115     /jdk.localedata/** \
    73     /jdk.localedata/** \
   116     #
    74     #
   117 
    75 
   118 JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
    76 JLINK_TOOL := $(JLINK) -J-Djlink.debug=true \
   119     --module-path $(IMAGES_OUTPUTDIR)/jmods \
    77     --module-path $(IMAGES_OUTPUTDIR)/jmods \
   120     --endian $(OPENJDK_BUILD_CPU_ENDIAN) \
    78     --endian $(OPENJDK_TARGET_CPU_ENDIAN) \
   121     --release-info $(BASE_RELEASE_FILE) \
    79     --release-info $(BASE_RELEASE_FILE) \
   122     --order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
    80     --order-resources=$(call CommaList, $(JLINK_ORDER_RESOURCES)) \
   123     --dedup-legal-notices=error-if-not-same-content \
    81     --dedup-legal-notices=error-if-not-same-content \
   124     $(JLINK_JLI_CLASSES) \
    82     $(JLINK_JLI_CLASSES) \
   125     #
    83     #
   130   JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
    88   JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
   131 endif
    89 endif
   132 
    90 
   133 $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
    91 $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
   134     $(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
    92     $(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
   135 	$(ECHO) Creating jdk jimage
    93 	$(ECHO) Creating jdk image
   136 	$(RM) -r $(JDK_IMAGE_DIR)
    94 	$(RM) -r $(JDK_IMAGE_DIR)
   137 	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \
    95 	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \
   138 	    $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
    96 	    $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
   139 	        $(JLINK_JDK_EXTRA_OPTS) \
    97 	        $(JLINK_JDK_EXTRA_OPTS) \
   140 	        --output $(JDK_IMAGE_DIR) \
    98 	        --output $(JDK_IMAGE_DIR) \
   141 	)
    99 	)
   142 	$(TOUCH) $@
   100 	$(TOUCH) $@
   143 
   101 
   144 $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
   102 $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
   145     $(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
   103     $(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
   146 	$(ECHO) Creating jre jimage
   104 	$(ECHO) Creating legacy jre image
   147 	$(RM) -r $(JRE_IMAGE_DIR)
   105 	$(RM) -r $(JRE_IMAGE_DIR)
   148 	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \
   106 	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \
   149 	    $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
   107 	    $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
   150 	        $(JLINK_JRE_EXTRA_OPTS) \
   108 	        $(JLINK_JRE_EXTRA_OPTS) \
   151 	        --output $(JRE_IMAGE_DIR) \
   109 	        --output $(JRE_IMAGE_DIR) \
   152 	)
   110 	)
   153 	$(TOUCH) $@
   111 	$(TOUCH) $@
   154 
   112 
   155 
       
   156 $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
       
   157     $(call DependOnVariable, JRE_COMPACT1_MODULES_LIST) $(BASE_RELEASE_FILE)
       
   158 	$(ECHO) Creating jre compact1 jimage
       
   159 	$(RM) -r $(JRE_COMPACT1_IMAGE_DIR)
       
   160 	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact1, \
       
   161 	    $(JLINK_TOOL) --add-modules $(JRE_COMPACT1_MODULES_LIST) \
       
   162 	        $(JLINK_JRE_EXTRA_OPTS) \
       
   163 	        --output $(JRE_COMPACT1_IMAGE_DIR) \
       
   164 	)
       
   165 	$(TOUCH) $@
       
   166 
       
   167 $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
       
   168     $(call DependOnVariable, JRE_COMPACT2_MODULES_LIST) $(BASE_RELEASE_FILE)
       
   169 	$(ECHO) Creating jre compact2 jimage
       
   170 	$(RM) -r $(JRE_COMPACT2_IMAGE_DIR)
       
   171 	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact2, \
       
   172 	    $(JLINK_TOOL) --add-modules $(JRE_COMPACT2_MODULES_LIST) \
       
   173 	        $(JLINK_JRE_EXTRA_OPTS) \
       
   174 	        --output $(JRE_COMPACT2_IMAGE_DIR) \
       
   175 	)
       
   176 	$(TOUCH) $@
       
   177 
       
   178 $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
       
   179     $(call DependOnVariable, JRE_COMPACT3_MODULES_LIST) $(BASE_RELEASE_FILE)
       
   180 	$(ECHO) Creating jre compact3 jimage
       
   181 	$(RM) -r $(JRE_COMPACT3_IMAGE_DIR)
       
   182 	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre_compact3, \
       
   183 	    $(JLINK_TOOL) --add-modules $(JRE_COMPACT3_MODULES_LIST) \
       
   184 	        $(JLINK_JRE_EXTRA_OPTS) \
       
   185 	        --output $(JRE_COMPACT3_IMAGE_DIR) \
       
   186 	)
       
   187 	$(TOUCH) $@
       
   188 
       
   189 TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
   113 TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
   190 TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
   114 TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
   191 TOOL_JRE_COMPACT1_TARGETS := $(JRE_COMPACT1_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
       
   192 TOOL_JRE_COMPACT2_TARGETS := $(JRE_COMPACT2_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
       
   193 TOOL_JRE_COMPACT3_TARGETS := $(JRE_COMPACT3_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
       
   194 
   115 
   195 ################################################################################
   116 ################################################################################
   196 # /man dir
   117 # /man dir
   197 #
   118 #
   198 # All variables in this section are assigned with simple =, without :, to enable
   119 # All variables in this section are assigned with simple =, without :, to enable
   211       servertool.1 \
   132       servertool.1 \
   212       unpack200.1
   133       unpack200.1
   213 
   134 
   214   JDK_MAN_PAGES += \
   135   JDK_MAN_PAGES += \
   215       $(JRE_MAN_PAGES) \
   136       $(JRE_MAN_PAGES) \
   216       appletviewer.1 \
       
   217       idlj.1 \
   137       idlj.1 \
   218       jar.1 \
   138       jar.1 \
   219       jarsigner.1 \
   139       jarsigner.1 \
   220       javac.1 \
   140       javac.1 \
   221       javadoc.1 \
   141       javadoc.1 \
   440 jre: $(TOOL_JRE_TARGETS) $(JRE_TARGETS)
   360 jre: $(TOOL_JRE_TARGETS) $(JRE_TARGETS)
   441 symbols: $(SYMBOLS_TARGETS)
   361 symbols: $(SYMBOLS_TARGETS)
   442 
   362 
   443 all: jdk jre symbols
   363 all: jdk jre symbols
   444 
   364 
   445 $(JRE_COMPACT1_TARGETS): $(TOOL_JRE_COMPACT1_TARGETS)
   365 .PHONY: default all jdk jre symbols
   446 $(JRE_COMPACT2_TARGETS): $(TOOL_JRE_COMPACT2_TARGETS)
       
   447 $(JRE_COMPACT3_TARGETS): $(TOOL_JRE_COMPACT3_TARGETS)
       
   448 
       
   449 profiles: $(TOOL_JRE_COMPACT1_TARGETS) \
       
   450     $(TOOL_JRE_COMPACT2_TARGETS) \
       
   451     $(TOOL_JRE_COMPACT3_TARGETS) \
       
   452     $(JRE_COMPACT1_TARGETS) \
       
   453     $(JRE_COMPACT2_TARGETS) \
       
   454     $(JRE_COMPACT3_TARGETS)
       
   455 
       
   456 .PHONY: default all jdk jre symbols profiles