unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH 7/8] build: install notmuch-emacs-mua.desktop file with emacs
Date: Thu,  3 Nov 2016 22:38:00 +0200	[thread overview]
Message-ID: <481f62d851d6981a539e9ed78ecf3e826be7e1d2.1478205331.git.jani@nikula.org> (raw)
In-Reply-To: <cover.1478205331.git.jani@nikula.org>
In-Reply-To: <cover.1478205331.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 2a0ce9eb4156..009d33ab4f92 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 76ba974c4065..a984023f7840 100644
--- a/emacs/Makefile.local
+++ b/emacs/Makefile.local
@@ -87,10 +87,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
-- 
2.1.4

  parent reply	other threads:[~2016-11-03 20:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 20:37 [PATCH 0/8] improvements around notmuch-emacs-mua Jani Nikula
2016-11-03 20:37 ` [PATCH 1/8] completion: complete notmuch emacs-mua Jani Nikula
2016-11-03 20:37 ` [PATCH 2/8] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand Jani Nikula
2016-11-03 20:37 ` [PATCH 3/8] emacs: move notmuch-emacs-mua under emacs Jani Nikula
2016-11-03 20:37 ` [PATCH 4/8] build: install notmuch-emacs-mua with notmuch-emacs Jani Nikula
2016-11-03 20:37 ` [PATCH 5/8] notmuch.desktop: move under emacs as notmuch-emacs-mua.desktop Jani Nikula
2016-11-03 20:37 ` [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto Jani Nikula
2016-11-21 11:34   ` David Bremner
2016-11-21 11:44     ` Jani Nikula
2016-11-21 12:29       ` Tomi Ollila
2016-11-21 16:22       ` Keith Amidon
2016-11-21 20:49         ` Jani Nikula
2016-11-21 20:52           ` Jani Nikula
2016-11-03 20:38 ` Jani Nikula [this message]
2016-11-03 20:38 ` [PATCH 8/8] build: update the desktop database after installing the desktop file Jani Nikula

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=481f62d851d6981a539e9ed78ecf3e826be7e1d2.1478205331.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).