This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: copying a timestamp


Quoting Ralf Wildenhues <Ralf.Wildenhues@gmx.de>:

* Joern Rennecke wrote on Sun, Nov 14, 2010 at 03:46:29PM CET:
What we actually need is a timestamp that says that the consistency has been
checked, and which depends on doc/tm.texi - that's our current s-tm-texi -
plus a generated file that depends on s-tm-texi, but bears the file system
time stamp of doc/tm.texi .
I.e. the s-tm-texi rule should make this file.
Can we use cp -p for this portably?

Not likely; see the discussion in 'info Autoconf --index cp'.

This talks about the possibility that the timestamp might end up appearing up to one second too old. So in theory, you could end up with the info files not being rebuilt even though the .texi file is newer. In practice, the info files would need to be rebuilt if someone changes one of the input files of $(builddir)/{new-,}tm.texi, rebuilds {new-,}tm.texi, and copies it manually to $(srcdir)/doc/tm.texi. A turn around time of less than a second for that process seems rather unlikely, so if the only worry about cp -p is truncating the time to look up to a second older, I think it is portable enough for this purpose.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]