[jhbuild] cmake: use os.makedirs() to create builddir directory
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] cmake: use os.makedirs() to create builddir directory
- Date: Thu, 12 Jul 2012 13:05:05 +0000 (UTC)
commit 6491f839f32c61b7d0fc1901742353100b15ebba
Author: Marcin Wojdyr <wojdyr gmail com>
Date: Thu Jul 12 12:29:50 2012 +0100
cmake: use os.makedirs() to create builddir directory
os.mkdir() fails if builddir's parent directory doesn't exists.
Use the same two lines to make builddir as in autotools and waf.
jhbuild/modtypes/cmake.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/modtypes/cmake.py b/jhbuild/modtypes/cmake.py
index 6a20421..fa4e23d 100644
--- a/jhbuild/modtypes/cmake.py
+++ b/jhbuild/modtypes/cmake.py
@@ -87,8 +87,8 @@ class CMakeModule(Package, DownloadableModule):
buildscript.set_action(_('Configuring'), self)
srcdir = self.get_srcdir(buildscript)
builddir = self.get_builddir(buildscript)
- if not os.path.exists(builddir):
- os.mkdir(builddir)
+ if buildscript.config.buildroot and not os.path.exists(builddir):
+ os.makedirs(builddir)
prefix = os.path.expanduser(buildscript.config.prefix)
if not inpath('cmake', os.environ['PATH'].split(os.pathsep)):
raise CommandError(_('%s not found') % 'cmake')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]