324 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols)
325
326 profiles:
327 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
328
329 mac-bundles-jdk:
330 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
331
332 exploded-image-optimize:
333 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
334
335 ALL_TARGETS += source-tips create-hgtip-files bootcycle-images zip-security \
336 zip-source jrtfs-jar jdk-image jre-image \
337 symbols-image profiles mac-bundles-jdk \
338 exploded-image-optimize
339
340 ################################################################################
341 # Docs targets
342
343 docs-javadoc:
344 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
345
346 docs-jvmtidoc:
347 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk jvmtidocs)
348
349 zip-docs:
350 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk zip-docs)
351
352 ALL_TARGETS += docs-javadoc docs-jvmtidoc zip-docs
353
354 ################################################################################
355 # Cross compilation support
356
357 ifeq ($(CREATING_BUILDJDK), true)
358 # This target is only called by the recursive call below.
359 create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
360 java.base-copy jdk.jdeps-launchers
361 endif
362
363 create-buildjdk-copy:
364 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
365
366 create-buildjdk-interim-image:
367 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
368 $@-helper \
369 SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
370 HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
371 CREATING_BUILDJDK=true)
372
666 jdk-image jre-image: generate-classlist
667 endif
668
669 jdk-image: jmods zip-source source-tips demos samples jrtfs-jar
670 jre-image: jmods source-tips jrtfs-jar
671
672 profiles: jmods zip-source source-tips jrtfs-jar
673
674 mac-bundles-jdk: jdk-image jre-image
675
676 # The optimize target can run as soon as the modules dir has been completely
677 # populated (java, copy and gendata targets) and the basic libs and launchers
678 # have been built.
679 exploded-image-optimize: java copy gendata java.base-libs java.base-launchers \
680 buildtools-modules
681
682 bootcycle-images: jdk-image
683
684 docs-javadoc: $(GENSRC_TARGETS) rmic
685
686 docs-jvmtidoc: hotspot
687
688 zip-docs: docs-javadoc docs-jvmtidoc
689
690 test: jdk-image test-image
691
692 create-buildjdk-copy: jdk.jlink-java java.base-gendata \
693 $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
694
695 create-buildjdk-interim-image: create-buildjdk-copy
696
697 interim-image: $(addsuffix -jmod, $(INTERIM_IMAGE_MODULES))
698
699 test-make: clean-test-make
700
701 build-test-lib: exploded-image-optimize
702
703 build-test-failure-handler: interim-langtools
704
705 test-failure-handler: build-test-failure-handler
706
707 test-image-failure-handler: build-test-failure-handler
708
795
796 # zip-security is actually a bundle, but for now it needs to be considered
797 # an image until this can be cleaned up properly.
798 product-images: zip-security
799
800 # The module summary cannot be run when:
801 # * Cross compiling and building a partial BUILDJDK for the build host
802 # * An external buildjdk has been supplied since it may not match the
803 # module selection of the target jdk
804 ifneq ($(CREATE_BUILDJDK), true)
805 ifeq ($(EXTERNAL_BUILDJDK), false)
806 product-images: generate-summary
807 endif
808 endif
809
810 ifeq ($(OPENJDK_TARGET_OS), macosx)
811 product-images: mac-bundles
812 endif
813
814 # This target builds the documentation image
815 docs-image: docs-javadoc docs-jvmtidoc
816
817 # This target builds the test image
818 test-image: prepare-test-image test-image-hotspot-jtreg-native \
819 test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest
820
821 # all-images builds all our deliverables as images.
822 all-images: product-images test-image docs-image
823
824 # all-bundles packages all our deliverables as tar.gz bundles.
825 all-bundles: product-bundles test-bundles docs-bundles
826
827 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \
828 jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples \
829 exploded-image-base exploded-image \
830 create-buildjdk mac-bundles product-images docs-image test-image all-images \
831 all-bundles
832
833 ################################################################################
834
835 # Traditional targets typically run by users.
843 all: all-images
844
845 ALL_TARGETS += default jdk images docs bundles all
846
847 ################################################################################
848 ################################################################################
849 #
850 # Clean targets
851 #
852 ################################################################################
853 # Clean targets are automatically run serially by the Makefile calling this
854 # file.
855
856 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
857 images make-support test-make bundles buildjdk
858 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
859 CLEAN_SUPPORT_DIRS += demos
860 CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
861 CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
862 CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
863 CLEAN_PHASES := gensrc java native include docs
864 CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
865 CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
866 # Construct targets of the form clean-$module-$phase
867 CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
868 $(addprefix $m-, $(CLEAN_PHASES))))
869
870 # Remove everything, except the output from configure.
871 clean: $(CLEAN_DIR_TARGETS)
872 ($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*)
873 $(ECHO) Cleaned all build artifacts.
874
875 $(CLEAN_DIR_TARGETS):
876 $(call CleanDir,$(patsubst clean-%, %, $@))
877
878 $(CLEAN_SUPPORT_DIR_TARGETS):
879 $(call CleanSupportDir,$(patsubst clean-%, %, $@))
880
881 $(CLEAN_TEST_TARGETS):
882 $(call CleanTest,$(patsubst clean-test-%, %, $@))
883
884 $(CLEAN_PHASE_TARGETS):
885 $(call Clean-$(patsubst clean-%,%, $@))
886
887 $(CLEAN_MODULE_TARGETS):
888 $(call CleanModule,$(patsubst clean-%, %, $@))
889
890 $(CLEAN_MODULE_PHASE_TARGETS):
891 $(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \
892 $(word 2, $(subst -,$(SPACE),$@)))
893
894 # When removing the support dir, we must also remove jdk. Building classes has
895 # the side effect of generating native headers. The headers end up in support
896 # while classes and touch files end up in jdk.
897 clean-support: clean-jdk
898
899 # Remove everything, including configure configuration. If the output
900 # directory was created by configure and now becomes empty, remove it as well.
901 dist-clean: clean
902 ($(CD) $(OUTPUT_ROOT) && \
903 $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide)
904 $(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
905 if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
906 $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
907 else \
908 ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
909 && $(RM) -r $(OUTPUT_ROOT)) \
910 fi \
911 )
912 $(ECHO) Cleaned everything, you will have to re-run configure.
913
914 ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \
915 $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \
916 $(CLEAN_MODULE_PHASE_TARGETS)
917
918 ################################################################################
919 # Declare *-only targets for each normal target
920 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
921
922 ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS)))
923
924 ################################################################################
925
926 # Include JPRT targets
927 include $(SRC_ROOT)/make/Jprt.gmk
928
929 ################################################################################
930
931 # The following targets are intentionally not added to ALL_TARGETS since they
932 # are internal only, to support Init.gmk.
933
934 print-targets:
|
324 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk symbols)
325
326 profiles:
327 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Images.gmk profiles)
328
329 mac-bundles-jdk:
330 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
331
332 exploded-image-optimize:
333 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f ExplodedImageOptimize.gmk)
334
335 ALL_TARGETS += source-tips create-hgtip-files bootcycle-images zip-security \
336 zip-source jrtfs-jar jdk-image jre-image \
337 symbols-image profiles mac-bundles-jdk \
338 exploded-image-optimize
339
340 ################################################################################
341 # Docs targets
342
343 docs-javadoc:
344 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-javadoc)
345
346 docs-copy:
347 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-copy)
348
349 docs-zip:
350 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs-zip)
351
352 ALL_TARGETS += docs-javadoc docs-copy docs-zip
353
354 ################################################################################
355 # Cross compilation support
356
357 ifeq ($(CREATING_BUILDJDK), true)
358 # This target is only called by the recursive call below.
359 create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
360 java.base-copy jdk.jdeps-launchers
361 endif
362
363 create-buildjdk-copy:
364 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
365
366 create-buildjdk-interim-image:
367 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
368 $@-helper \
369 SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
370 HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
371 CREATING_BUILDJDK=true)
372
666 jdk-image jre-image: generate-classlist
667 endif
668
669 jdk-image: jmods zip-source source-tips demos samples jrtfs-jar
670 jre-image: jmods source-tips jrtfs-jar
671
672 profiles: jmods zip-source source-tips jrtfs-jar
673
674 mac-bundles-jdk: jdk-image jre-image
675
676 # The optimize target can run as soon as the modules dir has been completely
677 # populated (java, copy and gendata targets) and the basic libs and launchers
678 # have been built.
679 exploded-image-optimize: java copy gendata java.base-libs java.base-launchers \
680 buildtools-modules
681
682 bootcycle-images: jdk-image
683
684 docs-javadoc: $(GENSRC_TARGETS) rmic
685
686 docs-copy: hotspot
687
688 docs-zip: docs-javadoc docs-copy
689
690 test: jdk-image test-image
691
692 create-buildjdk-copy: jdk.jlink-java java.base-gendata \
693 $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
694
695 create-buildjdk-interim-image: create-buildjdk-copy
696
697 interim-image: $(addsuffix -jmod, $(INTERIM_IMAGE_MODULES))
698
699 test-make: clean-test-make
700
701 build-test-lib: exploded-image-optimize
702
703 build-test-failure-handler: interim-langtools
704
705 test-failure-handler: build-test-failure-handler
706
707 test-image-failure-handler: build-test-failure-handler
708
795
796 # zip-security is actually a bundle, but for now it needs to be considered
797 # an image until this can be cleaned up properly.
798 product-images: zip-security
799
800 # The module summary cannot be run when:
801 # * Cross compiling and building a partial BUILDJDK for the build host
802 # * An external buildjdk has been supplied since it may not match the
803 # module selection of the target jdk
804 ifneq ($(CREATE_BUILDJDK), true)
805 ifeq ($(EXTERNAL_BUILDJDK), false)
806 product-images: generate-summary
807 endif
808 endif
809
810 ifeq ($(OPENJDK_TARGET_OS), macosx)
811 product-images: mac-bundles
812 endif
813
814 # This target builds the documentation image
815 docs-image: docs-javadoc docs-copy
816
817 # This target builds the test image
818 test-image: prepare-test-image test-image-hotspot-jtreg-native \
819 test-image-jdk-jtreg-native test-image-failure-handler test-image-hotspot-gtest
820
821 # all-images builds all our deliverables as images.
822 all-images: product-images test-image docs-image
823
824 # all-bundles packages all our deliverables as tar.gz bundles.
825 all-bundles: product-bundles test-bundles docs-bundles
826
827 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \
828 jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples \
829 exploded-image-base exploded-image \
830 create-buildjdk mac-bundles product-images docs-image test-image all-images \
831 all-bundles
832
833 ################################################################################
834
835 # Traditional targets typically run by users.
843 all: all-images
844
845 ALL_TARGETS += default jdk images docs bundles all
846
847 ################################################################################
848 ################################################################################
849 #
850 # Clean targets
851 #
852 ################################################################################
853 # Clean targets are automatically run serially by the Makefile calling this
854 # file.
855
856 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
857 images make-support test-make bundles buildjdk
858 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
859 CLEAN_SUPPORT_DIRS += demos
860 CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
861 CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
862 CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
863 CLEAN_PHASES := gensrc java native include
864 CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
865 CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
866 # Construct targets of the form clean-$module-$phase
867 CLEAN_MODULE_PHASE_TARGETS := $(addprefix clean-, $(foreach m, $(ALL_MODULES), \
868 $(addprefix $m-, $(CLEAN_PHASES))))
869
870 # Remove everything, except the output from configure.
871 clean: $(CLEAN_DIR_TARGETS)
872 ($(CD) $(OUTPUT_ROOT) && $(RM) -r build*.log*)
873 $(ECHO) Cleaned all build artifacts.
874
875 clean-docs:
876 $(call CleanDocs)
877
878 $(CLEAN_DIR_TARGETS):
879 $(call CleanDir,$(patsubst clean-%, %, $@))
880
881 $(CLEAN_SUPPORT_DIR_TARGETS):
882 $(call CleanSupportDir,$(patsubst clean-%, %, $@))
883
884 $(CLEAN_TEST_TARGETS):
885 $(call CleanTest,$(patsubst clean-test-%, %, $@))
886
887 $(CLEAN_PHASE_TARGETS):
888 $(call Clean-$(patsubst clean-%,%, $@))
889
890 $(CLEAN_MODULE_TARGETS):
891 $(call CleanModule,$(patsubst clean-%, %, $@))
892
893 $(CLEAN_MODULE_PHASE_TARGETS):
894 $(call Clean-$(word 3, $(subst -,$(SPACE),$@)), \
895 $(word 2, $(subst -,$(SPACE),$@)))
896
897 # When removing the support dir, we must also remove jdk. Building classes has
898 # the side effect of generating native headers. The headers end up in support
899 # while classes and touch files end up in jdk.
900 clean-support: clean-jdk
901
902 # Remove everything, including configure configuration. If the output
903 # directory was created by configure and now becomes empty, remove it as well.
904 dist-clean: clean
905 ($(CD) $(OUTPUT_ROOT) && \
906 $(RM) -r *spec.gmk $(CONFIGURESUPPORT_OUTPUTDIR) Makefile compare.sh ide)
907 $(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
908 if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
909 $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
910 else \
911 ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
912 && $(RM) -r $(OUTPUT_ROOT)) \
913 fi \
914 )
915 $(ECHO) Cleaned everything, you will have to re-run configure.
916
917 ALL_TARGETS += clean clean-docs dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_SUPPORT_DIR_TARGETS) \
918 $(CLEAN_TEST_TARGETS) $(CLEAN_PHASE_TARGETS) $(CLEAN_MODULE_TARGETS) \
919 $(CLEAN_MODULE_PHASE_TARGETS)
920
921 ################################################################################
922 # Declare *-only targets for each normal target
923 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
924
925 ALL_TARGETS += $(addsuffix -only, $(filter-out dist-clean clean%, $(ALL_TARGETS)))
926
927 ################################################################################
928
929 # Include JPRT targets
930 include $(SRC_ROOT)/make/Jprt.gmk
931
932 ################################################################################
933
934 # The following targets are intentionally not added to ALL_TARGETS since they
935 # are internal only, to support Init.gmk.
936
937 print-targets:
|