git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matt Kraai <kraai@ftbfs.org>,
	git@vger.kernel.org, Matt Kraai <matt.kraai@amo.abbott.com>
Subject: Re: [PATCH] Makefile: don't run rm without any files
Date: Wed, 13 Feb 2013 12:12:44 -0800	[thread overview]
Message-ID: <20130213201244.GD3381@google.com> (raw)
In-Reply-To: <7vehgk6l11.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:

> I amended the log message like so:
>
> commit bd9df384b16077337fffe9836c9255976b0e7b91
> Author: Matt Kraai <matt.kraai@amo.abbott.com>
> Date:   Wed Feb 13 07:57:48 2013 -0800
>
>     Makefile: don't run rm without any files
>
>     When COMPUTE_HEADER_DEPENDENCIES is set to "auto" and the compiler
>     does not support it, $(dep_dirs) becomes empty.  "make clean" runs
>     "rm -rf $(dep_dirs)", which fails in such a case.

To pedantic, that only fails on some platforms.  The autoconf manual
explains:

	It is not portable to invoke rm without options or operands. On the
	other hand, Posix now requires rm -f to silently succeed when there are
	no operands (useful for constructs like rm -rf $filelist without first
	checking if ‘$filelist’ was empty). But this was not always portable; at
	least NetBSD rm built before 2008 would fail with a diagnostic.

Anyway, looks like a good fix.  Thanks.

      reply	other threads:[~2013-02-13 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 15:57 [PATCH] Makefile: don't run rm without any files Matt Kraai
2013-02-13 16:51 ` Junio C Hamano
2013-02-13 17:00   ` Matt Kraai
2013-02-13 20:01     ` Junio C Hamano
2013-02-13 20:12       ` Jonathan Nieder [this message]

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

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

  git send-email \
    --in-reply-to=20130213201244.GD3381@google.com \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kraai@ftbfs.org \
    --cc=matt.kraai@amo.abbott.com \
    /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.
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 NNTP newsgroup(s).