Paul Smith wrote:
On Thu, 2008-04-24 at 15:01 -0400, Ilya Shlyakhter wrote:
I want to make a suggestion that can speed up make by reducing
unnecessary rebuilding:
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.
You can implement this yourself, in any makefile you like. You don't
need make to do it for you.
Then, if a source file is changed in an insignificant way (e.g. by
adding comments),
that source file is still recompiled, but at least the downstream
files that depend on it are not.
The problem is, the next time you do the build it will AGAIN rebuild
that target, AGAIN decide it hasn't changed, and AGAIN reset the stamp
back to the old time. And, the NEXT time you run make it will do it
again. Etc.
I can't agree more with Paul. Taht's the nature of make. What's more, in
some situation, people touch a C file just to make some executable/DLLs
relinked(maybe link to a just updated 3rd party library), this time it
is more convenient to touch a C file than deleting all those
executable/DLLs.
begin:vcard
fn;quoted-printable:Chen Jun=EF=BC=88=E9=99=88=E5=86=9B=EF=BC=89
n:Chen;Jun
org:Fujian Newland Auto-ID Tech. Co,.Ltd.;Technical Department
adr:;;Newland Science & Technology Park, No.1 Rujiang Avenue, Mawei District, Fuzhou, China;Fuzhou;Fujian;350015;China
email;internet:[EMAIL PROTECTED]
title:Software Engineer
x-mozilla-html:TRUE
url:www.nlscan.com
version:2.1
end:vcard
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make