GNU bug report logs - #10697
subdir-objects "make clean" invokes one rm for each .o file

Previous Next

Package: automake;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Thu, 2 Feb 2012 16:08:02 UTC

Severity: minor

Tags: patch

Merged with 8031

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#10697: closed (subdir-objects "make clean" invokes one rm for
 each .o file)
Date: Mon, 11 Jun 2012 16:52:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 11 Jun 2012 18:48:55 +0200
with message-id <4FD62177.9030807 <at> gmail.com>
and subject line Re: bug#10697: subdir-objects "make clean" invokes one rm for each .o file
has caused the debbugs.gnu.org bug report #10697,
regarding subdir-objects "make clean" invokes one rm for each .o file
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
10697: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10697
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: bug-automake <at> gnu.org
Subject: subdir-objects "make clean" invokes one rm for each .o file
Date: Thu, 02 Feb 2012 17:06:17 +0100
In cppi (http://git.savannah.gnu.org/cgit/cppi.git), I am now using non-
recursive make via subdir-objects, modeled after the way bison does it.
I see that "make clean" is inefficient: one "rm -f" per .o file:

  rm -fr *.o
  rm -f *.o
  rm -f lib/calloc.o
  rm -f lib/close-stream.o
  rm -f lib/closeout.o
  rm -f lib/error.o
  rm -f lib/exitfail.o
  rm -f lib/fpending.o
  rm -f lib/getopt.o
  rm -f lib/getopt1.o
  rm -f lib/localcharset.o
  rm -f lib/malloc.o
  rm -f lib/mbrtowc.o
  rm -f lib/mbsinit.o
  rm -f lib/msvc-inval.o
  rm -f lib/msvc-nothrow.o
  rm -f lib/obstack.o
  rm -f lib/progname.o
  rm -f lib/quote.o
  rm -f lib/quotearg.o
  rm -f lib/realloc.o
  rm -f lib/stpcpy.o
  rm -f lib/strerror-override.o
  rm -f lib/strerror.o
  rm -f lib/version-etc-fsf.o
  rm -f lib/version-etc.o
  rm -f lib/xalloc-die.o
  rm -f lib/xmalloc.o
  rm -f lib/xstrtol-error.o
  rm -f lib/xstrtol.o
  rm -f lib/xstrtoul.o
  rm -f src/cppi.o

cppi has so few .o files that it's not a problem, but with hundreds
(coreutils has over 600), it could be noticeable.

Contrast that with its removal of *.o above and of all tests/*.log files
using just one rm invocation each, I think it must simply be an oversight.
Seems like it'd be worth fixing some day.


[Message part 3 (message/rfc822, inline)]
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: 10697-done <at> debbugs.gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#10697: subdir-objects "make clean" invokes one rm for each
	.o file
Date: Mon, 11 Jun 2012 18:48:55 +0200
On 06/10/2012 02:17 PM, Stefano Lattarini wrote:
> Reference: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10697>
> 
> See the attached patch; I will push it by tomorrow if there is no objection
> (and if anyone would like to give it a try on a real project, that would be
> much appreciated).
>
Pushed now (to maint).  I'm thus closing this  bug report.

Regards,
  Stefano


This bug report was last modified 12 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.