common/makefiles/MakeBase.gmk

changeset 840
6274d4cd22d3
parent 839
174a54ce39c4
equal deleted inserted replaced
839:174a54ce39c4 840:6274d4cd22d3
54 define ListPathsSafely_If 54 define ListPathsSafely_If
55 $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1))))) 55 $(if $(word $3,$($1)),$(eval $1_LPS$3:=$(call compress_paths,$(wordlist $3,$4,$($1)))))
56 endef 56 endef
57 57
58 define ListPathsSafely_Printf 58 define ListPathsSafely_Printf
59 $(if $(strip $($1_LPS$4)),printf -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3) 59 $(if $(strip $($1_LPS$4)),$(if $(findstring $(LOG_LEVEL),trace),,@)printf \
60 -- "$(strip $($1_LPS$4))\n" | $(decompress_paths) $3)
60 endef 61 endef
61 62
62 # Receipt example: 63 # Receipt example:
63 # rm -f thepaths 64 # rm -f thepaths
64 # $(call ListPathsSafely,THEPATHS,\n, >> thepaths) 65 # $(call ListPathsSafely,THEPATHS,\n, >> thepaths)
65 # The \n argument means translate spaces into \n 66 # The \n argument means translate spaces into \n
66 # if instead , , (a space) is supplied, then spaces remain spaces. 67 # if instead , , (a space) is supplied, then spaces remain spaces.
67 define ListPathsSafely 68 define ListPathsSafely
68 $(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!)) 69 $(if $(word 16001,$($1)),$(error Cannot list safely more than 16000 paths. $1 has $(words $($1)) paths!))
70 $(ECHO) $(LOG_DEBUG) Writing $(words $($1)) paths to '$3'
69 $(call ListPathsSafely_If,$1,$2,1,250) 71 $(call ListPathsSafely_If,$1,$2,1,250)
70 $(call ListPathsSafely_If,$1,$2,251,500) 72 $(call ListPathsSafely_If,$1,$2,251,500)
71 $(call ListPathsSafely_If,$1,$2,501,750) 73 $(call ListPathsSafely_If,$1,$2,501,750)
72 $(call ListPathsSafely_If,$1,$2,751,1000) 74 $(call ListPathsSafely_If,$1,$2,751,1000)
73 75

mercurial