diff options
-rw-r--r-- | Build/tools/Tpm.pm | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Build/tools/Tpm.pm b/Build/tools/Tpm.pm index f620b611092..4743558177e 100644 --- a/Build/tools/Tpm.pm +++ b/Build/tools/Tpm.pm @@ -1014,15 +1014,21 @@ sub printdate { return &formatdate(@mytime); } +# if any of FILES are newer than OLDDATE, return the newest mtime. +# sub max_date { my ($olddate, @files) = @_; my ($f, $tpmdate); #print " olddate was " . &formatdate(gmtime($oldate)) . ", files=@files\n"; foreach $f (@files) { - if ($f =~ m@^texmf-dist/tpm/.*\.tpm@) { + # although the texmf/tpm/*.tpm files are mostly hand-maintained, it + # still seems best for the TPM:Date to reflect the newest date of + # the actual files in the package; the sizes and such might still + # get autoupdated. + if ($f =~ m,/tpm/.*\.tpm$,) { $tpmdate = (stat("$MasterDir/$f"))[9]; - #print " tpm itself, found $tpmdate\n"; + #print " tpm itself, found " . &formatdate(gmtime($tpmdate)) . "\n"; } else { my @st = stat("$MasterDir/$f"); @@ -1036,7 +1042,7 @@ sub max_date if ($olddate == 0) { $olddate = $tpmdate; } -# print " newdate is " . &formatdate(gmtime($oldate)) . "\n"; + #print " max_date returning " . &formatdate(gmtime($olddate)) . "\n"; return $olddate; } @@ -1049,14 +1055,17 @@ sub fixDate { } } #print " newdate after bin: " . &formatdate(gmtime($newdate)) . "\n"; - $newdate = &max_date($newdate, $self->getFileList("RunFiles")); - #print " newdate after run: " . &formatdate(gmtime($newdate)) . "\n"; $newdate = &max_date($newdate, $self->getFileList("DocFiles")); #print " newdate after doc: " . &formatdate(gmtime($newdate)) . "\n"; $newdate = &max_date($newdate, $self->getFileList("SourceFiles")); #print " newdate after source: " . &formatdate(gmtime($newdate)) . "\n"; $newdate = &max_date($newdate, $self->getFileList("RemoteFiles")); #print " newdate after remote: " . &formatdate(gmtime($newdate)) . "\n"; + # + # Check the RunFiles last, because it includes the tpm itself, and we + # only want to use that as a last resort. + $rundate = &max_date($newdate, $self->getFileList("RunFiles")); + #print " newdate after run: " . &formatdate(gmtime($newdate)) . "\n"; $self->setAttribute("Date", &formatdate(gmtime($newdate))); } |