< prev index next >

make/MainSupport.gmk

Print this page




  91 endef
  92 
  93 define Clean-docs
  94         @$(PRINTF) "Cleaning docs ..."
  95         @$(PRINTF) "\n" $(LOG_DEBUG)
  96         $(RM) -r $(SUPPORT_OUTPUTDIR)/docs
  97         $(RM) -r $(IMAGES_OUTPUTDIR)/docs
  98         @$(PRINTF) " done\n"
  99 endef
 100 
 101 define CleanModule
 102   $(call Clean-gensrc, $1)
 103   $(call Clean-java, $1)
 104   $(call Clean-native, $1)
 105   $(call Clean-include, $1)
 106 endef
 107 
 108 
 109 ################################################################################
 110 
 111 MAKE_TOPDIR_LIST := $(JDK_TOPDIR) $(CORBA_TOPDIR) $(LANGTOOLS_TOPDIR)

 112 MAKE_MAKEDIR_LIST := make
 113 
 114 # Helper macro for DeclareRecipesForPhase
 115 # Declare a recipe for calling the module and phase specific makefile.
 116 # If there are multiple makefiles to call, create a rule for each topdir
 117 # that contains a makefile with the target $module-$suffix-$repodir,
 118 # (i.e: java.base-gensrc-jdk)
 119 # Normally there is only one makefile, and the target will just be
 120 # $module-$suffix
 121 # Param 1: Name of list to add targets to
 122 # Param 2: Module name
 123 # Param 3: Topdir
 124 define DeclareRecipeForModuleMakefile
 125   ifeq ($$($1_MULTIPLE_MAKEFILES), true)
 126     $2-$$($1_TARGET_SUFFIX): $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 127     $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 128 
 129     $2-$$($1_TARGET_SUFFIX)-$$(notdir $3):
 130   else
 131     $2-$$($1_TARGET_SUFFIX):


 162   # Only declare recipes if there are makefiles to call
 163   ifneq ($$($1_$2_TOPDIRS), )
 164     ifeq ($(NO_RECIPES),)
 165       $$(foreach d, $$($1_$2_TOPDIRS), \
 166           $$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2,$$d)))
 167     endif
 168     $1 += $2-$$($1_TARGET_SUFFIX)
 169     $1_MODULES += $2
 170   endif
 171 endef
 172 
 173 # Declare recipes for a specific module and build phase if there are makefiles
 174 # present for the specific combination.
 175 # Param 1: Name of list to add targets to
 176 # Named params:
 177 # TARGET_SUFFIX : Suffix of target to create for recipe
 178 # MAKE_SUBDIR : Subdir for this build phase
 179 # FILE_PREFIX : File prefix for this build phase
 180 # USE_WRAPPER : Set to true to use ModuleWrapper.gmk
 181 # CHECK_MODULES : List of modules to try
 182 # MULTIPLE_MAKEFILES : Set to true to handle makefils for the same module in
 183 #                      phase in multiple repos
 184 # Exported variables:
 185 # $1_MODULES : All modules that had rules generated
 186 # $1_TARGETS : All targets generated
 187 define DeclareRecipesForPhase
 188   $(foreach i,2 3 4 5 6 7, $(if $($i),$(strip $1)_$(strip $($i)))$(NEWLINE))
 189   $(if $(8),$(error Internal makefile error: Too many arguments to \
 190       DeclareRecipesForPhase, please update MakeHelper.gmk))
 191 
 192   $$(foreach m, $$($(strip $1)_CHECK_MODULES), \
 193       $$(eval $$(call DeclareRecipesForPhaseAndModule,$(strip $1),$$m)))
 194 
 195   $(strip $1)_TARGETS := $$($(strip $1))
 196 endef
 197 
 198 ################################################################################
 199 
 200 endif # _MAINSUPPORT_GMK


  91 endef
  92 
  93 define Clean-docs
  94         @$(PRINTF) "Cleaning docs ..."
  95         @$(PRINTF) "\n" $(LOG_DEBUG)
  96         $(RM) -r $(SUPPORT_OUTPUTDIR)/docs
  97         $(RM) -r $(IMAGES_OUTPUTDIR)/docs
  98         @$(PRINTF) " done\n"
  99 endef
 100 
 101 define CleanModule
 102   $(call Clean-gensrc, $1)
 103   $(call Clean-java, $1)
 104   $(call Clean-native, $1)
 105   $(call Clean-include, $1)
 106 endef
 107 
 108 
 109 ################################################################################
 110 
 111 MAKE_TOPDIR_LIST := $(JDK_TOPDIR) $(CORBA_TOPDIR) $(LANGTOOLS_TOPDIR) \
 112     $(HOTSPOT_TOPDIR)
 113 MAKE_MAKEDIR_LIST := make
 114 
 115 # Helper macro for DeclareRecipesForPhase
 116 # Declare a recipe for calling the module and phase specific makefile.
 117 # If there are multiple makefiles to call, create a rule for each topdir
 118 # that contains a makefile with the target $module-$suffix-$repodir,
 119 # (i.e: java.base-gensrc-jdk)
 120 # Normally there is only one makefile, and the target will just be
 121 # $module-$suffix
 122 # Param 1: Name of list to add targets to
 123 # Param 2: Module name
 124 # Param 3: Topdir
 125 define DeclareRecipeForModuleMakefile
 126   ifeq ($$($1_MULTIPLE_MAKEFILES), true)
 127     $2-$$($1_TARGET_SUFFIX): $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 128     $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 129 
 130     $2-$$($1_TARGET_SUFFIX)-$$(notdir $3):
 131   else
 132     $2-$$($1_TARGET_SUFFIX):


 163   # Only declare recipes if there are makefiles to call
 164   ifneq ($$($1_$2_TOPDIRS), )
 165     ifeq ($(NO_RECIPES),)
 166       $$(foreach d, $$($1_$2_TOPDIRS), \
 167           $$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2,$$d)))
 168     endif
 169     $1 += $2-$$($1_TARGET_SUFFIX)
 170     $1_MODULES += $2
 171   endif
 172 endef
 173 
 174 # Declare recipes for a specific module and build phase if there are makefiles
 175 # present for the specific combination.
 176 # Param 1: Name of list to add targets to
 177 # Named params:
 178 # TARGET_SUFFIX : Suffix of target to create for recipe
 179 # MAKE_SUBDIR : Subdir for this build phase
 180 # FILE_PREFIX : File prefix for this build phase
 181 # USE_WRAPPER : Set to true to use ModuleWrapper.gmk
 182 # CHECK_MODULES : List of modules to try
 183 # MULTIPLE_MAKEFILES : Set to true to handle makefiles for the same module and
 184 #                      phase in multiple repos
 185 # Exported variables:
 186 # $1_MODULES : All modules that had rules generated
 187 # $1_TARGETS : All targets generated
 188 define DeclareRecipesForPhase
 189   $(foreach i,2 3 4 5 6 7, $(if $($i),$(strip $1)_$(strip $($i)))$(NEWLINE))
 190   $(if $(8),$(error Internal makefile error: Too many arguments to \
 191       DeclareRecipesForPhase, please update MakeHelper.gmk))
 192 
 193   $$(foreach m, $$($(strip $1)_CHECK_MODULES), \
 194       $$(eval $$(call DeclareRecipesForPhaseAndModule,$(strip $1),$$m)))
 195 
 196   $(strip $1)_TARGETS := $$($(strip $1))
 197 endef
 198 
 199 ################################################################################
 200 
 201 endif # _MAINSUPPORT_GMK
< prev index next >