Re: [PATCH 1/5] Fixes for ancient versions of GNU make
- From
Junio C Hamano <junkio@cox.net>
- Date
- Feb 18, 2006, 06:50 UTC
- Message-ID
- <7v1wy1upn3.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0602171522020.24274@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 21 quoted lines
> diff --git a/Makefile b/Makefile > index d7d79de..b3401ac 100644 > --- a/Makefile > +++ b/Makefile > ... > +# These will be used inside '' > +SHELL_PATH_QUOTED = $(subst ','\'',$(SHELL_PATH)) > ... > diff --git a/t/Makefile b/t/Makefile > index 5c5a620..d78404f 100644 > --- a/t/Makefile > +++ b/t/Makefile > @@ -8,17 +8,14 @@ SHELL_PATH ?= $(SHELL) > TAR ?= $(TAR) > > # Shell quote; > -# Result of this needs to be placed inside '' > -shq = $(subst ','\'',$(1)) > -# This has surrounding '' > -shellquote = '$(call shq,$(1))' > +SHELL_PATH_QUOTED = '$(subst ','\'',$(SHELL_PATH))'
I am not opposed to avoiding $(call), but subst everywhere look ugly ;-).
You inherited this problem, but these two symbols in different Makefiles with the same name mean two completely different things, which confused me quite badly.
So if we were to do this portability fix, how about consistently defining it without surrounding sq pair? Most of the places in the main Makefile you use the symbol with other string, with the whole thing quoted inside a sq pair, so that would make things easier to read.
Then the one that uses it in the t/Makefile in 5/5 becomes:
$(T):
@echo "*** $@ ***"; '$(SHELL_PATH_QUOTED)' $@ $(GIT_TEST_OPTS)