]> git.notmuchmail.org Git - notmuch/blobdiff - Makefile
Improve installation of emacs mode.
[notmuch] / Makefile
index 023b2ec85fed32059dae867386a189573b5e0e66..17fa4a2206bd520e02270223bb6d380e2ec26f54 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,9 @@ CFLAGS=-O2
 extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc)
 extra_cxxflags := $(shell xapian-config --cxxflags)
 
+emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir)
+emacs_startdir := $(shell pkg-config emacs --variable sitestartdir)
+
 # Now smash together user's values with our extra values
 override CFLAGS += $(WARN_FLAGS) $(extra_cflags)
 override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)
@@ -28,6 +31,9 @@ include Makefile.config
 %.o: %.c
        $(CC) -c $(CFLAGS) $< -o $@
 
+%.elc: %.el
+       emacs -batch -f batch-byte-compile $<
+
 .deps/%.d: %.c
        @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \
        $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \