aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 4ca74a3f..ffee659b 100644
--- 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 ""