Rombobjörn

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Persson <bjorn@rombobjörn.se>2013-04-22 15:25:45 +0200
committerBjörn Persson <bjorn@rombobjörn.se>2013-04-22 15:25:45 +0200
commit9a96834f45daee4669a249d78786f211843843bb (patch)
tree09a6eeed585a3659be33c282328431d371f3b381
parent1d299eb7519f87cf80e9577978b1a7242f9c9a7f (diff)
make install preserved too much.version_2.1.1
-rw-r--r--comfignat.mk13
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::