summaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-02-11 19:30:22 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-02-11 19:44:31 +0530
commit2cb5dcedf29a41ff1d8d21a122dd16cf114ffd65 (patch)
tree7490cfe31d6d70a6aa11236d8caf4cc26731c1b8 /mesonbuild/interpreter.py
parent1c74bbbfb3854163c82535a094fe8ca93a154725 (diff)
downloadmeson-nirbheek/configure_file-copy-stat.tar.gz
configure_file: Also copy timestamps to avoid useless rebuildsnirbheek/configure_file-copy-stat
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/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index d824e3c3a..09f7ff596 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