]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: rework timestamp preservation on doc/asconfig.texi
authorJan Beulich <jbeulich@suse.com>
Tue, 1 Aug 2023 10:39:44 +0000 (12:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 1 Aug 2023 10:39:44 +0000 (12:39 +0200)
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.

gas/Makefile.in
gas/doc/local.mk

index 427f42dfa3a688fa8fae39e1acd9a3ac2311019b..b56cd9a29a9f5964b98c36dbc65b5131c3332227 100644 (file)
@@ -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
index de13e3ca8b80a63d90b1d953142ca1c4f0722fde..c48c71115be9fb2ea0c71e5747c8582189a74dcf 100644 (file)
@@ -41,7 +41,7 @@ TEXI2DVI = texi2dvi -I "$(srcdir)/%D%" -I %D% -I "$(srcdir)/../libiberty" \
 
 %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 = \