From: Torsten Bögershausen Date: Thu, 03 Jan 2013 00:23:26 GMT Subject: Re: [PATCH 1/4] test: Add target test-lint-shell-syntax Message-ID: <50E4CF7E.9090302@web.de> In-Reply-To: <7vlicbyvc2.fsf@alter.siamese.dyndns.org> On 03.01.13 01:16, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> At least on my system the following combination works: >> >> git diff >> diff --git a/t/Makefile b/t/Makefile >> index f8f8c54..391a5ca 100644 >> --- a/t/Makefile >> +++ b/t/Makefile >> @@ -8,7 +8,7 @@ >> >> #GIT_TEST_OPTS = --verbose --debug >> SHELL_PATH ?= $(SHELL) >> -PERL_PATH ?= /usr/bin/perl >> +PERL_PATH = "/Users/tb/projects/git/tb/pe rl" > > I do not think that will fly. Having that in the main Makefile > where the existing users of the symbol relies on it without any > surrounding quotes, e.g. > > $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE > $(QUIET_GEN)$(RM) $@ $@+ && \ > INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \ > sed -e '1{' \ > -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \ > -e ' h' \ > -e ' s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'"));=' \ > -e ' H' \ > -e ' x' \ > -e '}' \ > -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ > $@.perl >$@+ && \ > chmod +x $@+ && \ > mv $@+ $@ > > where $(PERL_PATH_SQ) is defined to replace each ' in $(PERL_PATH) > with '\'' so that '$(PERL_PATH_SQ)' becomes a shell-safe way to > quote the value of PERL_PATH without quotes, your definition will > look for a relative path that is inside a directory named '"' > (that's a single double-quote). Thanks to all for the explanations, fixing up and queing. And good news: pu today is "clean",there where no problems found: commit d69ea46220647c048d332c471a184446cce17627 Merge: e552539 fcf30b3 Author: Junio C Hamano Date: Wed Jan 2 12:44:33 2013 -0800 When the dust has settled, we can either enable the check always, or mention "make test-lint-shell-syntax" in the Documentation.