diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-03-18 20:13:00 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-03-20 22:28:37 +0200 |
commit | 58156ef7cfd56ddcbd230c510f363f49a2c172fd (patch) | |
tree | 5761bcf68322f044c3ea50616486e2323c10f9e1 /mesonbuild/mesonmain.py | |
parent | 1c8d4bf05b85b0e9f7dc5b1438f4e33b515db668 (diff) | |
download | meson-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.py | 3 |
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()) |