This allows support for filenames with spaces in them.
.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)"
.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
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
.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)
# 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)