[PATCH] gas: rework timestamp preservation on doc/asconfig.texi
Jan Beulich
jbeulich@suse.com
Mon Jul 31 13:44:22 GMT 2023
PR 28909
Sadly "cp -p", doing more than just preserving the time stamp, can fail
e.g. upon trying to preserve ownership (which we don't care about), as
can be observed on e.g. Cygwin. Replace the use of -p by a use of touch,
this way also only preserving modification time.
---
Interestingly that earlier commit (8034b0baeac1) looks to also be the
reason of there now being "GEN doc/asconfig.texi" on every
(incremental) rebuild. Would be nice if that could be avoided. How
important is it to actually retain the timestamp? Said commit said
nothing on the "Why" aspect ... The issue described in the bug doesn't
look like it wants dealing with by using "cp -p" (or alike).
--- a/gas/Makefile.in
+++ b/gas/Makefile.in
@@ -2230,7 +2230,7 @@ de-stage3:
doc/asconfig.texi: doc/$(CONFIG).texi doc/$(am__dirstamp)
$(AM_V_at)rm -f doc/asconfig.texi
- $(AM_V_GEN)cp -p $(srcdir)/doc/$(CONFIG).texi doc/asconfig.texi
+ $(AM_V_GEN)cp $(srcdir)/doc/$(CONFIG).texi doc/asconfig.texi && touch -m -r $(srcdir)/doc/$(CONFIG).texi doc/asconfig.texi
$(AM_V_at)chmod u+w doc/asconfig.texi
# Maintenance
--- a/gas/doc/local.mk
+++ b/gas/doc/local.mk
@@ -41,7 +41,7 @@ TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -
%D%/asconfig.texi: %D%/$(CONFIG).texi %D%/$(am__dirstamp)
$(AM_V_at)rm -f %D%/asconfig.texi
- $(AM_V_GEN)cp -p $(srcdir)/%D%/$(CONFIG).texi %D%/asconfig.texi
+ $(AM_V_GEN)cp $(srcdir)/%D%/$(CONFIG).texi %D%/asconfig.texi && touch -m -r $(srcdir)/%D%/$(CONFIG).texi %D%/asconfig.texi
$(AM_V_at)chmod u+w %D%/asconfig.texi
CPU_DOCS = \
More information about the Binutils
mailing list