git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: git@vger.kernel.org, Thorsten Glaser <t.glaser@tarent.de>
Subject: [PATCH 3/3] git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace
Date: Mon, 11 Nov 2013 12:46:12 -0800	[thread overview]
Message-ID: <20131111204612.GP10302@google.com> (raw)
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

  parent reply	other threads:[~2013-11-11 20:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09  2:22 [PATCH] git-remote-mediawiki: do not remove installed files in "clean" target Jonathan Nieder
2013-11-09 11:32 ` Matthieu Moy
2013-11-11 20:45   ` Jonathan Nieder
2013-11-11 20:45     ` [PATCH 1/3] git-remote-mediawiki: honor DESTDIR in "make install" Jonathan Nieder
2013-11-11 20:45     ` [PATCH 2/3] git-remote-mediawiki build: make 'install' command configurable Jonathan Nieder
2013-11-11 20:46     ` Jonathan Nieder [this message]
2013-11-11 21:26     ` [PATCH] git-remote-mediawiki: do not remove installed files in "clean" target Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131111204612.GP10302@google.com \
    --to=jrnieder@gmail.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=t.glaser@tarent.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).