Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / d5 / d35f884a3f6b95033178245d9fad3d4a4cf585
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 5391F429E48\r
6         for <notmuch@notmuchmail.org>; Sun,  3 Nov 2013 13:55:14 -0800 (PST)\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 AjVJArPEdd8k for <notmuch@notmuchmail.org>;\r
16         Sun,  3 Nov 2013 13:55:08 -0800 (PST)\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 945AA429E38\r
19         for <notmuch@notmuchmail.org>; Sun,  3 Nov 2013 13:55:08 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 0A9F4100051;\r
22         Sun,  3 Nov 2013 23:55:01 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Jed Brown <jed@59A2.org>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH 1/1] build: remove trailing '/.' when doing mkdir -p\r
26         .deps/.\r
27 In-Reply-To: <87fvrd8pnc.fsf@mcs.anl.gov>\r
28 References: <1383487535-21597-1-git-send-email-tomi.ollila@iki.fi>\r
29         <87fvrd8pnc.fsf@mcs.anl.gov>\r
30 User-Agent: Notmuch/0.16+119~g219c55f (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: Sun, 03 Nov 2013 23:55:00 +0200\r
36 Message-ID: <m2habtcfrf.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: Sun, 03 Nov 2013 21:55:14 -0000\r
52 \r
53 On Sun, Nov 03 2013, Jed Brown <jed@59A2.org> wrote:\r
54 \r
55 > Tomi Ollila <tomi.ollila@iki.fi> writes:\r
56 >\r
57 >>  %.o: %.cc $(global_deps)\r
58 >> -    @mkdir -p .deps/$(@D)\r
59 >> +    @mkdir -p $(patsubst %/.,%,.deps/$(@D))\r
60 >>      $(call quiet,CXX $(CPPFLAGS) $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d\r
61 >\r
62 > An alternative approach is to use directory marker files [1] to clean up\r
63 > the recipes that need output directories and to satisfy Paul's second\r
64 > rule of makefiles [2].\r
65 >\r
66 > .SECONDEXPANSION:\r
67 >\r
68 > %.o: %.cc $(global_deps) | .deps/$$(@D)/.DIR\r
69 >       $(call quiet,CXX $(CPPFLAGS) $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d\r
70 >\r
71 > %/.DIR:\r
72 >       @mkdir -p $(patsubst %/.,%,$(@D))\r
73 >       @touch $@\r
74 >\r
75 > .PRECIOUS: %.DIR\r
76 \r
77 Hmm, nice suggestion... the diff to be reviewed is just soo much bigger ;/\r
78 \r
79 Now that I learned new things [11] yet another alternative is:\r
80 \r
81 diff --git a/Makefile.local b/Makefile.local\r
82 index 72524eb..cc1a0cb 100644\r
83 --- a/Makefile.local\r
84 +++ b/Makefile.local\r
85 @@ -235,12 +235,15 @@ endif\r
86  # Otherwise, print the full command line.\r
87  quiet ?= $($(shell echo $1 | sed -e s'/ .*//'))\r
88  \r
89 -%.o: %.cc $(global_deps)\r
90 -       @mkdir -p .deps/$(@D)\r
91 +depdirs = $(subdirs:%=.deps/%)\r
92 +\r
93 +$(depdirs):\r
94 +       @mkdir -p $(depdirs)\r
95 +\r
96 +%.o: %.cc $(global_deps) | $(depdirs)\r
97         $(call quiet,CXX $(CPPFLAGS) $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d\r
98  \r
99 -%.o: %.c $(global_deps)\r
100 -       @mkdir -p .deps/$(@D)\r
101 +%.o: %.c $(global_deps) | $(depdirs)\r
102         $(call quiet,CC $(CPPFLAGS) $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d\r
103  \r
104  .PHONY : clean\r
105 \r
106 \r
107 still, for the time being I'd still use the patch I originally proposed\r
108 due to the triviality I change...\r
109 \r
110 \r
111 [11] http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html\r
112 \r
113 Tomi\r
114 \r
115 \r
116 > [1] http://www.cmcrossroads.com/article/making-directories-gnu-make\r
117 > [2] http://make.paulandlesley.org/rules.html\r