--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 14B1D431FBF\r
+ for <notmuch@notmuchmail.org>; Tue, 25 Mar 2014 05:32:05 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 2BJCL23qCJrW for <notmuch@notmuchmail.org>;\r
+ Tue, 25 Mar 2014 05:32:01 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 8402E431FBD\r
+ for <notmuch@notmuchmail.org>; Tue, 25 Mar 2014 05:32:01 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 5EA511000E5;\r
+ Tue, 25 Mar 2014 14:31:54 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] build: move canonical list of subdirectories to configure\r
+ script\r
+In-Reply-To: <1395747624-4411-1-git-send-email-david@tethera.net>\r
+References: <87d2hbhvnq.fsf@zancas.localnet>\r
+ <1395747624-4411-1-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.17+159~gb806a13 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 25 Mar 2014 14:31:54 +0200\r
+Message-ID: <m2a9cejw79.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 25 Mar 2014 12:32:05 -0000\r
+\r
+On Tue, Mar 25 2014, David Bremner <david@tethera.net> wrote:\r
+\r
+> The configure script needs this list for out of tree builds. Grabbing\r
+> it from the Makefile via sed was fragile and broken.\r
+> ---\r
+\r
+This is exactly what I was going to suggest if I had the time.\r
+\r
+LGTM.\r
+\r
+Tomi\r
+\r
+\r
+> Makefile | 15 +++++----------\r
+> configure | 8 +++++++-\r
+> 2 files changed, 12 insertions(+), 11 deletions(-)\r
+>\r
+> diff --git a/Makefile b/Makefile\r
+> index 061c55a..4c0e8c6 100644\r
+> --- a/Makefile\r
+> +++ b/Makefile\r
+> @@ -2,16 +2,6 @@\r
+> # given explicitly on the command line) so mention it first.\r
+> all:\r
+> \r
+> -# List all subdirectories here. Each contains its own Makefile.local.\r
+> -# Use of '=', without '+=', seems to be required for out-of-tree\r
+> -# builds to work.\r
+> -subdirs = compat completion doc emacs lib parse-time-string \\r
+> - performance-test util test test/test-databases\r
+> -\r
+> -# We make all targets depend on the Makefiles themselves.\r
+> -global_deps = Makefile Makefile.config Makefile.local \\r
+> - $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)\r
+> -\r
+> # Sub-directory Makefile.local fragments can append to these variables\r
+> # to have directory-specific cflags as necessary.\r
+> \r
+> @@ -27,6 +17,11 @@ extra_cxxflags :=\r
+> srcdir ?= .\r
+> \r
+> include Makefile.config\r
+> +\r
+> +# We make all targets depend on the Makefiles themselves.\r
+> +global_deps = Makefile Makefile.config Makefile.local \\r
+> + $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)\r
+> +\r
+> Makefile.config: $(srcdir)/configure\r
+> ifeq ($(configure_options),)\r
+> @echo ""\r
+> diff --git a/configure b/configure\r
+> index fb276f1..ab73317 100755\r
+> --- a/configure\r
+> +++ b/configure\r
+> @@ -19,11 +19,14 @@ readonly DEFAULT_IFS="$IFS"\r
+> \r
+> srcdir=$(dirname "$0")\r
+> \r
+> +subdirs="util compat lib parse-time-string completion doc emacs"\r
+> +subdirs="${subdirs} performance-test test test/test-databases"\r
+> +\r
+> # For a non-srcdir configure invocation (such as ../configure), create\r
+> # the directory structure and copy Makefiles.\r
+> if [ "$srcdir" != "." ]; then\r
+> \r
+> - for dir in . $(grep "^subdirs *=" "$srcdir"/Makefile | sed -e "s/subdirs *= *//"); do\r
+> + for dir in . ${subdirs}; do\r
+> mkdir -p "$dir"\r
+> cp "$srcdir"/"$dir"/Makefile.local "$dir"\r
+> cp "$srcdir"/"$dir"/Makefile "$dir"\r
+> @@ -698,6 +701,9 @@ cat > Makefile.config <<EOF\r
+> # directory (the current directory at the time configure was run).\r
+> srcdir = ${srcdir}\r
+> \r
+> +# subdirectories to build\r
+> +subdirs = ${subdirs}\r
+> +\r
+> configure_options = $@\r
+> \r
+> # We use vpath directives (rather than the VPATH variable) since the\r
+> -- \r
+> 1.9.0\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r