make/common/TextFileProcessing.gmk
changeset 29312 f3f859137ce6
parent 28600 09dd1740f176
child 35008 ef0cd710989f
equal deleted inserted replaced
29311:bc685175f836 29312:f3f859137ce6
    75 #
    75 #
    76 #   If both INCLUDES or REPLACEMENTS are present, then the includes will be
    76 #   If both INCLUDES or REPLACEMENTS are present, then the includes will be
    77 #   processed first, and replacements will be done on the included fragments as well.
    77 #   processed first, and replacements will be done on the included fragments as well.
    78 #   If neither is present, the files will just be copied without modifications.
    78 #   If neither is present, the files will just be copied without modifications.
    79 #
    79 #
    80 define SetupTextFileProcessing
    80 SetupTextFileProcessing = $(NamedParamsMacroTemplate)
    81   $(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
    81 define SetupTextFileProcessingBody
    82   $(call EvalDebugWrapper,$(strip $1),$(call SetupTextFileProcessingInner,$(strip $1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)))
       
    83 endef
       
    84 
       
    85 define SetupTextFileProcessingInner
       
    86   $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $(strip $($i)),$1_$(strip $($i)))$(NEWLINE))
       
    87   $(call LogSetupMacroEntry,SetupTextFileProcessing($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
       
    88   $(if $(16),$(error Internal makefile error: Too many arguments to SetupTextFileProcessing, please update TextFileProcessing.gmk))
       
    89 
    82 
    90   ifneq ($$($1_SOURCE_FILES),)
    83   ifneq ($$($1_SOURCE_FILES),)
    91     ifneq ($$($1_SOURCE_DIRS),)
    84     ifneq ($$($1_SOURCE_DIRS),)
    92       $$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
    85       $$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
    93     endif
    86     endif