Subject: Re: [PATCH 08/13] Makefile: introduce sq function for shell-quoting

From: Junio C Hamano <[email-masked]>
Date: Wed, 05 Feb 2014 11:12:17 -0800

Jeff King <[email-masked]> writes:

> Since we have recently abolished the prohibition on $(call)
> in our Makefile, we can use it to factor out the repeated
> shell-quoting we do. There are two upsides:
>
>   1. It is much more readable than inline calls to
>      $(subst ','\'').
>
>   2. It is short enough that we can do away with the _SQ
>      variants of many variables (note that we do not do this
>      just yet, as there is a little more cleanup needed
>      first).

Yay.

> .... But
> many instances are not really any more readable (e.g., see the first
> hunk below).
> ...
>  .PHONY: install-perl-script install-sh-script install-python-script
>  install-sh-script: $(SCRIPT_SH_INS)
> -	$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
> +	$(INSTALL) $^ $(call sq,$(DESTDIR)$(gitexec_instdir))

Hmph, I do not see it as bad as the "make-var", which forces you to
say $(eval $(call ...)); this $(call sq, ...) is fairly readable.