automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#10697: subdir-objects "make clean" invokes one rm for each .o fi


From: Stefano Lattarini
Subject: Re: bug#10697: subdir-objects "make clean" invokes one rm for each .o file
Date: Sun, 10 Jun 2012 14:17:28 +0200

severity 10697 minor
tags 10697 + patch
thanks

Reference: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10697>

Hi Jim, sorry for the awful delay.

On 02/02/2012 05:06 PM, Jim Meyering wrote:
> 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/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.
> 
I agree, and today could be the day :-)

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

Regards,
  Stefano

Attachment: 0001-subdir-objects-improve-make-mostlyclean-efficiency-a.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]