unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH v2 8/9] build: install notmuch-emacs-mua.desktop file with emacs
Date: Mon, 21 Nov 2016 23:13:40 +0200	[thread overview]
Message-ID: <e72f0bf8e04b83d758f5c059e2155cd0a31c62ed.1479762655.git.jani@nikula.org> (raw)
In-Reply-To: <cover.1479762655.git.jani@nikula.org>
In-Reply-To: <cover.1479762655.git.jani@nikula.org>

There is really no need to have a separate install target for the
desktop file. Just install the desktop file with emacs, with a
configure option to opt out.
---
 configure            | 13 +++++++++++++
 emacs/Makefile.local |  5 ++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index f0fc466eead5..27afc8076c81 100755
--- a/configure
+++ b/configure
@@ -70,6 +70,7 @@ LIBDIR=
 WITH_DOCS=1
 WITH_API_DOCS=1
 WITH_EMACS=1
+WITH_DESKTOP=1
 WITH_BASH=1
 WITH_RUBY=1
 WITH_ZSH=1
@@ -141,6 +142,7 @@ Some features can be disabled (--with-feature=no is equivalent to
 	--without-docs			Do not install documentation
 	--without-api-docs		Do not install API man page
 	--without-emacs			Do not install lisp file
+	--without-desktop		Do not install desktop file
 	--without-ruby			Do not install ruby bindings
 	--without-zsh-completion	Do not install zsh completions files
 	--without-retry-lock		Do not use blocking xapian opens, even if available
@@ -209,6 +211,14 @@ for option; do
 	fi
     elif [ "${option}" = '--without-emacs' ] ; then
 	WITH_EMACS=0
+    elif [ "${option%%=*}" = '--with-desktop' ]; then
+	if [ "${option#*=}" = 'no' ]; then
+	    WITH_DESKTOP=0
+	else
+	    WITH_DESKTOP=1
+	fi
+    elif [ "${option}" = '--without-desktop' ] ; then
+	WITH_DESKTOP=0
     elif [ "${option%%=*}" = '--with-bash-completion' ]; then
 	if [ "${option#*=}" = 'no' ]; then
 	    WITH_BASH=0
@@ -1123,6 +1133,9 @@ VALGRIND_CFLAGS = ${valgrind_cflags}
 # Support for emacs
 WITH_EMACS = ${WITH_EMACS}
 
+# Support for desktop file
+WITH_DESKTOP = ${WITH_DESKTOP}
+
 # Support for bash completion
 WITH_BASH = ${WITH_BASH}
 
diff --git a/emacs/Makefile.local b/emacs/Makefile.local
index b47577ac1110..ffa8421ebd45 100644
--- a/emacs/Makefile.local
+++ b/emacs/Makefile.local
@@ -96,10 +96,9 @@ endif
 	install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
 	mkdir -p "$(DESTDIR)$(prefix)/bin/"
 	install $(emacs_mua) "$(DESTDIR)$(prefix)/bin"
-
-.PHONY: install-desktop
-install-desktop:
+ifeq ($(WITH_DESKTOP),1)
 	mkdir -p "$(DESTDIR)$(desktop_dir)"
 	desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" $(emacs_mua_desktop)
+endif
 
 CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el
-- 
2.1.4

  parent reply	other threads:[~2016-11-21 21:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 21:13 [PATCH v2 0/9] improvements around notmuch-emacs-mua Jani Nikula
2016-11-21 21:13 ` [PATCH v2 1/9] completion: complete notmuch emacs-mua Jani Nikula
2016-11-27  9:29   ` [PATCH v3] " Jani Nikula
2016-11-21 21:13 ` [PATCH v2 2/9] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand Jani Nikula
2016-11-21 21:13 ` [PATCH v2 3/9] emacs: move notmuch-emacs-mua under emacs Jani Nikula
2016-11-21 21:13 ` [PATCH v2 4/9] notmuch-emacs-mua: add --hello parameter Jani Nikula
2016-11-25 16:34   ` Tomi Ollila
2016-11-21 21:13 ` [PATCH v2 5/9] build: install notmuch-emacs-mua with notmuch-emacs Jani Nikula
2016-11-21 21:13 ` [PATCH v2 6/9] notmuch.desktop: move under emacs as notmuch-emacs-mua.desktop Jani Nikula
2016-11-26 12:53   ` David Bremner
2016-11-21 21:13 ` [PATCH v2 7/9] emacs/desktop: update to use notmuch-emacs-mua and handle mailto Jani Nikula
2016-11-21 21:13 ` Jani Nikula [this message]
2016-11-25 16:39   ` [PATCH v2 8/9] build: install notmuch-emacs-mua.desktop file with emacs Tomi Ollila
2016-11-26  9:37     ` [PATCH v3] " Jani Nikula
2016-11-26 17:07       ` Tomi Ollila
2016-11-29  2:09       ` David Bremner
2016-11-21 21:13 ` [PATCH v2 9/9] build: update the desktop database after installing the desktop file Jani Nikula
2016-11-26  9:43   ` [PATCH v3] " Jani Nikula
2016-11-29  2:10     ` David Bremner

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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=e72f0bf8e04b83d758f5c059e2155cd0a31c62ed.1479762655.git.jani@nikula.org \
    --to=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).