aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap/wrap.py
diff options
context:
space:
mode:
authorAndrei Alexeyev <0x416b617269@gmail.com>2018-09-15 07:09:14 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-09-16 14:57:56 +0300
commit67cc636e5375dae03fb43807d2c5222b8c78910c (patch)
treee481599472912dd367208703c3c0b7ebe7b7320a /mesonbuild/wrap/wrap.py
parent46bf51543b5366700ed8d38b0ae3dbfc2725524c (diff)
downloadmeson-67cc636e5375dae03fb43807d2c5222b8c78910c.zip
meson-67cc636e5375dae03fb43807d2c5222b8c78910c.tar.gz
meson-67cc636e5375dae03fb43807d2c5222b8c78910c.tar.bz2
Add 'clone-recursive' option for git wraps
This causes Meson to clone the repo with the --recursive flag, pulling all of the submodules automatically.
Diffstat (limited to 'mesonbuild/wrap/wrap.py')
-rw-r--r--mesonbuild/wrap/wrap.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 42808e3..5cc2225 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -208,8 +208,12 @@ class Resolver:
subprocess.check_call(['git', 'checkout', revno],
cwd=checkoutdir)
else:
- subprocess.check_call(['git', 'clone', p.get('url'),
- p.get('directory')], cwd=self.subdir_root)
+ if p.values.get('clone-recursive', '').lower() == 'true':
+ subprocess.check_call(['git', 'clone', '--recursive', p.get('url'),
+ p.get('directory')], cwd=self.subdir_root)
+ else:
+ subprocess.check_call(['git', 'clone', p.get('url'),
+ p.get('directory')], cwd=self.subdir_root)
if revno.lower() != 'head':
if subprocess.call(['git', 'checkout', revno], cwd=checkoutdir) != 0:
subprocess.check_call(['git', 'fetch', p.get('url'), revno], cwd=checkoutdir)