make/MainSupport.gmk
changeset 41172 1de8867db5a3
parent 41047 de6f69208f82
child 41260 4f71f07b30d1
equal deleted inserted replaced
41171:407480ec6872 41172:1de8867db5a3
   135 # Param 2: Module name
   135 # Param 2: Module name
   136 # Param 3: Topdir
   136 # Param 3: Topdir
   137 define DeclareRecipeForModuleMakefile
   137 define DeclareRecipeForModuleMakefile
   138   ifeq ($$($1_MULTIPLE_MAKEFILES), true)
   138   ifeq ($$($1_MULTIPLE_MAKEFILES), true)
   139     $2-$$($1_TARGET_SUFFIX): $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
   139     $2-$$($1_TARGET_SUFFIX): $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
   140     $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $3)
       
   141 
   140 
   142     $2-$$($1_TARGET_SUFFIX)-$$(notdir $3):
   141     $2-$$($1_TARGET_SUFFIX)-$$(notdir $3):
   143   else
   142   else
   144     $2-$$($1_TARGET_SUFFIX):
   143     $2-$$($1_TARGET_SUFFIX):
   145   endif
   144   endif
   171           $$(foreach s, $(MAKE_MAKEDIR_LIST), \
   170           $$(foreach s, $(MAKE_MAKEDIR_LIST), \
   172               $$(addsuffix /$$s, $(MAKE_TOPDIR_LIST))))))))))
   171               $$(addsuffix /$$s, $(MAKE_TOPDIR_LIST))))))))))
   173 
   172 
   174   # Only declare recipes if there are makefiles to call
   173   # Only declare recipes if there are makefiles to call
   175   ifneq ($$($1_$2_TOPDIRS), )
   174   ifneq ($$($1_$2_TOPDIRS), )
       
   175     # Add the top dir specific target to target list regardless of if recipe
       
   176     # generation is disabled.
       
   177     ifeq ($$($1_MULTIPLE_MAKEFILES), true)
       
   178       $$(foreach d, $$($1_$2_TOPDIRS), \
       
   179         $$(eval $1 += $2-$$($1_TARGET_SUFFIX)-$$(notdir $$d)))
       
   180     endif
   176     ifeq ($(NO_RECIPES),)
   181     ifeq ($(NO_RECIPES),)
   177       $$(foreach d, $$($1_$2_TOPDIRS), \
   182       $$(foreach d, $$($1_$2_TOPDIRS), \
   178           $$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2,$$d)))
   183           $$(eval $$(call DeclareRecipeForModuleMakefile,$1,$2,$$d)))
   179     endif
   184     endif
   180     $1 += $2-$$($1_TARGET_SUFFIX)
   185     $1 += $2-$$($1_TARGET_SUFFIX)