aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-03-18 20:13:00 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-03-20 22:28:37 +0200
commit58156ef7cfd56ddcbd230c510f363f49a2c172fd (patch)
tree5761bcf68322f044c3ea50616486e2323c10f9e1 /mesonbuild/mesonmain.py
parent1c8d4bf05b85b0e9f7dc5b1438f4e33b515db668 (diff)
downloadmeson-58156ef7cfd56ddcbd230c510f363f49a2c172fd.zip
meson-58156ef7cfd56ddcbd230c510f363f49a2c172fd.tar.gz
meson-58156ef7cfd56ddcbd230c510f363f49a2c172fd.tar.bz2
Grab a file lock on the build dir during modifications.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r--mesonbuild/mesonmain.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index 9c4498c..651224e 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -147,7 +147,8 @@ class MesonApp:
def generate(self):
env = environment.Environment(self.source_dir, self.build_dir, self.meson_script_launcher, self.options, self.original_cmd_line_args)
mlog.initialize(env.get_log_dir())
- self._generate(env)
+ with mesonlib.BuildDirLock(self.build_dir):
+ self._generate(env)
def _generate(self, env):
mlog.debug('Build started at', datetime.datetime.now().isoformat())