< prev index next >

make/MainSupport.gmk

Print this page




 124 
 125 # Helper macro for DeclareRecipesForPhase
 126 # Declare a recipe for calling the module and phase specific makefile.
 127 # If there are multiple makefiles to call, create a rule for each topdir
 128 # that contains a makefile with the target $module-$suffix-$repodir,
 129 # (i.e: java.base-gensrc-jdk)
 130 # Normally there is only one makefile, and the target will just be
 131 # $module-$suffix
 132 # Param 1: Name of list to add targets to
 133 # Param 2: Module name
 134 # Param 3: Topdir
 135 define DeclareRecipeForModuleMakefile
 136   ifeq ($$($1_MULTIPLE_MAKEFILES), true)
 137     $2-$$($1_TARGET_SUFFIX): $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 138     $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 139 
 140     $2-$$($1_TARGET_SUFFIX)-$$(notdir $3):
 141   else
 142     $2-$$($1_TARGET_SUFFIX):
 143   endif
 144         $(ECHO) $(LOG_INFO) "Building $$@"
 145         ifeq ($$($1_USE_WRAPPER), true)
 146           +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
 147               -f ModuleWrapper.gmk \
 148                   $$(addprefix -I, $$(wildcard $$(addprefix $3/, $(MAKE_MAKEDIR_LIST)) \
 149                   $$(addsuffix /$$($1_MAKE_SUBDIR), $$(addprefix $3/, $(MAKE_MAKEDIR_LIST))))) \
 150                   MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX))
 151         else
 152           +($(CD) $$(dir $$(firstword $$(wildcard $$(patsubst %, \
 153                   $3/%/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $(MAKE_MAKEDIR_LIST))))) \
 154             && $(MAKE) $(MAKE_ARGS) \
 155                   -f $$($1_FILE_PREFIX)-$2.gmk \
 156                   $$(addprefix -I, $$(wildcard $$(addprefix $3/, $(MAKE_MAKEDIR_LIST)) \
 157                   $$(addsuffix /$$($1_MAKE_SUBDIR), $$(addprefix $3/, $(MAKE_MAKEDIR_LIST))))) \
 158                   MODULE=$2)
 159         endif
 160 
 161 endef
 162 
 163 # Helper macro for DeclareRecipesForPhase
 164 # Param 1: Name of list to add targets to




 124 
 125 # Helper macro for DeclareRecipesForPhase
 126 # Declare a recipe for calling the module and phase specific makefile.
 127 # If there are multiple makefiles to call, create a rule for each topdir
 128 # that contains a makefile with the target $module-$suffix-$repodir,
 129 # (i.e: java.base-gensrc-jdk)
 130 # Normally there is only one makefile, and the target will just be
 131 # $module-$suffix
 132 # Param 1: Name of list to add targets to
 133 # Param 2: Module name
 134 # Param 3: Topdir
 135 define DeclareRecipeForModuleMakefile
 136   ifeq ($$($1_MULTIPLE_MAKEFILES), true)
 137     $2-$$($1_TARGET_SUFFIX): $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 138     $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
 139 
 140     $2-$$($1_TARGET_SUFFIX)-$$(notdir $3):
 141   else
 142     $2-$$($1_TARGET_SUFFIX):
 143   endif

 144         ifeq ($$($1_USE_WRAPPER), true)
 145           +($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) \
 146               -f ModuleWrapper.gmk \
 147                   $$(addprefix -I, $$(wildcard $$(addprefix $3/, $(MAKE_MAKEDIR_LIST)) \
 148                   $$(addsuffix /$$($1_MAKE_SUBDIR), $$(addprefix $3/, $(MAKE_MAKEDIR_LIST))))) \
 149                   MODULE=$2 MAKEFILE_PREFIX=$$($1_FILE_PREFIX))
 150         else
 151           +($(CD) $$(dir $$(firstword $$(wildcard $$(patsubst %, \
 152                   $3/%/$$($1_MAKE_SUBDIR)/$$($1_FILE_PREFIX)-$2.gmk, $(MAKE_MAKEDIR_LIST))))) \
 153             && $(MAKE) $(MAKE_ARGS) \
 154                   -f $$($1_FILE_PREFIX)-$2.gmk \
 155                   $$(addprefix -I, $$(wildcard $$(addprefix $3/, $(MAKE_MAKEDIR_LIST)) \
 156                   $$(addsuffix /$$($1_MAKE_SUBDIR), $$(addprefix $3/, $(MAKE_MAKEDIR_LIST))))) \
 157                   MODULE=$2)
 158         endif
 159 
 160 endef
 161 
 162 # Helper macro for DeclareRecipesForPhase
 163 # Param 1: Name of list to add targets to


< prev index next >