A question on C programming style
Alex Martelli
martelli at cadlab.sublink.ORG
Fri Apr 26 19:29:59 AEST 1991
scs at hstbme.mit.edu (Steve Summit) writes:
...
:I gather that the "touch" trick is fairly widely used, so I
:suppose it must work, but I can't say if it has any real
:practical drawbacks (other than losing the "real" modification
:time, and the philosophical objections).
Well, this trick (the "foo.h: bar.h; touch foo.h" approach to
nested include handling in makefiles) surely has the potential
of causing a lot of extra work. Makefiles are not just for
recompiling and linking sources; lots more things can depend
on a text file than just a .o... the extra touching, depending
on what you do in your makefiles, may cause redundant attempts
at RCS check-ins of sources, redundant printouts of unmodified
sources, redundant backups to slow media, redundant broadcast
of sources over a net, redundant updating of tarfiles, etc etc.
I also share your dislike for having the last-modified date lose
information value in a long-listing.
Despite all this, it's just *so* convenient that I find myself
using it from time to time, mostly for makefiles intended for
short-term use...
--
Alex Martelli - CAD.LAB s.p.a., v. Stalingrado 53, Bologna, Italia
Email: (work:) martelli at cadlab.sublink.org, (home:) alex at am.sublink.org
Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434;
Fax: ++39 (51) 366964 (work only), Fidonet: 332/401.3 (home only).
More information about the Comp.lang.c
mailing list