make/Main.gmk
changeset 41260 4f71f07b30d1
parent 41171 407480ec6872
child 41275 0ffcfee0d9a9
equal deleted inserted replaced
41257:65477538bec3 41260:4f71f07b30d1
    91     interim-rmic interim-cldrconverter buildtools-jdk buildtools-modules
    91     interim-rmic interim-cldrconverter buildtools-jdk buildtools-modules
    92 
    92 
    93 ################################################################################
    93 ################################################################################
    94 # Special targets for certain modules
    94 # Special targets for certain modules
    95 
    95 
    96 import-hotspot:
       
    97 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Import.gmk)
       
    98 
       
    99 unpack-sec:
    96 unpack-sec:
   100 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk)
    97 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk)
   101 
    98 
   102 generate-exported-symbols:
    99 generate-exported-symbols:
   103 	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
   100 	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
   104 
   101 
   105 ALL_TARGETS += import-hotspot unpack-sec generate-exported-symbols
   102 ALL_TARGETS += unpack-sec generate-exported-symbols
   106 
   103 
   107 ################################################################################
   104 ################################################################################
   108 # Gensrc targets, generating source before java compilation can be done
   105 # Gensrc targets, generating source before java compilation can be done
   109 #
   106 #
   110 # When creating a BUILDJDK, the java targets have already been built and copied
   107 # When creating a BUILDJDK, the java targets have already been built and copied
   267 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) -f GenerateModuleSummary.gmk)
   264 	+($(CD) $(JDK_TOPDIR)/make && $(MAKE) -f GenerateModuleSummary.gmk)
   268 
   265 
   269 ALL_TARGETS += generate-summary
   266 ALL_TARGETS += generate-summary
   270 
   267 
   271 ################################################################################
   268 ################################################################################
   272 # Strip binaries targets
       
   273 
       
   274 STRIP_MODULES := $(sort $(LIBS_MODULES) $(LAUNCHER_MODULES) $(COPY_MODULES) \
       
   275     $(GENDATA_MODULES))
       
   276 STRIP_TARGETS := $(addsuffix -strip, $(STRIP_MODULES))
       
   277 
       
   278 define DeclareStripRecipe
       
   279   $1-strip:
       
   280 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f StripBinaries.gmk \
       
   281 	    MODULE=$1)
       
   282 endef
       
   283 
       
   284 $(foreach m, $(STRIP_MODULES), $(eval $(call DeclareStripRecipe,$m)))
       
   285 
       
   286 ALL_TARGETS += $(STRIP_TARGETS)
       
   287 
       
   288 ################################################################################
       
   289 # Jmod targets
   269 # Jmod targets
   290 
   270 
   291 JMOD_MODULES := $(ALL_MODULES)
   271 JMOD_MODULES := $(ALL_MODULES)
   292 JMOD_TARGETS := $(addsuffix -jmod, $(JMOD_MODULES))
   272 JMOD_TARGETS := $(addsuffix -jmod, $(JMOD_MODULES))
   293 
   273 
   332 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
   312 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ZipSource.gmk)
   333 
   313 
   334 jrtfs-jar:
   314 jrtfs-jar:
   335 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
   315 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f JrtfsJar.gmk)
   336 
   316 
   337 jimages:
   317 jdk-image:
   338 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jimages)
   318 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jdk)
       
   319 
       
   320 jre-image:
       
   321 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk jre)
       
   322 
       
   323 symbols-image:
       
   324 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols)
   339 
   325 
   340 profiles:
   326 profiles:
   341 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
   327 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
   342 
   328 
   343 mac-bundles-jdk:
   329 mac-bundles-jdk:
   345 
   331 
   346 exploded-image-optimize:
   332 exploded-image-optimize:
   347 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
   333 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
   348 
   334 
   349 ALL_TARGETS += source-tips create-hgtip-files bootcycle-images zip-security \
   335 ALL_TARGETS += source-tips create-hgtip-files bootcycle-images zip-security \
   350     zip-source jrtfs-jar jimages profiles mac-bundles-jdk \
   336     zip-source jrtfs-jar jdk-image jre-image \
       
   337     symbols-image profiles mac-bundles-jdk \
   351     exploded-image-optimize
   338     exploded-image-optimize
   352 
   339 
   353 ################################################################################
   340 ################################################################################
   354 # Docs targets
   341 # Docs targets
   355 
   342 
   546 
   533 
   547   $(JAVA_TARGETS): interim-langtools
   534   $(JAVA_TARGETS): interim-langtools
   548 
   535 
   549   hotspot-ide-project: hotspot exploded-image
   536   hotspot-ide-project: hotspot exploded-image
   550 
   537 
   551   import-hotspot: hotspot
       
   552 
       
   553   generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
   538   generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
   554 
   539 
   555   $(LIBS_TARGETS): import-hotspot
   540   $(LIBS_TARGETS): hotspot
   556 
   541 
   557   $(LAUNCHER_TARGETS): java.base-libs
   542   $(LAUNCHER_TARGETS): java.base-libs
   558 
   543 
   559   ifeq ($(STATIC_BUILD), true)
   544   ifeq ($(STATIC_BUILD), true)
   560     $(LAUNCHER_TARGETS): generate-exported-symbols
   545     $(LAUNCHER_TARGETS): generate-exported-symbols
   605   jdk.vm.ci-gensrc-hotspot: java.base-java
   590   jdk.vm.ci-gensrc-hotspot: java.base-java
   606 
   591 
   607   # Explicitly add dependencies for special targets
   592   # Explicitly add dependencies for special targets
   608   java.base-java: unpack-sec
   593   java.base-java: unpack-sec
   609 
   594 
   610   # The copy target copies files generated by gensrc
       
   611   java.base-copy-hotspot: java.base-gensrc-hotspot
       
   612 
       
   613   jdk.jdeps-gendata: java rmic
   595   jdk.jdeps-gendata: java rmic
   614 
       
   615   # Declare dependencies from <module>-strip to libs, launchers, gendata and copy
       
   616   $(foreach m, $(LIBS_MODULES), $(eval $m-strip: $m-libs))
       
   617   $(foreach m, $(LAUNCHER_MODULES), $(eval $m-strip: $m-launchers))
       
   618   $(foreach m, $(GENDATA_MODULES), $(eval $m-strip: $m-gendata))
       
   619   $(foreach m, $(COPY_MODULES), $(eval $m-strip: $m-copy))
       
   620 
   596 
   621   # Declare dependencies between jmod targets. Only java.base jmod needs access
   597   # Declare dependencies between jmod targets. Only java.base jmod needs access
   622   # to the other jmods to be built.
   598   # to the other jmods to be built.
   623   # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
   599   # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
   624   # we don't need to depend on all other jmods
   600   # we don't need to depend on all other jmods
   626     java.base-jmod: $(filter-out java.base-jmod \
   602     java.base-jmod: $(filter-out java.base-jmod \
   627         $(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS))
   603         $(addsuffix -jmod, $(call FindAllUpgradeableModules)), $(JMOD_TARGETS))
   628   endif
   604   endif
   629 
   605 
   630   # Declare dependencies from <module>-jmod to all other module targets
   606   # Declare dependencies from <module>-jmod to all other module targets
   631   $(foreach m, $(STRIP_MODULES), $(eval $m-jmod: $m-strip))
       
   632   # When creating a BUILDJDK, the java compilation has already been done by the
   607   # When creating a BUILDJDK, the java compilation has already been done by the
   633   # normal build and copied in.
   608   # normal build and copied in.
   634   ifneq ($(CREATING_BUILDJDK), true)
   609   ifneq ($(CREATING_BUILDJDK), true)
   635     $(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java))
   610     $(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java))
   636   endif
   611   endif
   676       # classlist.
   651       # classlist.
   677       generate-classlist: interim-image
   652       generate-classlist: interim-image
   678     endif
   653     endif
   679     generate-classlist: buildtools-jdk
   654     generate-classlist: buildtools-jdk
   680 
   655 
   681     jimages: generate-classlist
   656     jdk-image jre-image: generate-classlist
   682   endif
   657   endif
   683 
   658 
   684   jimages: jmods zip-source source-tips demos samples jrtfs-jar
   659   jdk-image: jmods zip-source source-tips demos samples jrtfs-jar
       
   660   jre-image: jmods source-tips jrtfs-jar
   685 
   661 
   686   profiles: jmods zip-source source-tips jrtfs-jar
   662   profiles: jmods zip-source source-tips jrtfs-jar
   687 
   663 
   688   mac-bundles-jdk: jimages
   664   mac-bundles-jdk: jdk-image jre-image
   689 
   665 
   690   exploded-image-optimize: exploded-image-base buildtools-modules
   666   exploded-image-optimize: exploded-image-base buildtools-modules
   691 
   667 
   692   bootcycle-images: jimages
   668   bootcycle-images: jdk-image
   693 
   669 
   694   docs-javadoc: $(GENSRC_TARGETS) rmic
   670   docs-javadoc: $(GENSRC_TARGETS) rmic
   695 
   671 
   696   docs-jvmtidoc: hotspot
   672   docs-jvmtidoc: hotspot
   697 
   673 
   698   zip-docs: docs-javadoc docs-jvmtidoc
   674   zip-docs: docs-javadoc docs-jvmtidoc
   699 
   675 
   700   test: jimages test-image
   676   test: jdk-image test-image
   701 
   677 
   702   create-buildjdk-copy: jdk.jlink-java java.base-gendata \
   678   create-buildjdk-copy: jdk.jlink-java java.base-gendata \
   703       $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
   679       $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
   704 
   680 
   705   create-buildjdk-interim-image: create-buildjdk-copy
   681   create-buildjdk-interim-image: create-buildjdk-copy
   714 
   690 
   715   test-failure-handler: build-test-failure-handler
   691   test-failure-handler: build-test-failure-handler
   716 
   692 
   717   test-image-failure-handler: build-test-failure-handler
   693   test-image-failure-handler: build-test-failure-handler
   718 
   694 
   719   build-test-hotspot-jtreg-native: buildtools-jdk import-hotspot
   695   build-test-hotspot-jtreg-native: buildtools-jdk hotspot
   720 
   696 
   721   build-test-jdk-jtreg-native: buildtools-jdk
   697   build-test-jdk-jtreg-native: buildtools-jdk
   722 
   698 
   723   test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
   699   test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
   724 
   700 
   726 
   702 
   727   test-image-hotspot-gtest: hotspot
   703   test-image-hotspot-gtest: hotspot
   728 
   704 
   729   test-hotspot-internal: exploded-image
   705   test-hotspot-internal: exploded-image
   730 
   706 
   731   test-hotspot-jtreg: jimages test-image
   707   test-hotspot-jtreg: jdk-image test-image
   732 
   708 
   733   test-hotspot-gtest: exploded-image test-image-hotspot-gtest
   709   test-hotspot-gtest: exploded-image test-image-hotspot-gtest
   734 
   710 
   735   install: product-images
   711   install: product-images
   736 
   712 
   763 libs: $(LIBS_TARGETS)
   739 libs: $(LIBS_TARGETS)
   764 
   740 
   765 launchers: $(LAUNCHER_TARGETS)
   741 launchers: $(LAUNCHER_TARGETS)
   766 
   742 
   767 jmods: $(JMOD_TARGETS)
   743 jmods: $(JMOD_TARGETS)
   768 
       
   769 strip-binaries: $(STRIP_TARGETS)
       
   770 
   744 
   771 # Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
   745 # Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
   772 # is actually handled by jdk.jdi-gensrc
   746 # is actually handled by jdk.jdi-gensrc
   773 jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
   747 jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
   774 
   748 
   796 # The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
   770 # The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
   797 # and in line with this, our targets for creating these are named *-image[s].
   771 # and in line with this, our targets for creating these are named *-image[s].
   798 
   772 
   799 # This target builds the product images, e.g. the JRE and JDK image
   773 # This target builds the product images, e.g. the JRE and JDK image
   800 # (and possibly other, more specific versions)
   774 # (and possibly other, more specific versions)
   801 product-images: jimages demos samples zip-security exploded-image
   775 product-images: jdk-image jre-image symbols-image exploded-image
       
   776 
       
   777 # zip-security is actually a bundle, but for now it needs to be considered
       
   778 # an image until this can be cleaned up properly.
       
   779 product-images: zip-security
   802 
   780 
   803 # The module summary cannot be run when:
   781 # The module summary cannot be run when:
   804 # * Cross compiling and building a partial BUILDJDK for the build host
   782 # * Cross compiling and building a partial BUILDJDK for the build host
   805 # * An external buildjdk has been supplied since it may not match the
   783 # * An external buildjdk has been supplied since it may not match the
   806 #   module selection of the target jdk
   784 #   module selection of the target jdk