Tempfile.mk (cdf0e10c) Tempfile.mk (f0a50dfa)
1# Write string to temporary file by chopping into pieces that
2# fit the commandline
3# parameters: filename, maxitems (for one write), string
4# returns: filename
5define var2file
6$(strip $(1)
7$(eval gb_var2file_helpervar := $$(shell printf "%s" "" > $(1) ))\
8$(foreach item,$(3),$(eval gb_var2file_curblock += $(item)
9 ifeq ($$(words $$(gb_var2file_curblock)),$(2))
10 gb_var2file_helpervar := $$(shell printf "%s" "$$(gb_var2file_curblock)" >> $(1) )
11 gb_var2file_curblock :=
12 endif
13 ))\
14 $(eval gb_var2file_helpervar := $(shell echo " "$(gb_var2file_curblock) >> $(1) )
15 gb_var2file_curblock :=
16 ))
17endef
18
1# Write string to temporary file by chopping into pieces that
2# fit the commandline
3# parameters: filename, maxitems (for one write), string
4# returns: filename
5define var2file
6$(strip $(1)
7$(eval gb_var2file_helpervar := $$(shell printf "%s" "" > $(1) ))\
8$(foreach item,$(3),$(eval gb_var2file_curblock += $(item)
9 ifeq ($$(words $$(gb_var2file_curblock)),$(2))
10 gb_var2file_helpervar := $$(shell printf "%s" "$$(gb_var2file_curblock)" >> $(1) )
11 gb_var2file_curblock :=
12 endif
13 ))\
14 $(eval gb_var2file_helpervar := $(shell echo " "$(gb_var2file_curblock) >> $(1) )
15 gb_var2file_curblock :=
16 ))
17endef
18
19define var2filecr
20$(strip $(1)
21$(foreach item,$(strip $(3)),$(eval gb_var2file_curblock += $(item)
22 ifeq ($$(words $$(gb_var2file_curblock)),$(2))
23 gb_var2file_helpervar :=$$(shell echo $$(gb_var2file_curblock) >> $(1) )
24 gb_var2file_curblock :=
25 endif
26 )) \
27 )
28endef
29