From 9a96834f45daee4669a249d78786f211843843bb Mon Sep 17 00:00:00 2001 From: Björn Persson Date: Mon, 22 Apr 2013 15:25:45 +0200 Subject: make install preserved too much. --- comfignat.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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:: -- cgit v1.2.3