For reproducibly building the documentation the build scripts rely on a time stamp derived from the most recent git commit, which is written to doc/defsincdate. If no .git folder is present in the top level source dir or the git command fails, this file is empty.
When building from the tarball, mkdefsinc can not read a valid timestamp from this file and thus falls back to scanning the documentation source files for the most recent modification timestamp, which is always that of doc/defsincdate and thus the documentation is populated with the date of the actual build. The patch below should deliver the intended behaviour of mkdefsinc, which presumably is using a date related to the latest source modification.
The issue might be present in all versions since 2015-06-09 (commit 25331bba5554a39d226d32433add7784b2e170b8), but the versions I worked with were 2.2.20 and 2.2.19.
Candidate patch (needs testing across time and space):
--- doc/mkdefsinc.c 2017-08-28 12:22:54.000000000 +0200 +++ doc/mkdefsinc.c.new 2020-05-15 22:54:13.974749616 +0200 @@ -109,7 +109,7 @@ for (; (file = *files); files++) { - if (!*file || !strcmp (file, ".") || !strcmp (file, "..")) + if (!*file || !strcmp (file, ".") || !strcmp (file, "..") || !strcmp (file, "defsincdate")) continue; if (stat (file, &sb)) {
Credits for spotting the non-determinism in the first place to https://r13y.com/.
A workaround is currently discussed for Nixpkgs (see external link), though an upstream fix would be much appreciated.