On Mon, Apr 06, 2026 at 12:41:15 -0400, Paul Smith wrote:
> However, I can imagine a reason why timestamps are updated.  If you
> don't update the timestamps, then every time you run make subsequently
> autoconf and automake will be re-run again: you invoke make, it sees
> the files are out of date and runs autoconf/automake, the contents will
> be checked and found to be identical, and the files will not be
> updated.  Then you run make again, it sees the files are out of date,
> re-runs autoconf  and/or automake, sees the output is identical and
> does not update the targets.

Note that `ninja` has a `restat = 1` to support this pattern of not
updating timestamps when commands are rerun. The "last rerun" times are
stored in `.ninja_log` and used to avoid rerunning in this case. Note
that this means you can be "smart" and not update the timestamp if the
contents *are* different, but not in a meaningful way (e.g., comments,
whitespace).

I assume `gmake` could implement this in some way, but POSIX `make` is
probably a "no" for all practical purposes.

--Ben

Reply via email to