--- /dev/null
+Return-Path: <jani@nikula.org>\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 DB6F9431FAF\r
+ for <notmuch@notmuchmail.org>; Thu, 7 Mar 2013 13:34:34 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 y6nHeAwIC1Sh for <notmuch@notmuchmail.org>;\r
+ Thu, 7 Mar 2013 13:34:34 -0800 (PST)\r
+Received: from mail-la0-f45.google.com (mail-la0-f45.google.com\r
+ [209.85.215.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 1EBDE431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 7 Mar 2013 13:34:33 -0800 (PST)\r
+Received: by mail-la0-f45.google.com with SMTP id er20so1029656lab.18\r
+ for <notmuch@notmuchmail.org>; Thu, 07 Mar 2013 13:34:32 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=x-received:from:to:subject:date:message-id:x-mailer\r
+ :x-gm-message-state;\r
+ bh=OjPKV7+n2tslCxTOiOx6xfJFCD/cGIO66onu0UtwJY4=;\r
+ b=VJWlgG7UIahEfARnL4Sei1CqvNggpZKu4YHzsn+po3DRKKIX+bq3bCY9P3uiO+TfZx\r
+ EV1Peom8qfMny5Y3TzG3b+hit2XTbWnahxLpk07oS6ZDvHCUOp9ZrtJrDbXTVksIdY5P\r
+ k0rzIGZxirL4XzCe/xTyjHZygjAflN6zNvWEq+kD0/knMqPiOHbSdpOKjl+z7UEqkfBq\r
+ xM/7+GIcZpv9pn5IxY1Ba+JcD5MCAqa0X00O5IfI2hLG/DpkGY6jnGQ2RFIrhGP5gWRl\r
+ vVCWefSWUjXHGdPEC+HslB/ZdZK4YeByvFPMGxVm0gTEqkKRiZRF+f7LMQxWZwW9b/Hs\r
+ PYmQ==\r
+X-Received: by 10.152.45.140 with SMTP id n12mr30103229lam.36.1362692071151;\r
+ Thu, 07 Mar 2013 13:34:31 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi.\r
+ [80.223.81.27])\r
+ by mx.google.com with ESMTPS id k15sm998685lbd.6.2013.03.07.13.34.29\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Thu, 07 Mar 2013 13:34:30 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org,\r
+ david@tethera.net\r
+Subject: [PATCH] build: fix out-of-tree builds\r
+Date: Thu, 7 Mar 2013 23:34:28 +0200\r
+Message-Id: <1362692068-30142-1-git-send-email-jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+X-Gm-Message-State:\r
+ ALoCoQmkHTRpTb976vwxOo9A6msZjaxp0jhYEO//QsM2qChZLuT4ihhuxotFQNiR8j26B36vF40p\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, 07 Mar 2013 21:34:35 -0000\r
+\r
+Support for out-of-tree builds was added in\r
+commit 3e4a9d60a9419621b08c647a306843d76c47c2cb\r
+Author: Carl Worth <cworth@cworth.org>\r
+Date: Wed Mar 9 15:02:42 2011 -0800\r
+\r
+ build: Add support for non-source-directory builds.\r
+\r
+and broken in\r
+commit 7beeb8c88a014ecbc53d8241f10683b3c4c16228\r
+Author: David Bremner <bremner@debian.org>\r
+Date: Sat Nov 17 12:28:15 2012 -0400\r
+\r
+ test: initial performance testing infrastructure\r
+\r
+Fix the build breakage. Out-of-tree 'make test' has been broken since\r
+earlier than the above, and remains broken, but at least the build now\r
+works.\r
+\r
+---\r
+\r
+David, does the perf test still work for you with these changes?\r
+---\r
+ Makefile | 3 +--\r
+ performance-test/Makefile.local | 10 +++++-----\r
+ 2 files changed, 6 insertions(+), 7 deletions(-)\r
+\r
+diff --git a/Makefile b/Makefile\r
+index 73a8554..3301d30 100644\r
+--- a/Makefile\r
++++ b/Makefile\r
+@@ -3,8 +3,7 @@\r
+ all:\r
+ \r
+ # List all subdirectories here. Each contains its own Makefile.local\r
+-subdirs := compat completion emacs lib man parse-time-string\r
+-subdirs += performance-test util test\r
++subdirs = compat completion emacs lib man parse-time-string performance-test util test\r
+ \r
+ # We make all targets depend on the Makefiles themselves.\r
+ global_deps = Makefile Makefile.config Makefile.local \\r
+diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local\r
+index 73aa963..d9623d7 100644\r
+--- a/performance-test/Makefile.local\r
++++ b/performance-test/Makefile.local\r
+@@ -2,13 +2,13 @@\r
+ \r
+ dir := performance-test\r
+ \r
+-include $(dir)/version.sh\r
++include $(srcdir)/$(dir)/version.sh\r
+ \r
+-TIME_TEST_SCRIPT := ${dir}/notmuch-time-test\r
+-MEMORY_TEST_SCRIPT := ${dir}/notmuch-memory-test\r
++TIME_TEST_SCRIPT :=$ $(srcdir)/$(dir)/notmuch-time-test\r
++MEMORY_TEST_SCRIPT := $(srcdir)/$(dir)/notmuch-memory-test\r
+ \r
+ CORPUS_NAME := notmuch-email-corpus-$(PERFTEST_VERSION).tar.xz\r
+-TXZFILE := ${dir}/download/${CORPUS_NAME}\r
++TXZFILE := $(srcdir)/$(dir)/download/${CORPUS_NAME}\r
+ SIGFILE := ${TXZFILE}.asc\r
+ DEFAULT_URL := http://notmuchmail.org/releases/${CORPUS_NAME}\r
+ \r
+@@ -39,4 +39,4 @@ $(TXZFILE):\r
+ download-corpus:\r
+ wget -O ${TXZFILE} ${DEFAULT_URL}\r
+ \r
+-CLEAN := $(CLEAN) $(dir)/tmp.* $(dir)/log.* $(dir)/corpus $(dir)/notmuch.cache.*\r
++CLEAN := $(CLEAN) $(srcdir)/$(dir)/tmp.* $(srcdir)/$(dir)/log.* $(srcdir)/$(dir)/corpus $(srcdir)/$(dir)/notmuch.cache.*\r
+-- \r
+1.7.10.4\r
+\r