-emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir)
-# Hard-code if this system doesn't have an emacs.pc file
-ifeq ($(emacs_lispdir),)
- emacs_lispdir = $(prefix)/share/emacs/site-lisp
-endif
-
-bash_completion_dir = /etc/bash_completion.d
-
-all_deps = Makefile Makefile.local Makefile.config \
- lib/Makefile lib/Makefile.local
-
-# Now smash together user's values with our extra values
-override CFLAGS += $(WARN_CFLAGS) $(extra_cflags)
-override CXXFLAGS += $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
-
-override LDFLAGS += \
- $(shell pkg-config --libs glib-2.0 gmime-2.4 talloc) \
- $(shell xapian-config --libs)
-
-all: notmuch notmuch.1.gz
-
-# Before including any other Makefile fragments, get settings from the
-# output of configure
-Makefile.config: configure
- ./configure
+# If Makefile.config doesn't exist, then srcdir won't be
+# set. Conditionally set it (assuming a plain srcdir build) so that
+# the rule to generate Makefile.config can actually work.
+srcdir ?= .