I am a beginner with
make and I'm wondering about when to use
One colleague told me that incremental builds with
make are based on the files timestamps. So, if you checkout an old version of a file in your VCS, it'll have an "old" timestamp and it'll be marked as "no need to recompile this file". Then, that file wouldn't be included in the next build.
According to that same colleague, it would be a reason to use
Anyway, I roughly got the answer to the question "when to use
make clean" from other StackExchange questions but my other question then is:
Why do incremental builds using
makerely on files timestamps and not on SHA-1 for example? Git, for instance, shows that we can successfully determine if a file was modified using the SHA-1.
Is it for speed issues?