On 04.01.22 22:21, Tom Lane wrote:
> However, there's another problem with using INSTALL_DATA as a solution
> to this issue: why would you expect that to preserve timestamps?
> install-sh won't. I see that /usr/bin/install (which configure picks
> on my RHEL box) won't preserve them by default, but it has a -p
> option to do so. I would not bet on that being portable to all of
> the myriad of foo-install programs that configure will accept, though.
I don't think preserving timestamps should be the default behavior, but
I would support organizing things so that additional options can be
passed to "install" to make it do whatever the user prefers. But that
won't work if some installations don't go through install.
We could have some mode where "install" is used instead of "cp", if
someone wants to figure out exactly how to make that determination.
Btw., a quick test of make -C src/include/ install:
cp (current code): 0.5 s
GNU install: 0.6 s
install-sh: 12.5 s