]> git.notmuchmail.org Git - notmuch/commitdiff
build: Fix a plain "make" to automatically run configure.
authorCarl Worth <cworth@cworth.org>
Thu, 10 Mar 2011 19:29:13 +0000 (11:29 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 10 Mar 2011 19:29:13 +0000 (11:29 -0800)
The recent change to support non-source-directory builds broke this case.

Makefile

index 4ca74a3ff25a223140d6022fa1d5769393f53bd0..ffee659b0eb5f4ccf2921647838a16a66c2f6c69 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,8 +16,13 @@ extra_cflags :=
 extra_cxxflags :=
 
 # Get settings from the output of configure by running it to generate
-# Makefile.config if it doesn't exist yet. And add Makefile.config to
-# our global dependency list.
+# Makefile.config if it doesn't exist yet.
+
+# 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 ?= .
+
 include Makefile.config
 Makefile.config: $(srcdir)/configure
        @echo ""