unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Austin Clements <amdragon@MIT.EDU>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade
Date: Thu, 13 Feb 2014 09:26:43 +0200	[thread overview]
Message-ID: <m2sirn1nik.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <20140213071026.GX4375@mit.edu>

On Thu, Feb 13 2014, Austin Clements <amdragon@MIT.EDU> 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

  reply	other threads:[~2014-02-13  7:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-25 10:21 [PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade Tomi Ollila
2014-02-13  7:10 ` Austin Clements
2014-02-13  7:26   ` Tomi Ollila [this message]
2014-02-13  7:49     ` Austin Clements
2014-02-14 19:24       ` Tomi Ollila
2014-02-14 21:58         ` Austin Clements
2014-02-19 19:54           ` Austin Clements
2014-02-19 20:47             ` Tomi Ollila
2014-02-20  4:24               ` [PATCH] emacs: Avoid rebuilding .eldeps even when there's nothing to do Austin Clements
2014-02-20 17:00                 ` Tomi Ollila
2014-02-22  1:21                 ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2sirn1nik.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=amdragon@MIT.EDU \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).