help-make
[Top][All Lists]
Advanced

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

Re: suggestion to reduce unnecessary rebuilding


From: Tom Tromey
Subject: Re: suggestion to reduce unnecessary rebuilding
Date: Fri, 25 Apr 2008 08:59:23 -0600
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

>>> Before making a target, if that target already exists, move it to a
>>> temporary backup file. After the target is re-made, diff the newly made
>>> target against the backup. If it didn't change, reset the date of the
>>> newly made target to the date of the backup. In either case, delete the
>>> backup. 

Last year there was a SoC project to add non-timestamp-based
dependencies.  Did that ever go in?  That sounds like what you want.

>> The result of this is if you make an innocuous change (say, adding a
>> comment) to a common header file that is included by all the source
>> files, make will end up rebuilding every .o every time you type make.

Dave> I think that's why in practice "move-if-change" is generally
Dave> used in conjunction with a dependency on a stamp file that
Dave> /does/ get its timestamp updated, isn't it?  (Actually, I never
Dave> understood what the stampfiles were used for before, and your
Dave> explanation above has just made me think that this might be the
Dave> reason.  But I could still be completely misleading myself about
Dave> it.)

Yeah, this is why.

Tom




reply via email to

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