make/Main.gmk
changeset 27602 236555ddac42
parent 27560 adc258b13e2c
parent 27595 cff167b3bfa2
child 28005 836eb8cb6448
equal deleted inserted replaced
27581:9fffb959eb41 27602:236555ddac42
    38 # Load the vital tools for all the makefiles.
    38 # Load the vital tools for all the makefiles.
    39 include $(SRC_ROOT)/make/common/MakeBase.gmk
    39 include $(SRC_ROOT)/make/common/MakeBase.gmk
    40 include $(SRC_ROOT)/make/common/Modules.gmk
    40 include $(SRC_ROOT)/make/common/Modules.gmk
    41 
    41 
    42 # Declare ALL_TARGETS as an immediate variable. This variable is a list of all
    42 # Declare ALL_TARGETS as an immediate variable. This variable is a list of all
    43 # valid top level targets. It's used to declare them all as PHONY and to 
    43 # valid top level targets. It's used to declare them all as PHONY and to
    44 # generate the -only targets.
    44 # generate the -only targets.
    45 ALL_TARGETS :=
    45 ALL_TARGETS :=
    46 
    46 
    47 # Hook to include the corresponding custom file, if present.
    47 # Hook to include the corresponding custom file, if present.
    48 $(eval $(call IncludeCustomExtension, , Main.gmk))
    48 $(eval $(call IncludeCustomExtension, , Main.gmk))
   283 
   283 
   284 ALL_TARGETS += install
   284 ALL_TARGETS += install
   285 
   285 
   286 ################################################################################
   286 ################################################################################
   287 #
   287 #
   288 # Dependency declarations between targets. 
   288 # Dependency declarations between targets.
   289 #
   289 #
   290 # These are declared in two groups. First all dependencies between targets that 
   290 # These are declared in two groups. First all dependencies between targets that
   291 # have recipes above as these dependencies may be disabled. Then the aggregator
   291 # have recipes above as these dependencies may be disabled. Then the aggregator
   292 # targets that do not have recipes of their own, which will never have their
   292 # targets that do not have recipes of their own, which will never have their
   293 # dependencies disabled.
   293 # dependencies disabled.
   294 #
   294 #
   295 ################################################################################
   295 ################################################################################
   296 # Targets with recipes above
   296 # Targets with recipes above
   297 
   297 
   298 # If running an *-only target, parallel execution and dependencies between 
   298 # If running an *-only target, parallel execution and dependencies between
   299 # recipe targets are disabled. This makes it possible to run a select set of 
   299 # recipe targets are disabled. This makes it possible to run a select set of
   300 # recipe targets in order. It's the responsibility of the user to make sure
   300 # recipe targets in order. It's the responsibility of the user to make sure
   301 # all prerequisites are fulfilled. 
   301 # all prerequisites are fulfilled.
   302 ifneq ($(findstring -only, $(MAKECMDGOALS)), )
   302 ifneq ($(findstring -only, $(MAKECMDGOALS)), )
   303   .NOTPARALLEL:
   303   .NOTPARALLEL:
   304 else
   304 else
   305   $(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
   305   $(LANGTOOLS_GENSRC_TARGETS): buildtools-langtools
   306 
   306 
   347   $(foreach m, $(filter-out jdk.jdwp.agent, $(LIBS_MODULES)), $(eval $m-libs: $m-java))
   347   $(foreach m, $(filter-out jdk.jdwp.agent, $(LIBS_MODULES)), $(eval $m-libs: $m-java))
   348 
   348 
   349   # Declare dependencies from all other <module>-lib to java.base-lib
   349   # Declare dependencies from all other <module>-lib to java.base-lib
   350   $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
   350   $(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
   351       $(eval $t: java.base-libs))
   351       $(eval $t: java.base-libs))
   352   # Declare the special case dependency for jdk.deploy.osx where libosx 
   352   # Declare the special case dependency for jdk.deploy.osx where libosx
   353   # links against libosxapp.
   353   # links against libosxapp.
   354   jdk.deploy.osx-libs: java.desktop-libs
   354   jdk.deploy.osx-libs: java.desktop-libs
   355 
   355 
   356   # This dependency needs to be explicitly declared as jdk.jdi-gensrc generates a 
   356   # This dependency needs to be explicitly declared. jdk.jdi-gensrc generates a
   357   # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
   357   # header file used by jdk.jdwp.agent-libs. The jdk.jdwp.agent-gensrc is a
   358   # virtual target.
   358   # virtual target.
   359   jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
   359   jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
   360 
   360 
   361   # Until the module system is in place, jdk.jdi-gensrc needs to combine service
   361   # Until the module system is in place, jdk.jdi-gensrc needs to combine service
   465 ################################################################################
   465 ################################################################################
   466 #
   466 #
   467 # Clean targets
   467 # Clean targets
   468 #
   468 #
   469 ################################################################################
   469 ################################################################################
   470 # Clean targets are automatically run serially by the Makefile calling this 
   470 # Clean targets are automatically run serially by the Makefile calling this
   471 # file.
   471 # file.
   472 
   472 
   473 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
   473 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
   474     images make-support
   474     images make-support
   475 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
   475 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
   523 ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_PHASE_TARGETS) \
   523 ALL_TARGETS += clean dist-clean $(CLEAN_DIR_TARGETS) $(CLEAN_PHASE_TARGETS) \
   524     $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
   524     $(CLEAN_MODULE_TARGETS) $(CLEAN_MODULE_PHASE_TARGETS)
   525 
   525 
   526 ################################################################################
   526 ################################################################################
   527 
   527 
   528 # Setup a rule for SPEC file that fails if executed. This check makes sure the 
   528 # Setup a rule for SPEC file that fails if executed. This check makes sure the
   529 # configuration is up to date after changes to configure. 
   529 # configuration is up to date after changes to configure.
   530 ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
   530 ifeq ($(findstring reconfigure, $(MAKECMDGOALS)), )
   531   $(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
   531   $(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
   532 	@$(ECHO) "ERROR: $(SPEC) is not up to date."
   532 	@$(ECHO) "ERROR: $(SPEC) is not up to date."
   533 	@$(ECHO) "Please rerun configure! Easiest way to do this is by running"
   533 	@$(ECHO) "Please rerun configure! Easiest way to do this is by running"
   534 	@$(ECHO) "'make reconfigure'."
   534 	@$(ECHO) "'make reconfigure'."