1*cdf0e10cSrcweir# Write string to temporary file by chopping into pieces that 2*cdf0e10cSrcweir# fit the commandline 3*cdf0e10cSrcweir# parameters: filename, maxitems (for one write), string 4*cdf0e10cSrcweir# returns: filename 5*cdf0e10cSrcweirdefine var2file 6*cdf0e10cSrcweir$(strip $(1) 7*cdf0e10cSrcweir$(eval gb_var2file_helpervar := $$(shell printf "%s" "" > $(1) ))\ 8*cdf0e10cSrcweir$(foreach item,$(3),$(eval gb_var2file_curblock += $(item) 9*cdf0e10cSrcweir ifeq ($$(words $$(gb_var2file_curblock)),$(2)) 10*cdf0e10cSrcweir gb_var2file_helpervar := $$(shell printf "%s" "$$(gb_var2file_curblock)" >> $(1) ) 11*cdf0e10cSrcweir gb_var2file_curblock := 12*cdf0e10cSrcweir endif 13*cdf0e10cSrcweir ))\ 14*cdf0e10cSrcweir $(eval gb_var2file_helpervar := $(shell echo " "$(gb_var2file_curblock) >> $(1) ) 15*cdf0e10cSrcweir gb_var2file_curblock := 16*cdf0e10cSrcweir )) 17*cdf0e10cSrcweirendef 18*cdf0e10cSrcweir 19