]> git.notmuchmail.org Git - notmuch/commitdiff
Makefile: Quote variables used as filenames in shell commands
authorCarl Worth <cworth@cworth.org>
Wed, 26 Jan 2011 13:29:15 +0000 (23:29 +1000)
committerCarl Worth <cworth@cworth.org>
Wed, 26 Jan 2011 13:36:52 +0000 (23:36 +1000)
This allows support for filenames with spaces in them.

Makefile.local
completion/Makefile.local
emacs/Makefile.local
lib/Makefile.local

index 3c6151cf2b89bbc6b2613e4eef9aa748992da85c..38ead11dd8dde9d3e6cba828e4addb8315a38e37 100644 (file)
@@ -265,10 +265,10 @@ notmuch.1.gz: notmuch.1
 
 .PHONY: install
 install: all notmuch.1.gz
-       mkdir -p $(DESTDIR)$(mandir)/man1
-       install -m0644 notmuch.1.gz $(DESTDIR)$(mandir)/man1/
-       mkdir -p $(DESTDIR)$(prefix)/bin/
-       install notmuch-shared $(DESTDIR)$(prefix)/bin/notmuch
+       mkdir -p "$(DESTDIR)$(mandir)/man1"
+       install -m0644 notmuch.1.gz "$(DESTDIR)$(mandir)/man1/"
+       mkdir -p "$(DESTDIR)$(prefix)/bin/"
+       install notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"
 ifeq ($(MAKECMDGOALS), install)
        @echo ""
        @echo "Notmuch is now installed to $(DESTDIR)$(prefix)"
@@ -293,8 +293,8 @@ endif
 
 .PHONY: install-desktop
 install-desktop:
-       mkdir -p $(DESTDIR)$(desktop_dir)
-       desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop
+       mkdir -p "$(DESTDIR)$(desktop_dir)"
+       desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop
 
 SRCS  := $(SRCS) $(notmuch_client_srcs)
 CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc notmuch.1.gz
index 911358da4dd1cbb011a8295cd06f5d5791c2f12a..755b0f7e9ba2d81af4fda1ee7e5cc2022f998c42 100644 (file)
@@ -13,10 +13,10 @@ install: install-$(dir)
 install-$(dir):
        @echo $@
 ifeq ($(WITH_BASH),1)
-       mkdir -p $(DESTDIR)$(bash_completion_dir)
-       install -m0644 $(bash_script) $(DESTDIR)$(bash_completion_dir)/notmuch
+       mkdir -p "$(DESTDIR)$(bash_completion_dir)"
+       install -m0644 $(bash_script) "$(DESTDIR)$(bash_completion_dir)/notmuch"
 endif
 ifeq ($(WITH_ZSH),1)
-       mkdir -p $(DESTDIR)$(zsh_completion_dir)
-       install -m0644 $(zsh_script) $(DESTDIR)$(zsh_completion_dir)/_notmuch
+       mkdir -p "$(DESTDIR)$(zsh_completion_dir)"
+       install -m0644 $(zsh_script) "$(DESTDIR)$(zsh_completion_dir)/_notmuch"
 endif
index 9ea8e491a6d6308f430f9d2d1b0b6554e27af803..1c4166feca88d86164bc088d790685522f7f1062 100644 (file)
@@ -32,11 +32,11 @@ endif
 
 .PHONY: install-emacs
 install-emacs:
-       mkdir -p $(DESTDIR)$(emacslispdir)
-       install -m0644 $(emacs_sources) $(DESTDIR)$(emacslispdir)
+       mkdir -p "$(DESTDIR)$(emacslispdir)"
+       install -m0644 $(emacs_sources) "$(DESTDIR)$(emacslispdir)"
 ifeq ($(HAVE_EMACS),1)
-       install -m0644 $(emacs_bytecode) $(DESTDIR)$(emacslispdir)
+       install -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)"
 endif
-       install -m0644 $(emacs_images) $(DESTDIR)$(emacslispdir)
+       install -m0644 $(emacs_images) "$(DESTDIR)$(emacslispdir)"
 
 CLEAN := $(CLEAN) $(emacs_bytecode)
index 5233ea6abe908a34647a4a0613c72395fc4a8fa7..f4b2c7b9603b383ee8ad39b14d36771f130358ea 100644 (file)
@@ -86,12 +86,12 @@ install: install-$(dir)
 # variable that is not reused.
 lib := $(dir)
 install-$(dir):
-       mkdir -p $(DESTDIR)$(libdir)/
-       install -m0644 $(lib)/$(LIBNAME) $(DESTDIR)$(libdir)/
-       ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME)
-       ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME)
-       mkdir -p $(DESTDIR)$(includedir)
-       install -m0644 $(lib)/notmuch.h $(DESTDIR)$(includedir)/
+       mkdir -p "$(DESTDIR)$(libdir)/"
+       install -m0644 "$(lib)/$(LIBNAME)" "$(DESTDIR)$(libdir)/"
+       ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(SONAME)"
+       ln -sf $(LIBNAME) "$(DESTDIR)$(libdir)/$(LINKER_NAME)"
+       mkdir -p "$(DESTDIR)$(includedir)"
+       install -m0644 "$(lib)/notmuch.h" "$(DESTDIR)$(includedir)/"
        $(LIBRARY_INSTALL_POST_COMMAND)
 
 SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)