It's unfortunate that most programmers only experience with make is automake/autoconf. This is fantastic.
These days I just use Rust instead.
Might I suggest “got-restore-mtime” for this, upstream in Debian and Ubuntu already.
Did you really spend hours on this?
Also I think it took quite a while to even realize the mtimes were the issue from an error messages, as I was not very knowledgeable about autoconf / automake.