[Top][All Lists]

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

Any way to get rid of -MP parameter to gcc for dependency creation?

From: Xan Lopez
Subject: Any way to get rid of -MP parameter to gcc for dependency creation?
Date: Tue, 4 Jan 2011 00:43:22 +0100


First a bit of context: for the GTK+ port of WebKit
( we are using autotools as our build system
(autoconf+automake+libtool, the whole lot). We have a *lot* of files,
so the resulting Makefile is about 9MB in size and takes, in my
system, about 55s to go through a null-build (that is, just typing
'make' when there's nothing to do).

Today I was looking at ways of reducing this, and I managed to save
10s by getting rid of some implicit rules we don't need (the win is
essentially the same than using -r in Make). After that I found that
for each target in the build a .Plo file with the dependencies is
generated, and that an empty rule for each dependency of that target
is added to that file. This adds up *really* quickly in size, and I
found that by removing all those I can go from ~43s (the time without
the implicit rules) to ~20s. I realize this has some uses (as the -MP
doc explains), but 23 seconds per build seems excessive, so I think we
can try to live without it. Problem is, apparently it's totally
hardcoded in am/, so: any idea on how to get rid of it in
some kind of prost-processing step? (Even grepping/replacing the whole
Makefile after is generated will very likely take a fraction of those

Alternatively, is there some well-known way to reduce either the size
or the processing time for the Makefile in huge automake projects?[1]



[1]: I found this thread,, from
years ago, but I'm not sure there was any definitive conclusion, and
gcj nowadays seems different than how the mail implies it was back

reply via email to

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