diff options
author | Björn Persson <bjorn@rombobjörn.se> | 2013-04-22 15:26:00 +0200 |
---|---|---|
committer | Björn Persson <bjorn@rombobjörn.se> | 2013-04-22 15:26:00 +0200 |
commit | 8f40374fca3430e3fdc2bb4933fe40f2105d24a9 (patch) | |
tree | 18d8f7067fbb532ad3bc541cb4cbc9af3833aae6 | |
parent | 47cb52ab58559d3e8909b3b5968d34bb49320f3c (diff) |
make install preserved too much.version_1.3
-rw-r--r-- | comfignat.mk | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/comfignat.mk b/comfignat.mk index ab709ba..aea3103 100644 --- a/comfignat.mk +++ b/comfignat.mk @@ -85,6 +85,17 @@ stagedir = ${builddir}/stage # installed are written to stagedir, and then copied to their destination in # the installation step. +ifeq (${DESTDIR},) + install_cp_flags = +else + install_cp_flags = --preserve=timestamps +endif +# Timestamps are preserved when installation is done to a staging directory. +# This matters for files that aren't generated during the build but copied from +# the source tree. Timestamps are not preserved when installation is done +# directly to the target system, because that would change the timestamps of +# existing directories. + # # Containing makefiles should assign or append to these variables as needed: @@ -213,7 +224,7 @@ ${stagedir}: install: ${stagedir} mkdir -p "${DESTDIR}/" - cp -RPpf "${stagedir}"/* "${DESTDIR}/" + cp -RPf ${install_cp_flags} "${stagedir}"/* "${DESTDIR}/" .PHONY: install clean:: |