< prev index next >
make/common/TextFileProcessing.gmk
Print this page
*** 33,48 ****
# param 2 = the source file name (full path)
# param 3 = the target base directory
# param 4 = the target file name (possibly with a partial path)
define SetupSingleTextFileForProcessing
$(strip $3)/$(strip $4): $2 $$($1_VARDEPS_FILE)
! $(ECHO) $(LOG_INFO) "Processing $(strip $4)"
! $(MKDIR) -p '$$(@D)'
! $(RM) '$$@' '$$@.includes.tmp' '$$@.replacements.tmp'
! $$($1_INCLUDES_COMMAND_LINE) < '$$<' > '$$@.includes.tmp'
! $$($1_REPLACEMENTS_COMMAND_LINE) < '$$@.includes.tmp' > '$$@.replacements.tmp'
! $(RM) '$$@.includes.tmp'
$(MV) '$$@.replacements.tmp' '$$@'
$1 += $(strip $3)/$(strip $4)
endef
--- 33,48 ----
# param 2 = the source file name (full path)
# param 3 = the target base directory
# param 4 = the target file name (possibly with a partial path)
define SetupSingleTextFileForProcessing
$(strip $3)/$(strip $4): $2 $$($1_VARDEPS_FILE)
! $$(call LogInfo, Processing $(strip $4))
! $$(call MakeDir, $$(@D))
! $(RM) '$$@' '$$@.includes.tmp' '$$@.replacements.tmp' ; \
! $$($1_INCLUDES_COMMAND_LINE) < '$$<' > '$$@.includes.tmp' ; \
! $$($1_REPLACEMENTS_COMMAND_LINE) < '$$@.includes.tmp' > '$$@.replacements.tmp' ; \
! $(RM) '$$@.includes.tmp' ; \
$(MV) '$$@.replacements.tmp' '$$@'
$1 += $(strip $3)/$(strip $4)
endef
< prev index next >