--- /dev/null
+Return-Path: <bremner@tethera.net>\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 119B1431FD7\r
+ for <notmuch@notmuchmail.org>; Wed, 19 Mar 2014 17:48:29 -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 CDiBlDTFKDzg for <notmuch@notmuchmail.org>;\r
+ Wed, 19 Mar 2014 17:48:24 -0700 (PDT)\r
+Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id C746D431FBF\r
+ for <notmuch@notmuchmail.org>; Wed, 19 Mar 2014 17:48:22 -0700 (PDT)\r
+Received: from remotemail by yantan.tethera.net with local (Exim 4.80)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1WQR9i-0000Hj-FV; Wed, 19 Mar 2014 21:48:22 -0300\r
+Received: (nullmailer pid 22551 invoked by uid 1000); Thu, 20 Mar 2014\r
+ 00:48:11 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/3] build: compute subdirectories from the presence of\r
+ Makefile.local\r
+Date: Wed, 19 Mar 2014 21:48:02 -0300\r
+Message-Id: <1395276484-22363-2-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.9.0\r
+In-Reply-To: <1395276484-22363-1-git-send-email-david@tethera.net>\r
+References: <1395276484-22363-1-git-send-email-david@tethera.net>\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: Thu, 20 Mar 2014 00:48:29 -0000\r
+\r
+This allows the fragile sed command in configure to be replaced with a somewhat\r
+less fragile find command.\r
+---\r
+ Makefile | 3 +--\r
+ configure | 2 +-\r
+ 2 files changed, 2 insertions(+), 3 deletions(-)\r
+\r
+diff --git a/Makefile b/Makefile\r
+index 061c55a..74b476c 100644\r
+--- a/Makefile\r
++++ b/Makefile\r
+@@ -5,8 +5,7 @@ all:\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
++subdirs = $(dir $(shell find . -mindepth 2 -name Makefile.local))\r
+ \r
+ # We make all targets depend on the Makefiles themselves.\r
+ global_deps = Makefile Makefile.config Makefile.local \\r
+diff --git a/configure b/configure\r
+index fb276f1..b3b1b44 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -23,7 +23,7 @@ srcdir=$(dirname "$0")\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 $(cd $srcdir && find . -name Makefile.local -exec dirname {} \;); do\r
+ mkdir -p "$dir"\r
+ cp "$srcdir"/"$dir"/Makefile.local "$dir"\r
+ cp "$srcdir"/"$dir"/Makefile "$dir"\r
+-- \r
+1.9.0\r
+\r