[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Nick Bowler
Subject: Re: INSTALL_DATA += -p
Date: Tue, 3 Nov 2020 11:21:51 -0500

On 2020-11-03, Thien-Thi Nguyen <> wrote:
> I'd like to make sure that timestamps are preserved on "make
> install".

In general, preserving timestamps while copying files cannot be done
reliably and when it is possible, it is difficult to do in a portable
fashion.  But it seems preservation is not really required.

> I found the variable ‘INSTALL_DATA’ but cannot do the
> above (subject line) addition to, because Automake
> interprets INSTALL as a primary and bails out since that is not
> defined as such.

These INSTALL... variables come from configure (via AC_PROG_INSTALL); if
you want to change them you can alter them in your configure script.

It is important to note, however, that Automake's supplied install-sh
script currently does not implement "-p" or any other option to copy

> The background reason is that i am installing .scm and .go files
> (the latter compiled from the former) and the .go files need to
> have a "later" timestamp than the .scm files for Guile to DTRT.

"Later" here means "greater than?"  Or is "greater than or equal to"

> I suppose a workaround is to use an installation hook to simply
> touch(1) the .go files.

An install hook would be my recommendation.

You should touch both files, as some "touch" implementations
truncate timestamps (this means a touched file could potentially
get an earlier timestamp than an untouched one).

Touching both files only ensures "greater than or equal to" timestamps.
If the timestamps must also be different then this is a bit trickier
(call touch in a loop until the timestamp changes).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]