Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 31 / 702f659a4b5a23b45ac5deb3bf502089c1d330
1 Return-Path: <tomi.ollila@iki.fi>\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 14B1D431FBF\r
6         for <notmuch@notmuchmail.org>; Tue, 25 Mar 2014 05:32:05 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 2BJCL23qCJrW for <notmuch@notmuchmail.org>;\r
16         Tue, 25 Mar 2014 05:32:01 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 8402E431FBD\r
19         for <notmuch@notmuchmail.org>; Tue, 25 Mar 2014 05:32:01 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 5EA511000E5;\r
22         Tue, 25 Mar 2014 14:31:54 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] build: move canonical list of subdirectories to configure\r
26         script\r
27 In-Reply-To: <1395747624-4411-1-git-send-email-david@tethera.net>\r
28 References: <87d2hbhvnq.fsf@zancas.localnet>\r
29         <1395747624-4411-1-git-send-email-david@tethera.net>\r
30 User-Agent: Notmuch/0.17+159~gb806a13 (http://notmuchmail.org) Emacs/24.3.1\r
31         (x86_64-unknown-linux-gnu)\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
33         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
34         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
35 Date: Tue, 25 Mar 2014 14:31:54 +0200\r
36 Message-ID: <m2a9cejw79.fsf@guru.guru-group.fi>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Tue, 25 Mar 2014 12:32:05 -0000\r
52 \r
53 On Tue, Mar 25 2014, David Bremner <david@tethera.net> wrote:\r
54 \r
55 > The configure script needs this list for out of tree builds. Grabbing\r
56 > it from the Makefile via sed was fragile and broken.\r
57 > ---\r
58 \r
59 This is exactly what I was going to suggest if I had the time.\r
60 \r
61 LGTM.\r
62 \r
63 Tomi\r
64 \r
65 \r
66 >  Makefile  | 15 +++++----------\r
67 >  configure |  8 +++++++-\r
68 >  2 files changed, 12 insertions(+), 11 deletions(-)\r
69 >\r
70 > diff --git a/Makefile b/Makefile\r
71 > index 061c55a..4c0e8c6 100644\r
72 > --- a/Makefile\r
73 > +++ b/Makefile\r
74 > @@ -2,16 +2,6 @@\r
75 >  # given explicitly on the command line) so mention it first.\r
76 >  all:\r
77 >  \r
78 > -# List all subdirectories here. Each contains its own Makefile.local.\r
79 > -# Use of '=', without '+=', seems to be required for out-of-tree\r
80 > -# builds to work.\r
81 > -subdirs = compat completion doc emacs lib parse-time-string  \\r
82 > -     performance-test util test test/test-databases\r
83 > -\r
84 > -# We make all targets depend on the Makefiles themselves.\r
85 > -global_deps = Makefile Makefile.config Makefile.local \\r
86 > -     $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)\r
87 > -\r
88 >  # Sub-directory Makefile.local fragments can append to these variables\r
89 >  # to have directory-specific cflags as necessary.\r
90 >  \r
91 > @@ -27,6 +17,11 @@ extra_cxxflags :=\r
92 >  srcdir ?= .\r
93 >  \r
94 >  include Makefile.config\r
95 > +\r
96 > +# We make all targets depend on the Makefiles themselves.\r
97 > +global_deps = Makefile Makefile.config Makefile.local \\r
98 > +     $(subdirs:%=%/Makefile) $(subdirs:%=%/Makefile.local)\r
99 > +\r
100 >  Makefile.config: $(srcdir)/configure\r
101 >  ifeq ($(configure_options),)\r
102 >       @echo ""\r
103 > diff --git a/configure b/configure\r
104 > index fb276f1..ab73317 100755\r
105 > --- a/configure\r
106 > +++ b/configure\r
107 > @@ -19,11 +19,14 @@ readonly DEFAULT_IFS="$IFS"\r
108 >  \r
109 >  srcdir=$(dirname "$0")\r
110 >  \r
111 > +subdirs="util compat lib parse-time-string completion doc emacs"\r
112 > +subdirs="${subdirs} performance-test test test/test-databases"\r
113 > +\r
114 >  # For a non-srcdir configure invocation (such as ../configure), create\r
115 >  # the directory structure and copy Makefiles.\r
116 >  if [ "$srcdir" != "." ]; then\r
117 >  \r
118 > -    for dir in . $(grep "^subdirs *=" "$srcdir"/Makefile | sed -e "s/subdirs *= *//"); do\r
119 > +    for dir in . ${subdirs}; do\r
120 >       mkdir -p "$dir"\r
121 >       cp "$srcdir"/"$dir"/Makefile.local "$dir"\r
122 >       cp "$srcdir"/"$dir"/Makefile "$dir"\r
123 > @@ -698,6 +701,9 @@ cat > Makefile.config <<EOF\r
124 >  # directory (the current directory at the time configure was run).\r
125 >  srcdir = ${srcdir}\r
126 >  \r
127 > +# subdirectories to build\r
128 > +subdirs = ${subdirs}\r
129 > +\r
130 >  configure_options = $@\r
131 >  \r
132 >  # We use vpath directives (rather than the VPATH variable) since the\r
133 > -- \r
134 > 1.9.0\r
135 >\r
136 > _______________________________________________\r
137 > notmuch mailing list\r
138 > notmuch@notmuchmail.org\r
139 > http://notmuchmail.org/mailman/listinfo/notmuch\r