unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Dan Nicolaescu <dann@ics.uci.edu>, emacs-devel@gnu.org
Subject: Re: Makefile bug in generating mh-loaddefs.el?
Date: Tue, 03 Jul 2007 22:14:00 +0200	[thread overview]
Message-ID: <854pkls0s7.fsf@lola.goethe.zz> (raw)
In-Reply-To: <ufy45l0jp.fsf@gnu.org> (Eli Zaretskii's message of "Tue\, 03 Jul 2007 23\:00\:58 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Dan Nicolaescu <dann@ics.uci.edu>
>> Date: Tue, 03 Jul 2007 11:42:29 -0700
>> 
>> $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
>> 	echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@

[...]

>> Now, if the "$(EMACS) $(EMACSOPT) -l autoload ..." fails, the
>> mh-loaddefs.el file will not be deleted. That seems like a bug to
>> me...
>
> Could you please explain what do you mean by ``will not be
> deleted'', and why you think it's a bug?  The `echo' commands
> overwrite mh-loaddefs.el, don't they? which is akin to deleting the
> (old) file, right?

Not to make.  An empty file is not remade by "make" on a subsequent
run, as opposed to a non-existing file.

> Anyway, of Emacs fails, then Make will stop and announce the error;
> therefore I don't see why you (evidently) want an additional
> manifestation of the problem.
>
> What am I missing?

The behavior in additional runs of make.

(info "(make) Errors")

[...]

   Usually when a command fails, if it has changed the target file at
all, the file is corrupted and cannot be used--or at least it is not
completely updated.  Yet the file's time stamp says that it is now up to
date, so the next time `make' runs, it will not try to update that
file.  The situation is just the same as when the command is killed by a
signal; *note Interrupts::.  So generally the right thing to do is to
delete the target file if the command fails after beginning to change
the file.  `make' will do this if `.DELETE_ON_ERROR' appears as a
target.  This is almost always what you want `make' to do, but it is
not historical practice; so for compatibility, you must explicitly
request it.


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2007-07-03 20:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-03 18:42 Makefile bug in generating mh-loaddefs.el? Dan Nicolaescu
2007-07-03 20:00 ` Eli Zaretskii
2007-07-03 20:14   ` David Kastrup [this message]
2007-07-03 20:25     ` Tom Tromey
2007-07-03 20:55   ` Dan Nicolaescu
2007-07-04  3:17     ` Eli Zaretskii
2007-07-04  4:44       ` Bill Wohler
2007-07-04  6:21         ` David Kastrup
2007-07-04  8:46           ` Stephen J. Turnbull
2007-07-04 14:16           ` Tom Tromey
2007-07-04 14:19             ` Tom Tromey
2007-07-04 21:25         ` Eli Zaretskii
2007-07-04 23:06           ` David Robinow
2007-07-05  3:28             ` Eli Zaretskii

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://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=854pkls0s7.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=dann@ics.uci.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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://git.savannah.gnu.org/cgit/emacs.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).