help-make
[Top][All Lists]
Advanced

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

Re: why are all prerequisites timestamps checked, even after one is fou


From: Philip Guenther
Subject: Re: why are all prerequisites timestamps checked, even after one is found to be newer than target??
Date: Mon, 14 Dec 2009 11:40:39 -0800

On Mon, Dec 14, 2009 at 11:14 AM, Mark Galeck (CW) <address@hidden> wrote:
> There is lots of things that I discovered, that should in principle save 
> time, but in practice don't - like converting implicit to explicit rules, 
> once targets are discovered, or adding :; after all the sources to prevent 
> implicit lookup.  Typically the cost of maintaining these things, turns out 
> to be about the same as the "savings".

I mostly agree.  In practice I've found exactly two things that both
save time _and_ reflect early decisions that don't change:
1) if you don't use RCS or SCCS, then disable the pattern rules for
checking out files from them with

%:: %,v
%:: RCS/%,v
%:: RCS/%
%:: s.%
%:: SCCS/s.%

Since just about everyone has moved from RCS/SCCS to CVS or git or
some other revisioning system, I haven't seen a use of any of those
rules in over a decade.  Disabling those cuts down the -d output by
almost a factor of 5.

2) if you don't use make's ability to rebuild Makefiles and then
restart itself (c.f. Paul's page about why that's not necessary for
auto-dependency generation), then tell make to not try to rebuild them
with lines like
    Makefile:;
or maybe a direct
    ${MAKEFILE_LIST}: ;
after the last 'include' directive.


Philip Guenther




reply via email to

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