make/Main.gmk

Print this page




 470 
 471 docs: docs-javadoc docs-jvmtidoc
 472 
 473 ALL_TARGETS += gensrc gendata copy java rmic libs launchers \
 474     $(ALL_MODULE_TARGETS) exploded-image jdk jars \
 475     $(ALL_PROFILES) profiles docs
 476 
 477 ################################################################################
 478 
 479 all: images docs verify-modules
 480 default: exploded-image
 481 
 482 ALL_TARGETS += default all
 483 
 484 ################################################################################
 485 ################################################################################
 486 #
 487 # Clean targets
 488 #
 489 ################################################################################
 490 
 491 # If running a clean target, disable parallel execution
 492 ifneq ($(findstring clean, $(MAKECMDGOALS)), )
 493   .NOTPARALLEL:
 494   # It's not recommended to run additional targets to clean on the same make
 495   # command line. Try to detect this and issue a warning.
 496   ifneq ($(filter-out clean%, $(MAKECMDGOALS)), )
 497     $(warning Mixing clean targets with normal build targets will not work well \
 498         and is not recommended.)
 499   endif
 500 endif
 501 
 502 CLEAN_COMPONENTS += langtools corba hotspot jdk nashorn images \
 503     bootcycle-build docs docstemp test
 504 CLEAN_TARGETS := $(addprefix clean-, $(CLEAN_COMPONENTS))
 505 
 506 # Remove everything, except the output from configure.
 507 clean: $(CLEAN_TARGETS)
 508         ($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
 509         $(ECHO) Cleaned all build artifacts.
 510 
 511 $(CLEAN_TARGETS):
 512         $(call CleanComponent,$(patsubst clean-%, %, $@))
 513 
 514 clean-docs: clean-docstemp
 515 
 516 # Remove everything, including configure configuration.
 517 # If the output directory was created by configure and now becomes empty, remove it as well.
 518 dist-clean: clean
 519         ($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments \
 520             Makefile compare.sh spec.sh tmp javacservers)


 525             ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
 526                 && $(RM) -r $(OUTPUT_ROOT)) \
 527           fi \
 528         )
 529         $(ECHO) Cleaned everything, you will have to re-run configure.
 530 
 531 ALL_TARGETS += clean dist-clean $(CLEAN_TARGETS)
 532 
 533 ################################################################################
 534 
 535 # Setup a rule for SPEC file that fails if executed. This check makes sure the 
 536 # configuration is up to date after changes to configure. 
 537 ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
 538   $(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
 539         @$(ECHO) "ERROR: $(SPEC) is not up to date."
 540         @$(ECHO) "Please rerun configure! Easiest way to do this is by running"
 541         @$(ECHO) "'make reconfigure'."
 542         @$(ECHO) "It may also be ignored by setting IGNORE_OLD_CONFIG=true"
 543         @if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
 544 endif



 545 
 546 reconfigure:
 547         ifneq ($(CONFIGURE_COMMAND_LINE), )
 548           @$(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"
 549         else
 550           @$(ECHO) "Re-running configure using default settings"
 551         endif
 552         @( cd $(OUTPUT_ROOT) && $(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
 553 
 554 ALL_TARGETS += reconfigure
 555 
 556 ################################################################################
 557 # Declare *-only targets for each normal target
 558 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
 559 
 560 ALL_TARGETS += $(addsuffix -only, $(ALL_TARGETS))
 561 
 562 ################################################################################
 563 
 564 .PHONY: $(ALL_TARGETS)


 470 
 471 docs: docs-javadoc docs-jvmtidoc
 472 
 473 ALL_TARGETS += gensrc gendata copy java rmic libs launchers \
 474     $(ALL_MODULE_TARGETS) exploded-image jdk jars \
 475     $(ALL_PROFILES) profiles docs
 476 
 477 ################################################################################
 478 
 479 all: images docs verify-modules
 480 default: exploded-image
 481 
 482 ALL_TARGETS += default all
 483 
 484 ################################################################################
 485 ################################################################################
 486 #
 487 # Clean targets
 488 #
 489 ################################################################################
 490 # Clean targets are automatically run serially by the Makefile calling this 
 491 # file.









 492 
 493 CLEAN_COMPONENTS += langtools corba hotspot jdk nashorn images \
 494     bootcycle-build docs docstemp test
 495 CLEAN_TARGETS := $(addprefix clean-, $(CLEAN_COMPONENTS))
 496 
 497 # Remove everything, except the output from configure.
 498 clean: $(CLEAN_TARGETS)
 499         ($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*)
 500         $(ECHO) Cleaned all build artifacts.
 501 
 502 $(CLEAN_TARGETS):
 503         $(call CleanComponent,$(patsubst clean-%, %, $@))
 504 
 505 clean-docs: clean-docstemp
 506 
 507 # Remove everything, including configure configuration.
 508 # If the output directory was created by configure and now becomes empty, remove it as well.
 509 dist-clean: clean
 510         ($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments \
 511             Makefile compare.sh spec.sh tmp javacservers)


 516             ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" \
 517                 && $(RM) -r $(OUTPUT_ROOT)) \
 518           fi \
 519         )
 520         $(ECHO) Cleaned everything, you will have to re-run configure.
 521 
 522 ALL_TARGETS += clean dist-clean $(CLEAN_TARGETS)
 523 
 524 ################################################################################
 525 
 526 # Setup a rule for SPEC file that fails if executed. This check makes sure the 
 527 # configuration is up to date after changes to configure. 
 528 ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
 529   $(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
 530         @$(ECHO) "ERROR: $(SPEC) is not up to date."
 531         @$(ECHO) "Please rerun configure! Easiest way to do this is by running"
 532         @$(ECHO) "'make reconfigure'."
 533         @$(ECHO) "It may also be ignored by setting IGNORE_OLD_CONFIG=true"
 534         @if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
 535 endif
 536 
 537 # The reconfigure target is automatically run serially from everything else
 538 # by the Makefile calling this file.
 539 
 540 reconfigure:
 541         ifneq ($(CONFIGURE_COMMAND_LINE), )
 542           @$(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"
 543         else
 544           @$(ECHO) "Re-running configure using default settings"
 545         endif
 546         @( cd $(OUTPUT_ROOT) && $(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
 547 
 548 ALL_TARGETS += reconfigure
 549 
 550 ################################################################################
 551 # Declare *-only targets for each normal target
 552 $(foreach t, $(ALL_TARGETS), $(eval $(t)-only: $(t)))
 553 
 554 ALL_TARGETS += $(addsuffix -only, $(ALL_TARGETS))
 555 
 556 ################################################################################
 557 
 558 .PHONY: $(ALL_TARGETS)