331 ALL_TARGETS += source-tips bootcycle-images zip-security zip-source \
332 jrtfs-jar jimages profiles mac-bundles-jdk
333
334 ################################################################################
335 # Docs targets
336
337 docs-javadoc:
338 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
339
340 docs-jvmtidoc:
341 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk jvmtidocs)
342
343 zip-docs:
344 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk zip-docs)
345
346 ALL_TARGETS += docs-javadoc docs-jvmtidoc zip-docs
347
348 ################################################################################
349 # Cross compilation support
350
351 ifeq ($(CREATE_BUILDJDK), true)
352 # This target is only called by the recursive call below.
353 create-buildjdk-compile-hotspot-helper: hotspot
354 create-buildjdk-compile-modules-helper: jdk.jlink-launchers java.base-copy \
355 jdk.jdeps-launchers
356 endif
357
358 create-buildjdk-copy:
359 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
360
361 create-buildjdk-compile-hotspot create-buildjdk-compile-modules:
362 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
363 $@-helper \
364 SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
365 HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
366 CREATING_BUILDJDK=true)
367
368 ALL_TARGETS += create-buildjdk-copy create-buildjdk-compile-hotspot \
369 create-buildjdk-compile-modules
370
371 ################################################################################
372 # Build tests
373 #
374
375 prepare-test-image:
376 $(MKDIR) -p $(TEST_IMAGE_DIR)
377 $(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
378
379 build-test-hotspot-jtreg-native:
380 +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
381 build-test-hotspot-jtreg-native)
382
383 test-image-hotspot-jtreg-native:
384 +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
385 test-image-hotspot-jtreg-native)
386
387 build-test-jdk-jtreg-native:
388 +($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
389 build-test-jdk-jtreg-native)
505 $(LAUNCHER_TARGETS): generate-exported-symbols
506 endif
507
508 # The demos are currently linking to libjvm and libjava, just like all other
509 # jdk libs, even though they don't need to. To avoid warnings, make sure they
510 # aren't built until after libjava and libjvm are available to link to.
511 demos-jdk: $(JAVA_TARGETS)
512
513 # Declare dependency from <module>-java to <module>-gensrc
514 $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
515
516 # Declare dependencies between java modules
517 $(foreach m, $(JAVA_MODULES), \
518 $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
519 $(call FindDepsForModule,$m)))))
520
521 # Declare dependencies between <module>-rmic to <module>-java
522 $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
523
524 # Declare dependencies from <module>-lib to <module>-java
525 # Skip modules that do not have java source. When creating a BUILD_JDK, the
526 # java compilation has already been done by the normal build and copied in.
527 ifneq ($(CREATING_BUILDJDK), true)
528 $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
529 endif
530
531 # Declare dependencies from all other <module>-lib to java.base-lib
532 $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
533 $(eval $t: java.base-libs))
534
535 # jdk.accessibility depends on java.desktop
536 jdk.accessibility-libs: java.desktop-libs
537
538 # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
539 # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
540 # virtual target.
541 jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
542
543 # The swing beans need to have java base properly generated to avoid errors
544 # in javadoc.
545 java.desktop-gensrc-jdk: java.base-gensrc
546
547 # The annotation processing for jdk.vm.ci needs java.base classes from the
548 # current JDK.
549 jdk.vm.ci-gensrc-hotspot: java.base-java
550
551 # Explicitly add dependencies for special targets
552 java.base-java: unpack-sec
553
554 # The copy target copies files generated by gensrc
555 java.base-copy-hotspot: java.base-gensrc-hotspot
556
557 jdk.jdeps-gendata: java rmic
558
559 # Declare dependencies from <module>-strip to libs, launchers, gendata and copy
560 $(foreach m, $(LIBS_MODULES), $(eval $m-strip: $m-libs))
561 $(foreach m, $(LAUNCHER_MODULES), $(eval $m-strip: $m-launchers))
562 $(foreach m, $(GENDATA_MODULES), $(eval $m-strip: $m-gendata))
563 $(foreach m, $(COPY_MODULES), $(eval $m-strip: $m-copy))
564
565 # Declare dependencies between jmod targets. Only java.base jmod needs access
566 # to the other jmods to be built.
567 java.base-jmod: $(filter-out java.base-jmod, $(JMOD_TARGETS))
568
569 # Declare dependencies from <module>-jmod to all other module targets
570 $(foreach m, $(STRIP_MODULES), $(eval $m-jmod: $m-strip))
571 $(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java))
572 $(foreach m, $(GENDATA_MODULES), $(eval $m-jmod: $m-gendata))
573 $(foreach m, $(RMIC_MODULES), $(eval $m-jmod: $m-rmic))
574 $(foreach m, $(LIBS_MODULES), $(eval $m-jmod: $m-libs))
575 $(foreach m, $(LAUNCHER_MODULES), $(eval $m-jmod: $m-launchers))
576 $(foreach m, $(COPY_MODULES), $(eval $m-jmod: $m-copy))
577
578 # Jmods cannot be created until we have the jlink tool ready to run, which requires
579 # all java modules to be compiled and jdk.jlink-launchers.
580 $(JMOD_TARGETS): java java.base-libs jdk.jlink-launchers
581
582 ifeq ($(CREATE_BUILDJDK), true)
583 $(JMOD_TARGETS): create-buildjdk
584 endif
585
586 zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
587 $(filter jdk.crypto%, $(JAVA_TARGETS))
588
589 zip-source: gensrc rmic
590
591 jrtfs-jar: interim-langtools
592
593 jimages: jmods zip-source source-tips demos samples jrtfs-jar
594
595 profiles: jmods zip-source source-tips jrtfs-jar
596
597 mac-bundles-jdk: jimages
598
599 bootcycle-images: jimages
600
601 docs-javadoc: $(GENSRC_TARGETS) rmic
602
603 docs-jvmtidoc: hotspot
604
605 zip-docs: docs-javadoc docs-jvmtidoc
606
607 test: jimages test-image
608
609 create-buildjdk-copy: jdk.jlink-java java.base-gendata
610
611 create-buildjdk-compile-modules: create-buildjdk-copy create-buildjdk-compile-hotspot
612
613 test-make: clean-test-make
614
615 build-test-lib: java
616
617 build-test-failure-handler: interim-langtools
618
619 test-failure-handler: build-test-failure-handler
620
621 test-image-failure-handler: build-test-failure-handler
622
623 build-test-hotspot-jtreg-native: buildtools-jdk
624
625 build-test-jdk-jtreg-native: buildtools-jdk
626
627 test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
628
629 test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
630
631 test-hotspot-internal: exploded-image
665 # Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
666 # is actually handled by jdk.jdi-gensrc
667 jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
668
669 # Declare dependencies from <module> to all the individual targets specific
670 # to that module <module>-*, that are needed for the exploded image.
671 $(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
672 $(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
673 $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
674 $(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
675 $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
676 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
677 $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
678 demos: demos-jdk
679
680 samples: samples-jdk
681
682 # The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
683 exploded-image: $(ALL_MODULES)
684
685 create-buildjdk: create-buildjdk-compile-modules create-buildjdk-copy \
686 create-buildjdk-compile-hotspot
687
688 mac-bundles: mac-bundles-jdk
689
690 # The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
691 # and in line with this, our targets for creating these are named *-image[s].
692
693 # This target builds the product images, e.g. the JRE and JDK image
694 # (and possibly other, more specific versions)
695 product-images: jimages demos samples zip-security exploded-image
696
697 # When cross compiling and building a partial BUILDJDK for the build host,
698 # the summary generation cannot be run.
699 ifneq ($(CREATE_BUILDJDK), true)
700 product-images: generate-summary
701 endif
702
703 ifeq ($(OPENJDK_TARGET_OS), macosx)
704 product-images: mac-bundles
705 endif
706
707 # This target builds the documentation image
708 docs-image: docs-javadoc docs-jvmtidoc
709
710 # This target builds the test image
711 test-image: prepare-test-image test-image-hotspot-jtreg-native \
712 test-image-jdk-jtreg-native test-image-failure-handler
713
714 # all-images is the top-most target, it builds all our deliverables ("images").
715 all-images: product-images test-image docs-image
716
717 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \
718 jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
719 create-buildjdk mac-bundles product-images docs-image test-image all-images
720
|
331 ALL_TARGETS += source-tips bootcycle-images zip-security zip-source \
332 jrtfs-jar jimages profiles mac-bundles-jdk
333
334 ################################################################################
335 # Docs targets
336
337 docs-javadoc:
338 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk docs)
339
340 docs-jvmtidoc:
341 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk jvmtidocs)
342
343 zip-docs:
344 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Javadoc.gmk zip-docs)
345
346 ALL_TARGETS += docs-javadoc docs-jvmtidoc zip-docs
347
348 ################################################################################
349 # Cross compilation support
350
351 ifeq ($(CREATING_BUILDJDK), true)
352 # This target is only called by the recursive call below.
353 create-buildjdk-interim-image-helper: interim-image jdk.jlink-launchers \
354 java.base-copy jdk.jdeps-launchers
355 endif
356
357 create-buildjdk-copy:
358 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f CreateBuildJdkCopy.gmk)
359
360 create-buildjdk-interim-image:
361 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f Main.gmk \
362 $@-helper \
363 SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
364 HOTSPOT_SPEC=$(dir $(SPEC))buildjdk-spec.gmk \
365 CREATING_BUILDJDK=true)
366
367 ALL_TARGETS += create-buildjdk-copy create-buildjdk-interim-image
368
369 ################################################################################
370 # The interim-image is a small jlinked image that is used to generate artifacts
371 # at build time for use when linking the real images.
372
373 interim-image:
374 +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f InterimImage.gmk)
375
376 generate-classlist:
377 +($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f GenerateClasslist.gmk)
378
379 ALL_TARGETS += interim-image generate-classlist
380
381 ################################################################################
382 # Build tests
383 #
384
385 prepare-test-image:
386 $(MKDIR) -p $(TEST_IMAGE_DIR)
387 $(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
388
389 build-test-hotspot-jtreg-native:
390 +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
391 build-test-hotspot-jtreg-native)
392
393 test-image-hotspot-jtreg-native:
394 +($(CD) $(HOTSPOT_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
395 test-image-hotspot-jtreg-native)
396
397 build-test-jdk-jtreg-native:
398 +($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
399 build-test-jdk-jtreg-native)
515 $(LAUNCHER_TARGETS): generate-exported-symbols
516 endif
517
518 # The demos are currently linking to libjvm and libjava, just like all other
519 # jdk libs, even though they don't need to. To avoid warnings, make sure they
520 # aren't built until after libjava and libjvm are available to link to.
521 demos-jdk: $(JAVA_TARGETS)
522
523 # Declare dependency from <module>-java to <module>-gensrc
524 $(foreach m, $(GENSRC_MODULES), $(eval $m-java: $m-gensrc))
525
526 # Declare dependencies between java modules
527 $(foreach m, $(JAVA_MODULES), \
528 $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \
529 $(call FindDepsForModule,$m)))))
530
531 # Declare dependencies between <module>-rmic to <module>-java
532 $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java))
533
534 # Declare dependencies from <module>-lib to <module>-java
535 # Skip modules that do not have java source.
536 # When creating a BUILDJDK, the java compilation has already been done by the
537 # normal build and copied in.
538 ifneq ($(CREATING_BUILDJDK), true)
539 $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java))
540 endif
541
542 # Declare dependencies from all other <module>-lib to java.base-lib
543 $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
544 $(eval $t: java.base-libs))
545
546 # jdk.accessibility depends on java.desktop
547 jdk.accessibility-libs: java.desktop-libs
548
549 # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
550 # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
551 # virtual target.
552 jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
553
554 # The swing beans need to have java base properly generated to avoid errors
555 # in javadoc.
556 java.desktop-gensrc-jdk: java.base-gensrc
557
558 # The annotation processing for jdk.vm.ci needs java.base classes from the
559 # current JDK.
560 jdk.vm.ci-gensrc-hotspot: java.base-java
561
562 # Explicitly add dependencies for special targets
563 java.base-java: unpack-sec
564
565 # The copy target copies files generated by gensrc
566 java.base-copy-hotspot: java.base-gensrc-hotspot
567
568 jdk.jdeps-gendata: java rmic
569
570 # Declare dependencies from <module>-strip to libs, launchers, gendata and copy
571 $(foreach m, $(LIBS_MODULES), $(eval $m-strip: $m-libs))
572 $(foreach m, $(LAUNCHER_MODULES), $(eval $m-strip: $m-launchers))
573 $(foreach m, $(GENDATA_MODULES), $(eval $m-strip: $m-gendata))
574 $(foreach m, $(COPY_MODULES), $(eval $m-strip: $m-copy))
575
576 # Declare dependencies between jmod targets. Only java.base jmod needs access
577 # to the other jmods to be built.
578 # When creating a BUILDJDK, we don't need to add hashes to java.base, thus
579 # we don't need to depend on all other jmods
580 ifneq ($(CREATING_BUILDJDK), true)
581 java.base-jmod: $(filter-out java.base-jmod, $(JMOD_TARGETS))
582 endif
583
584 # Declare dependencies from <module>-jmod to all other module targets
585 $(foreach m, $(STRIP_MODULES), $(eval $m-jmod: $m-strip))
586 # When creating a BUILDJDK, the java compilation has already been done by the
587 # normal build and copied in.
588 ifneq ($(CREATING_BUILDJDK), true)
589 $(foreach m, $(JAVA_MODULES), $(eval $m-jmod: $m-java))
590 endif
591 $(foreach m, $(GENDATA_MODULES), $(eval $m-jmod: $m-gendata))
592 $(foreach m, $(RMIC_MODULES), $(eval $m-jmod: $m-rmic))
593 $(foreach m, $(LIBS_MODULES), $(eval $m-jmod: $m-libs))
594 $(foreach m, $(LAUNCHER_MODULES), $(eval $m-jmod: $m-launchers))
595 $(foreach m, $(COPY_MODULES), $(eval $m-jmod: $m-copy))
596
597 # Jmods cannot be created until we have the jlink tool ready to run, which requires
598 # all java modules to be compiled and jdk.jlink-launchers.
599 $(JMOD_TARGETS): java.base-libs jdk.jlink-launchers
600 # When creating a BUILDJDK, the java compilation has already been done by the
601 # normal build and copied in.
602 ifneq ($(CREATING_BUILDJDK), true)
603 $(JMOD_TARGETS): java
604 endif
605
606 ifeq ($(CREATE_BUILDJDK), true)
607 # Avoid calling create-buildjdk from within a create-buildjdk call
608 ifneq ($(CREATING_BUILDJDK), true)
609 $(JMOD_TARGETS): create-buildjdk
610 endif
611 endif
612
613 zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
614 $(filter jdk.crypto%, $(JAVA_TARGETS))
615
616 zip-source: gensrc rmic
617
618 jrtfs-jar: interim-langtools
619
620 ifeq ($(CREATE_BUILDJDK), true)
621 # If creating a buildjdk, the interim image needs to be based on that.
622 generate-classlist: create-buildjdk
623 else ifeq ($(EXTERNAL_BUILDJDK), false)
624 # If an external buildjdk has been provided, we skip generating an
625 # interim-image and just use the external buildjdk for generating
626 # classlist.
627 generate-classlist: interim-image
628 endif
629 generate-classlist: buildtools-jdk
630
631 jimages: jmods zip-source source-tips demos samples jrtfs-jar generate-classlist
632
633 profiles: jmods zip-source source-tips jrtfs-jar
634
635 mac-bundles-jdk: jimages
636
637 bootcycle-images: jimages
638
639 docs-javadoc: $(GENSRC_TARGETS) rmic
640
641 docs-jvmtidoc: hotspot
642
643 zip-docs: docs-javadoc docs-jvmtidoc
644
645 test: jimages test-image
646
647 create-buildjdk-copy: jdk.jlink-java java.base-gendata \
648 $(addsuffix -java, $(INTERIM_IMAGE_MODULES))
649
650 create-buildjdk-interim-image: create-buildjdk-copy
651
652 interim-image: $(addsuffix -jmod, $(INTERIM_IMAGE_MODULES))
653
654 test-make: clean-test-make
655
656 build-test-lib: java
657
658 build-test-failure-handler: interim-langtools
659
660 test-failure-handler: build-test-failure-handler
661
662 test-image-failure-handler: build-test-failure-handler
663
664 build-test-hotspot-jtreg-native: buildtools-jdk
665
666 build-test-jdk-jtreg-native: buildtools-jdk
667
668 test-image-hotspot-jtreg-native: build-test-hotspot-jtreg-native
669
670 test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
671
672 test-hotspot-internal: exploded-image
706 # Explicitly declare dependency for virtual target jdk.jdwp.agent-gensrc which
707 # is actually handled by jdk.jdi-gensrc
708 jdk.jdwp.agent-gensrc: jdk.jdi-gensrc
709
710 # Declare dependencies from <module> to all the individual targets specific
711 # to that module <module>-*, that are needed for the exploded image.
712 $(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc))
713 $(foreach m, $(JAVA_MODULES), $(eval $m: $m-java))
714 $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata))
715 $(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic))
716 $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs))
717 $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers))
718 $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy))
719 demos: demos-jdk
720
721 samples: samples-jdk
722
723 # The "exploded image" is a locally runnable JDK in $(BUILD_OUTPUT)/jdk.
724 exploded-image: $(ALL_MODULES)
725
726 create-buildjdk: create-buildjdk-copy create-buildjdk-interim-image
727
728 mac-bundles: mac-bundles-jdk
729
730 # The $(BUILD_OUTPUT)/images directory contain the resulting deliverables,
731 # and in line with this, our targets for creating these are named *-image[s].
732
733 # This target builds the product images, e.g. the JRE and JDK image
734 # (and possibly other, more specific versions)
735 product-images: jimages demos samples zip-security exploded-image
736
737 # The module summary cannot be run when:
738 # * Cross compiling and building a partial BUILDJDK for the build host
739 # * An external buildjdk has been supplied since it may not match the
740 # module selection of the target jdk
741 ifneq ($(CREATE_BUILDJDK), true)
742 ifeq ($(EXTERNAL_BUILDJDK), false)
743 product-images: generate-summary
744 endif
745 endif
746
747 ifeq ($(OPENJDK_TARGET_OS), macosx)
748 product-images: mac-bundles
749 endif
750
751 # This target builds the documentation image
752 docs-image: docs-javadoc docs-jvmtidoc
753
754 # This target builds the test image
755 test-image: prepare-test-image test-image-hotspot-jtreg-native \
756 test-image-jdk-jtreg-native test-image-failure-handler
757
758 # all-images is the top-most target, it builds all our deliverables ("images").
759 all-images: product-images test-image docs-image
760
761 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers jmods \
762 jdk.jdwp.agent-gensrc $(ALL_MODULES) demos samples exploded-image \
763 create-buildjdk mac-bundles product-images docs-image test-image all-images
764
|