From 8f40374fca3430e3fdc2bb4933fe40f2105d24a9 Mon Sep 17 00:00:00 2001 From: Björn Persson Date: Mon, 22 Apr 2013 15:26:00 +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