[Libreoffice-commits] .: RepositoryExternal.mk

David Tardon dtardon at redhat.com
Tue Oct 16 23:37:20 PDT 2012


Hi,

On Sat, Oct 13, 2012 at 12:35:06AM -0700, Libreoffice Gerrit user wrote:
>  RepositoryExternal.mk |    1 +
>  1 file changed, 1 insertion(+)
> 
> New commits:
> commit 3818933e351cd1d5f950c8891ec3974c066ce99e
> Author: Lubo?? Lu????k <l.lunak at suse.cz>
> Date:   Sat Oct 13 09:32:27 2012 +0200
> 
>     fix build
>     
>     I'm not sure why this makes a difference, the real problem is probably elsewhere.
>     
>     Change-Id: Ie52b0b9b5b1279badaa8815aeef054c8bbb125b4
> 
> diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
> index 5a3cf89..8c8e449 100644
> --- a/RepositoryExternal.mk
> +++ b/RepositoryExternal.mk
> @@ -1253,6 +1253,7 @@ ifeq ($(SYSTEM_GLIB),YES)
>  
>  define gb_LinkTarget__use_gthread
>  $(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
> +
>  endef
>  
>  else # !SYSTEM_GLIB

This is one of the idiosyncrasies of GNU make. Not using newline here
may (will) cause problem when the "function" is called from foreach
function. That is because foreach joins the results by a space, so one
can end up with two (or more) make statements concatenated into one.
E.g.,

define foo
target : VAR += $(1)
endef

define foos
$(foreach var,$(1),$(call foo,$(var))))
endef

$(eval $(call foos,a b))

will expand into (and be evaluated as)

target : VAR += a target : VAR += b

With the additional newline, it will correctly expand into

target : VAR += a
target : VAR += b

D.


More information about the LibreOffice mailing list