Re: [PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade

Subject: Re: [PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade

Date: Thu, 13 Feb 2014 02:10:27 -0500

To: Tomi Ollila

Cc: notmuch@notmuchmail.org

From: Austin Clements


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)?

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.

Thread: