[PATCH 3/3] git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 11, 2013, 20:46 UTC
- Message-ID
- <20131111204612.GP10302@google.com>
- In-Reply-To
- <20131111204504.GM10302@google.com>
Quote DESTDIR and INSTLIBDIR for the shell in the same way as is done in the toplevel Makefile to avoid confusion in case they contain shell metacharacters.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> --- contrib/mw-to-git/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile index e685dad..a4b6f7a 100644 --- a/contrib/mw-to-git/Makefile +++ b/contrib/mw-to-git/Makefile @@ -23,6 +23,8 @@ INSTALL = install SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL)) INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \ -s --no-print-directory instlibdir) +DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) +INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR)) all: build @@ -32,9 +34,9 @@ test: all check: perlcritic test install_pm: - $(INSTALL) -d -m 755 $(DESTDIR)$(INSTLIBDIR)/Git + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git' $(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \ - $(DESTDIR)$(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM) + '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)' build: $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
-- 1.8.4.1