From: Tomi Ollila Date: Thu, 13 Feb 2014 07:26:43 +0000 (+0200) Subject: Re: [PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2c7e47f638ba1e16ee1a7993e082f0937b0a2d67;p=notmuch-archives.git Re: [PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade --- diff --git a/2c/34f472af2249bd19a8bed38e9b394001e404c5 b/2c/34f472af2249bd19a8bed38e9b394001e404c5 new file mode 100644 index 000000000..31dcc9f33 --- /dev/null +++ b/2c/34f472af2249bd19a8bed38e9b394001e404c5 @@ -0,0 +1,105 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 10FE6431FBD + for ; Wed, 12 Feb 2014 23:26:53 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id fe4ybxcIE80P for ; + Wed, 12 Feb 2014 23:26:49 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 6F377431FAE + for ; Wed, 12 Feb 2014 23:26:49 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 5769A1000FA; + Thu, 13 Feb 2014 09:26:43 +0200 (EET) +From: Tomi Ollila +To: Austin Clements +Subject: Re: [PATCH 1/1] emacs: always write emacs/.eldeps when the target is + remade +In-Reply-To: <20140213071026.GX4375@mit.edu> +References: <1390645309-2326-1-git-send-email-tomi.ollila@iki.fi> + <20140213071026.GX4375@mit.edu> +User-Agent: Notmuch/0.17+69~g761b031 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 13 Feb 2014 07:26:53 -0000 + +On Thu, Feb 13 2014, Austin Clements wrote: + +> Quoth Tomi Ollila on Jan 25 at 12:21 pm: +>> So that the target is newer than its prerequisites. +>> --- +>> emacs/Makefile.local | 3 +-- +>> 1 file changed, 1 insertion(+), 2 deletions(-) +>> +>> diff --git a/emacs/Makefile.local b/emacs/Makefile.local +>> index 42bfbd9..d5d402e 100644 +>> --- a/emacs/Makefile.local +>> +++ b/emacs/Makefile.local +>> @@ -32,8 +32,7 @@ emacs_bytecode = $(emacs_sources:.el=.elc) +>> ifeq ($(HAVE_EMACS),1) +>> $(dir)/.eldeps: $(dir)/Makefile.local $(dir)/make-deps.el $(emacs_sources) +>> $(call quiet,EMACS) --directory emacs -batch -l make-deps.el \ +>> - -f batch-make-deps $(emacs_sources) > $@.tmp && \ +>> - (cmp -s $@.tmp $@ || mv $@.tmp $@) +>> + -f batch-make-deps $(emacs_sources) > $@.tmp && mv $@.tmp $@ +>> -include $(dir)/.eldeps +>> endif +>> CLEAN+=$(dir)/.eldeps $(dir)/.eldeps.tmp +> +> Is this just so the rule doesn't get run again on the next make +> invocation (unless, of course, a dependent changed)? + +Basically yes. I did multiple builds in rapid succession when developing +something and this thing confused me quite a lot in the beginning... + +> Interestingly, if any of the dependents have changed, but in ways that +> don't affect .eldeps, this change will make the build more expensive +> because it will trigger a make restart after .eldeps is updated. + +I wondered what was the reason for the recipe you've chosen here, has +it something to do with inodes or something ;) (and were going to ask +an alternative to touch (or even : > $@) the target... + +... but now I understand. E.g. change in notmuch-lib.el will cause *all* +.el files to be re-bytecompiled after this change. + +An alternative to this patch would be adding a message to the rule +which informs user to touch .eldeps to avoid re-doing .eldeps if +that irritates one :D + +something like: + +(cmp -s $@.tmp $@ && \ + echo "touch $@ to avoid redoing this target" || mv $@.tmp $@) + +Thanks, + +Tomi