Thread (1 message) 1 message, 1 author, 2021-12-14

Re: [PATCH v4 14/23] Makefile: re-add and use the "shellquote" macros

From: Junio C Hamano <hidden>
Date: 2021-12-14 00:31:08

Junio C Hamano [off-list ref] writes:
All of the above may very well explain why we decided not to use
$(call shellquote) in the past, and it may also explain why it is
safe to start using it again today, but it does not explain why we
want to do so in the first place.

Having to write

	$(call shellquote,$(VAR))

in longhand is much more cumbersome to read, write and merge than
defining a prepackaged VAR_SQ just once and refer it as

	'$(VAR_SQ)'

everywhere.
Having said all that, I would not have minded if this change were
more isolated and turned things like

CHAINLINTTMP_SQ = $(subst ','\'',$(CHAINLINTTMP))

to use the $(call shellquote) mechanism, if all of us found it
easier to read than repeating the same line-noise substitutions for
many variables.

What was irritating was primarily that the patch went one step
further to eliminate the _SQ variant variables, making the resulting
sites that use them harder to read and understand.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help