Bump for 3.6-28
[LibreOffice.git] / solenv / gbuild / Tempfile.mk
blob691abc453c74a9a8c27602adc9e130a7ad739a9a
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 ifeq ($(HAVE_GNUMAKE_FILE_FUNC),YES)
4 define var2file
5 $(file >$(1),$(3))$(1)
6 endef
7 else
8 # Write string to temporary file by chopping into pieces that
9 # fit the commandline
10 # parameters: filename, maxitems (for one write), string
11 # returns: filename
12 define var2file
13 $(strip $(1)
14 $(eval gb_var2file_helpervar := $$(shell printf "%s" "" > $(1) ))\
15 $(foreach item,$(3),$(eval gb_var2file_curblock += $(item)
16 ifeq ($$(words $$(gb_var2file_curblock)),$(2))
17 gb_var2file_helpervar := $$(shell printf "%s" "$$(gb_var2file_curblock)" >> $(1) )
18 gb_var2file_curblock :=
19 endif
20 ))\
21 $(eval gb_var2file_helpervar := $(shell echo " "$(gb_var2file_curblock) >> $(1) )
22 gb_var2file_curblock :=
24 endef
25 endif
27 # vim: set noet sw=4 ts=4: