Skip to content

Commit

Permalink
git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace
Browse files Browse the repository at this point in the history
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>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Nov 11, 2013
1 parent 33f918c commit c635b05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contrib/mw-to-git/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ 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

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) \
Expand Down

0 comments on commit c635b05

Please sign in to comment.