aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-02-11 19:30:22 +0530
committerXavier Claessens <xclaesse@gmail.com>2020-02-11 10:00:40 -0500
commit1e4eeccb0f23f245ff8b65a51de03cda38632df4 (patch)
tree3a41d29d456d7fbd60f95e6bcb8e960fb018acc4 /mesonbuild
parent36a0797e1c987cd08d1b3b993f52b17fa9a15542 (diff)
downloadmeson-1e4eeccb0f23f245ff8b65a51de03cda38632df4.zip
meson-1e4eeccb0f23f245ff8b65a51de03cda38632df4.tar.gz
meson-1e4eeccb0f23f245ff8b65a51de03cda38632df4.tar.bz2
configure_file: Also copy timestamps to avoid useless rebuilds
If we always copy files over without timestamps, we're forcing a (probably unnecessary) rebuild. Also include a test for this.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index d824e3c..09f7ff5 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -4006,7 +4006,7 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
raise InterpreterException('Exactly one input file must be given in copy mode')
os.makedirs(os.path.join(self.environment.build_dir, self.subdir), exist_ok=True)
shutil.copyfile(inputs_abs[0], ofile_abs)
- shutil.copymode(inputs_abs[0], ofile_abs)
+ shutil.copystat(inputs_abs[0], ofile_abs)
else:
# Not reachable
raise AssertionError