diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-06 20:04:36 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-09 11:26:04 -0500 |
commit | 4d8e3be08f5d6a426f64fb6a1f71c9f52b249311 (patch) | |
tree | cf6ce02a653ccf0c57c62981188c917b59949e55 /mesonbuild | |
parent | cf7b50364f5fec9c4b7ea520b31cfd5a1bb443d7 (diff) | |
download | meson-4d8e3be08f5d6a426f64fb6a1f71c9f52b249311.zip meson-4d8e3be08f5d6a426f64fb6a1f71c9f52b249311.tar.gz meson-4d8e3be08f5d6a426f64fb6a1f71c9f52b249311.tar.bz2 |
Create target directory if it does not exist. Closes #935.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mesonmain.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index 500e5af..88826f8 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -89,6 +89,10 @@ class MesonApp(): def validate_core_dirs(self, dir1, dir2): ndir1 = os.path.abspath(dir1) ndir2 = os.path.abspath(dir2) + if not os.path.exists(ndir1): + os.makedirs(ndir1) + if not os.path.exists(ndir2): + os.makedirs(ndir2) if not stat.S_ISDIR(os.stat(ndir1).st_mode): raise RuntimeError('%s is not a directory' % dir1) if not stat.S_ISDIR(os.stat(ndir2).st_mode): |