Re: [PATCH 1/1] perl: fix installing modules from contrib
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 9, 2018, 04:54 UTC
- Message-ID
- <xmqqpo39569k.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <87tvssva2c.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>> >> +perllibdir: >> + @echo $(perllibdir_SQ)
This use of _SQ variant is fishy, isn't it? Judging from the output of
$ git grep _SQ Makefile
e.g.
Makefile: $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
Makefile: $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
Makefile: $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'I'd expect that any _SQ variant must be referenced inside a single quote pair. In fact, that is why a single quote (and nothing else) in the base variable is replaced with the magic "'\''" sequence, first stepping out of the current sq context, append a single sq (escaped with a backslash from the shell), and then stepping back into another sq context.
I think nobody saw breakage only because they do not have two consecutive SPs (or any single quote) in their path to $perllibdir. If we depend on such limitation, there is no point using _SQ variant, but we already have _SQ variant, let's use it correctly.