[notmuch] [PATCH] emacs: Move emacs UI (currently just one file) to subdirectory.

david at tethera.net david at tethera.net
Tue Feb 9 19:45:28 PST 2010


From: David Bremner <bremner at unb.ca>

Add emacs/Makefile.local and emacs/Makefile. Move emacs targets into
emacs/Makefile.local, but leave the byte compilation rule in the top
level Makefile.

---

I decided to put the actual targets for byte compilation and installation in
emacs/Makefile.local. This seems more modular to me.

 Makefile                       |    1 +
 Makefile.local                 |   10 ----------
 emacs/Makefile                 |    7 +++++++
 emacs/Makefile.local           |   19 +++++++++++++++++++
 notmuch.el => emacs/notmuch.el |    0
 5 files changed, 27 insertions(+), 10 deletions(-)
 create mode 100644 emacs/Makefile
 create mode 100644 emacs/Makefile.local
 rename notmuch.el => emacs/notmuch.el (100%)

diff --git a/Makefile b/Makefile
index 64b9d4a..bd8f50a 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,7 @@ include Makefile.config
 
 include lib/Makefile.local
 include compat/Makefile.local
+include emacs/Makefile.local
 include Makefile.local
 
 # The user has not set any verbosity, default to quiet mode and inform the
diff --git a/Makefile.local b/Makefile.local
index 04bac83..8431eba 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -1,5 +1,3 @@
-emacs: notmuch.elc
-
 notmuch_client_srcs =		\
 	$(notmuch_compat_srcs)	\
 	debugger.c		\
@@ -35,14 +33,6 @@ install: all notmuch.1.gz
 	install notmuch $(DESTDIR)$(prefix)/bin/
 	install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
 
-install-emacs: install emacs
-	for d in $(DESTDIR)/$(emacs_lispdir) ; \
-	do \
-		install -d $$d ; \
-	done ;
-	install -m0644 notmuch.el $(DESTDIR)$(emacs_lispdir)
-	install -m0644 notmuch.elc $(DESTDIR)$(emacs_lispdir)
-
 install-desktop:
 	install -d $(DESTDIR)$(desktop_dir)
 	desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop
diff --git a/emacs/Makefile b/emacs/Makefile
new file mode 100644
index 0000000..b6859ea
--- /dev/null
+++ b/emacs/Makefile
@@ -0,0 +1,7 @@
+# See Makfefile.local for the list of files to be compiled in this
+# directory.
+all:
+	$(MAKE) -C .. all
+
+.DEFAULT:
+	$(MAKE) -C .. $@
diff --git a/emacs/Makefile.local b/emacs/Makefile.local
new file mode 100644
index 0000000..c6ca142
--- /dev/null
+++ b/emacs/Makefile.local
@@ -0,0 +1,19 @@
+dir=emacs
+emacs_sources=                 \
+	$(dir)/notmuch.el
+
+emacs_bytecode=$(subst .el,.elc,$(emacs_sources))
+
+emacs: $(emacs_bytecode)
+
+install-emacs: install emacs
+	for d in $(DESTDIR)/$(emacs_lispdir) ; \
+	do \
+		install -d $$d ; \
+	done ;
+	for f in $(emacs_sources) $(emacs_bytecode); \
+	do \
+		install -m0644 $$f $(DESTDIR)$(emacs_lispdir) ;\
+	done;
+
+CLEAN := $(CLEAN) $(emacs_bytecode)
diff --git a/notmuch.el b/emacs/notmuch.el
similarity index 100%
rename from notmuch.el
rename to emacs/notmuch.el
-- 
1.6.5



More information about the notmuch mailing list