On Tue, Oct 20, 2015 at 2:07 PM, Mike Shal <mar...@gmail.com> wrote: > I would clarify that the benefit from using the technique in that article is > really because the rebuild algorithm is essentially changed from: > > if timestamp(foo.o) < timestamp(foo.c) {rebuild foo.o} > > to: > > if checksum(foo.c) != last_checksum(foo.c) {rebuild things that depend on > foo.c} > > But you can get pretty much all the same benefits without having to hash > everything just by doing: > > if timestamp(foo.c) != last_timestamp(foo.c) {rebuild things that depend on > foo.c}
Yes, that’s a good point and it would be somewhat cheaper than hashing. However, the main concern with either approach doesn’t involve the cost of hashing source files but the complexity of preserving state between builds. As you know make is currently “stateless”, or maybe it’s better to say the only state required is already held in file inodes without any special intervention required from make. Adding either feature would require metadata describing the prior state (whether checksums or timestamps) to be saved from build to build which opens up many complications and corner cases, some as noted by Reiner Post. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make