Re: preserve timestamps when installing headers

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Alexander Kuzmenkov <akuzmenkov(at)timescale(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: preserve timestamps when installing headers
Date: 2022-09-09 19:23:57
Message-ID: fb0f501e-a090-e61d-5537-ce24dd4f1ca7@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/01/2022 00:03, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
>> 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.

+1. We just bumped into this with Neon, where we have a build script
that generates Rust bindings from the PostgreSQL header files. The build
script runs "make install", and because that changes the mtime even if
there were no changes to the headers, the bindings are also regenerated
every time.

> So I fear we're optimizing for a case that stopped being mainstream
> a decade or more back. I could get behind switching the code back
> to using $(INSTALL) for this, and then offering some way to inject
> user-selected switches into the $(INSTALL) invocations. That
> wouldn't need much more than another gmake macro. (Does there
> need to be a way to inject such switches only into header
> installations, or is it OK to do it across the board?)

Here's a patch to switch back to $(INSTALL). With that, you can do:

./configure INSTALL="/usr/bin/install -C"

> [ wanders away wondering how this'd affect the meson conversion
> project ]

If anything, I guess this will help, by making the Makefile a bit less
special.

- Heikki

Attachment Content-Type Size
0001-Use-normal-install-program-to-install-server-headers.patch text/x-patch 2.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-09-09 19:36:38 Re: [BUG] Storage declaration in ECPG
Previous Message Peter Geoghegan 2022-09-09 19:10:02 Re: Making autovacuum logs indicate if insert-based threshold was the triggering condition