1 Return-Path: <bremner@tethera.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id F1A28431FBF
\r
6 for <notmuch@notmuchmail.org>; Tue, 25 Mar 2014 04:40:47 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id civBwo0zIRZn for <notmuch@notmuchmail.org>;
\r
16 Tue, 25 Mar 2014 04:40:43 -0700 (PDT)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 42D81431FBD
\r
21 for <notmuch@notmuchmail.org>; Tue, 25 Mar 2014 04:40:43 -0700 (PDT)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <bremner@tethera.net>)
\r
24 id 1WSPik-0005Ae-Hn; Tue, 25 Mar 2014 08:40:42 -0300
\r
25 Received: (nullmailer pid 4449 invoked by uid 1000); Tue, 25 Mar 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: [PATCH] build: move canonical list of subdirectories to configure
\r
31 Date: Tue, 25 Mar 2014 08:40:24 -0300
\r
32 Message-Id: <1395747624-4411-1-git-send-email-david@tethera.net>
\r
33 X-Mailer: git-send-email 1.9.0
\r
34 In-Reply-To: <87d2hbhvnq.fsf@zancas.localnet>
\r
35 References: <87d2hbhvnq.fsf@zancas.localnet>
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.13
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Tue, 25 Mar 2014 11:40:48 -0000
\r
50 The configure script needs this list for out of tree builds. Grabbing
\r
51 it from the Makefile via sed was fragile and broken.
\r
53 Makefile | 15 +++++----------
\r
54 configure | 8 +++++++-
\r
55 2 files changed, 12 insertions(+), 11 deletions(-)
\r
57 diff --git a/Makefile b/Makefile
\r
58 index 061c55a..4c0e8c6 100644
\r
62 # given explicitly on the command line) so mention it first.
\r
65 -# List all subdirectories here. Each contains its own Makefile.local.
\r
66 -# Use of '=', without '+=', seems to be required for out-of-tree
\r
68 -subdirs = compat completion doc emacs lib parse-time-string \
\r
69 - performance-test util test test/test-databases
\r
71 -# We make all targets depend on the Makefiles themselves.
\r
72 -global_deps = Makefile Makefile.config Makefile.local \
\r
73 - $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)
\r
75 # Sub-directory Makefile.local fragments can append to these variables
\r
76 # to have directory-specific cflags as necessary.
\r
78 @@ -27,6 +17,11 @@ extra_cxxflags :=
\r
81 include Makefile.config
\r
83 +# We make all targets depend on the Makefiles themselves.
\r
84 +global_deps = Makefile Makefile.config Makefile.local \
\r
85 + $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)
\r
87 Makefile.config: $(srcdir)/configure
\r
88 ifeq ($(configure_options),)
\r
90 diff --git a/configure b/configure
\r
91 index fb276f1..ab73317 100755
\r
94 @@ -19,11 +19,14 @@ readonly DEFAULT_IFS="$IFS"
\r
96 srcdir=$(dirname "$0")
\r
98 +subdirs="util compat lib parse-time-string completion doc emacs"
\r
99 +subdirs="${subdirs} performance-test test test/test-databases"
\r
101 # For a non-srcdir configure invocation (such as ../configure), create
\r
102 # the directory structure and copy Makefiles.
\r
103 if [ "$srcdir" != "." ]; then
\r
105 - for dir in . $(grep "^subdirs *=" "$srcdir"/Makefile | sed -e "s/subdirs *= *//"); do
\r
106 + for dir in . ${subdirs}; do
\r
108 cp "$srcdir"/"$dir"/Makefile.local "$dir"
\r
109 cp "$srcdir"/"$dir"/Makefile "$dir"
\r
110 @@ -698,6 +701,9 @@ cat > Makefile.config <<EOF
\r
111 # directory (the current directory at the time configure was run).
\r
114 +# subdirectories to build
\r
115 +subdirs = ${subdirs}
\r
117 configure_options = $@
\r
119 # We use vpath directives (rather than the VPATH variable) since the
\r