git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[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
Previous: Jonathan NiederNext: Matthieu Moy
Message 6 of 7 in “git-remote-mediawiki: do not remove installed files in "clean" target”
  1. git-remote-mediawiki: do not remove installed files in "clean" targetJonathan Nieder, Nov 9, 2013
  2. Matthieu MoyNov 9, 2013
  3. Jonathan NiederNov 11, 2013
  4. 1/3 git-remote-mediawiki: honor DESTDIR in "make install"Jonathan Nieder, Nov 11, 2013
  5. 2/3 git-remote-mediawiki build: make 'install' command configurableJonathan Nieder, Nov 11, 2013
  6. 3/3 git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespaceJonathan Nieder, Nov 11, 2013
  7. Matthieu MoyNov 11, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.