make/Main.gmk
changeset 48918 18debf414948
parent 48841 0937e5f799df
child 49133 a5b237cfccef
equal deleted inserted replaced
48917:37beaca49e63 48918:18debf414948
   639 
   639 
   640   hotspot-ide-project: hotspot exploded-image
   640   hotspot-ide-project: hotspot exploded-image
   641 
   641 
   642   generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
   642   generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
   643 
   643 
       
   644   # If not already set, set the JVM variant target so that the JVM will be built.
       
   645   JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
       
   646 
   644   # Building one JVM variant is enough to start building the other libs
   647   # Building one JVM variant is enough to start building the other libs
   645   $(LIBS_TARGETS): hotspot-$(JVM_VARIANT_MAIN)-libs
   648   $(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
   646 
   649 
   647   $(LAUNCHER_TARGETS): java.base-libs
   650   $(LAUNCHER_TARGETS): java.base-libs
   648 
   651 
   649   ifeq ($(STATIC_BUILD), true)
   652   ifeq ($(STATIC_BUILD), true)
   650     $(LAUNCHER_TARGETS): generate-exported-symbols
   653     $(LAUNCHER_TARGETS): generate-exported-symbols
   717   # we don't need to depend on all other jmods
   720   # we don't need to depend on all other jmods
   718   ifneq ($(CREATING_BUILDJDK), true)
   721   ifneq ($(CREATING_BUILDJDK), true)
   719     java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
   722     java.base-jmod: jrtfs-jar $(filter-out java.base-jmod, $(JMOD_TARGETS))
   720   endif
   723   endif
   721 
   724 
   722   # Building java.base-jmod requires all of hotspot to be built.
   725   # If not already set, set the JVM target so that the JVM will be built.
   723   java.base-jmod: hotspot
   726   JVM_MAIN_TARGETS ?= hotspot
       
   727    
       
   728   # Building java.base-jmod requires all of VM (ie hotspot) to be built.
       
   729   java.base-jmod: $(JVM_MAIN_TARGETS) 
   724 
   730 
   725   # Declare dependencies from <module>-jmod to all other module targets
   731   # Declare dependencies from <module>-jmod to all other module targets
   726   # When creating a BUILDJDK, the java compilation has already been done by the
   732   # When creating a BUILDJDK, the java compilation has already been done by the
   727   # normal build and copied in.
   733   # normal build and copied in.
   728   ifneq ($(CREATING_BUILDJDK), true)
   734   ifneq ($(CREATING_BUILDJDK), true)
   744   # For the exploded image to be runnable, all java modules and
   750   # For the exploded image to be runnable, all java modules and
   745   # jdk.jlink-launchers need to be built. We also need to copy jvm.cfg (done
   751   # jdk.jlink-launchers need to be built. We also need to copy jvm.cfg (done
   746   # in java.base-copy) and tzdb.dat (done in java.base-gendata) to the
   752   # in java.base-copy) and tzdb.dat (done in java.base-gendata) to the
   747   # appropriate location otherwise jimage, jlink and jmod won't start. This
   753   # appropriate location otherwise jimage, jlink and jmod won't start. This
   748   # also applies when creating the buildjdk.
   754   # also applies when creating the buildjdk.
   749   DEFAULT_JMOD_DEPS := java.base-libs java.base-copy java.base-gendata \
   755   DEFAULT_JMOD_DEPS += java.base-libs java.base-copy java.base-gendata \
   750       jdk.jlink-launchers
   756       jdk.jlink-launchers
   751   # When cross compiling and buildjdk is to be created, depend on creating the
   757   # When cross compiling and buildjdk is to be created, depend on creating the
   752   # buildjdk instead of the default dependencies.
   758   # buildjdk instead of the default dependencies.
   753   ifeq ($(CREATE_BUILDJDK), true)
   759   ifeq ($(CREATE_BUILDJDK), true)
   754     # Avoid calling create-buildjdk from within a create-buildjdk call.
   760     # Avoid calling create-buildjdk from within a create-buildjdk call.
   820 
   826 
   821   docs-javase-api-modulegraph: exploded-image buildtools-modules
   827   docs-javase-api-modulegraph: exploded-image buildtools-modules
   822 
   828 
   823   docs-reference-api-modulegraph: exploded-image buildtools-modules
   829   docs-reference-api-modulegraph: exploded-image buildtools-modules
   824 
   830 
       
   831   # If not already set, then set the JVM specific docs targets
       
   832   JVM_DOCS_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
       
   833   
   825   # The gensrc steps for hotspot and jdk.jdi create html spec files.
   834   # The gensrc steps for hotspot and jdk.jdi create html spec files.
   826   docs-jdk-specs: hotspot-$(JVM_VARIANT_MAIN)-gensrc jdk.jdi-gensrc \
   835   docs-jdk-specs: $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
   827       docs-jdk-index
   836       docs-jdk-index
   828 
   837 
   829   docs-jdk-index: exploded-image buildtools-modules
   838   docs-jdk-index: exploded-image buildtools-modules
   830 
   839 
   831   docs-zip: docs-jdk
   840   docs-zip: docs-jdk
   888 endif
   897 endif
   889 
   898 
   890 ################################################################################
   899 ################################################################################
   891 # Virtual targets without recipes
   900 # Virtual targets without recipes
   892 
   901 
       
   902 # If not already set, set the JVM specific tools targets
       
   903 JVM_TOOLS_TARGETS ?= buildtools-hotspot
   893 buildtools: buildtools-langtools interim-langtools interim-rmic \
   904 buildtools: buildtools-langtools interim-langtools interim-rmic \
   894     buildtools-jdk buildtools-hotspot
   905     buildtools-jdk $(JVM_TOOLS_TARGETS)
   895 
   906 
   896 hotspot: $(HOTSPOT_VARIANT_TARGETS) hotspot-jsig
   907 hotspot: $(HOTSPOT_VARIANT_TARGETS) hotspot-jsig
   897 
   908 
   898 hotspot-libs: hotspot-jsig
   909 hotspot-libs: hotspot-jsig
   899 
   910 
   932 $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
   943 $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
   933 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
   944 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
   934 $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
   945 $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
   935 
   946 
   936 # Building java.base includes building all of hotspot.
   947 # Building java.base includes building all of hotspot.
   937 java.base: hotspot
   948 java.base: $(JVM_MAIN_TARGETS)
   938 
   949 
   939 demos: demos-jdk
   950 demos: demos-jdk
   940 
   951 
   941 # The "exploded image" is a locally runnable JDK in $(OUTPUTDIR)/jdk.
   952 # The "exploded image" is a locally runnable JDK in $(OUTPUTDIR)/jdk.
   942 exploded-image-base: $(ALL_MODULES)
   953 exploded-image-base: $(ALL_MODULES)
   999 endif
  1010 endif
  1000 
  1011 
  1001 # This target builds the documentation image
  1012 # This target builds the documentation image
  1002 docs-image: docs-jdk
  1013 docs-image: docs-jdk
  1003 
  1014 
       
  1015 # If not already set, set the JVM specific targets to build the test image
       
  1016 JVM_TEST_IMAGE_TARGETS ?= test-image-hotspot-jtreg-native test-image-hotspot-gtest
       
  1017 
  1004 # This target builds the test image
  1018 # This target builds the test image
  1005 test-image: prepare-test-image test-image-hotspot-jtreg-native \
  1019 test-image: prepare-test-image \
  1006     test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest \
  1020     test-image-jdk-jtreg-native test-image-failure-handler \
  1007     test-image-demos-jdk
  1021     test-image-demos-jdk $(JVM_TEST_IMAGE_TARGETS)
       
  1022 
       
  1023 ################################################################################
  1008 
  1024 
  1009 # all-images builds all our deliverables as images.
  1025 # all-images builds all our deliverables as images.
  1010 all-images: product-images test-image docs-image
  1026 all-images: product-images test-image docs-image
  1011 
  1027 
  1012 # all-bundles packages all our deliverables as tar.gz bundles.
  1028 # all-bundles packages all our deliverables as tar.gz bundles.
  1141 	  $(call LogInfo, Generating main target list)
  1157 	  $(call LogInfo, Generating main target list)
  1142 	  @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
  1158 	  @$(ECHO) ALL_MAIN_TARGETS := $(sort $(ALL_TARGETS)) > \
  1143 	      $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
  1159 	      $(MAKESUPPORT_OUTPUTDIR)/main-targets.gmk
  1144 
  1160 
  1145 ################################################################################
  1161 ################################################################################
       
  1162 # Hook to include the corresponding custom file, if present.
       
  1163 $(eval $(call IncludeCustomExtension, Main-post.gmk))
  1146 
  1164 
  1147 .PHONY: $(ALL_TARGETS)
  1165 .PHONY: $(ALL_TARGETS)
  1148 
  1166 
  1149 FRC: # Force target
  1167 FRC: # Force target