preserve timestamps when installing headers

From: Alexander Kuzmenkov <akuzmenkov(at)timescale(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: preserve timestamps when installing headers
Date: 2021-10-12 10:22:50
Message-ID: CALzhyqxFzSRwo_eOOtBmjD8Gs4LhESP4KLHx_pkNnaEMio1ugA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

I noticed that `make install` updates modification time for all
installed headers. This leads to recompilation of all dependent
objects, which is inconvenient for example when working on a
third-party extension. A way to solve this would be to pass
`INSTALL="install -p"` to `configure`, to make `install` preserve the
timestamp. After this, a new problem arises -- the
`src/include/Makefile` doesn't use `install` for all headers, but
instead uses `cp`. This patch adds `-p` switch to `cp` invocation in
these files, to make it preserve timestamps. Combined with the
aforementioned install flag, it allows a developer to hack on both
postgres and a third-party extension at the same time, without the
unneeded recompilation.

--
Alexander Kuzmenkov
Timescale

Attachment Content-Type Size
preserve-header-timestamps.patch text/x-patch 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message bt21masumurak 2021-10-12 10:57:53 Re: Improve the HINT message of the ALTER command for postgres_fdw
Previous Message Andrey Lepikhov 2021-10-12 10:00:54 Re: Make query ID more portable