diff --git a/solenv/gbuild/Tempfile.mk b/solenv/gbuild/Tempfile.mk index d10e1d2d1fe0..3fede2abb774 100644 --- a/solenv/gbuild/Tempfile.mk +++ b/solenv/gbuild/Tempfile.mk @@ -29,13 +29,14 @@ else define var2file $(strip $(1) $(eval gb_var2file_helpervar := $$(shell printf "%s" "" > $(1) ))\ -$(foreach item,$(3),$(eval gb_var2file_curblock += $(item) +$(eval gb_var2file_curblock := $(firstword $(3)))\ +$(foreach item,$(wordlist 2,99999,$(3)),$(eval gb_var2file_curblock += $(item) ifeq ($$(words $$(gb_var2file_curblock)),$(2)) gb_var2file_helpervar := $$(shell printf "%s" "$$(gb_var2file_curblock)" >> $(1) ) gb_var2file_curblock := endif ))\ - $(eval gb_var2file_helpervar := $(shell echo " "$(gb_var2file_curblock) >> $(1) ) + $(eval gb_var2file_helpervar := $(shell printf "%s\n" "$(gb_var2file_curblock)" >> $(1) ) gb_var2file_curblock := )) endef