automake
[Top][All Lists]
Advanced

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

Re: slow "make clean"


From: Ralf Wildenhues
Subject: Re: slow "make clean"
Date: Sun, 13 Feb 2011 08:11:45 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Ralf,

* Ralf Hemmecke wrote on Sat, Feb 12, 2011 at 11:46:55PM CET:
> I've a project that must use subdir-objects, because of filename
> clashes in subdirectories (non-recursive build).

> The generated Makefile contains a target "mostlyclean-compile" which
> has about 1500 lines that look like
> 
>   -rm -f src/foo/foo.$(OBJEXT)
>   -rm -f src/foo/foo.lo
>   ...
> 
> Of course it takes ages to say "make clean". About 10 sec.
> 
> Wouldn't it be faster if there were just one call to rm or at least
> block the number of arguments to rm so that the maximal argument
> lenght is not exceeded?

Yes, we could do the latter, I suppose.

> Any idea how I can speed that up?

You mean, as a workaround until Automake is improved?  You could
overwrite the rule in your Makefile.am:

mostlyclean-compile:
        -find . -name \*.lo -o -name \*.$(OBJEXT) -print | xargs rm -f

But note that automake may generate other files that would need to be
mostlyclean'ed too, so the above could be insufficient for your project.

Thanks for the report,
Ralf



reply via email to

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