diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-03-10 18:39:10 +0000 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-04-13 01:05:54 +0000 |
commit | cb597adb0170a4818a4950ca9a4fe3f6d5a6c9d2 (patch) | |
tree | 102db07ff897c5766539d5b533b0c11a71db46d7 /mesonbuild/interpreter.py | |
parent | 57654bf36784c771fb16d90fd39ed58849d19564 (diff) | |
download | meson-cb597adb0170a4818a4950ca9a4fe3f6d5a6c9d2.zip meson-cb597adb0170a4818a4950ca9a4fe3f6d5a6c9d2.tar.gz meson-cb597adb0170a4818a4950ca9a4fe3f6d5a6c9d2.tar.bz2 |
Indicate subproject depth in console output
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 6ecd285..b99a413 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1862,21 +1862,23 @@ external dependencies (including libraries) must go to "dependencies".''') subdir = os.path.join(self.subproject_dir, resolved) os.makedirs(os.path.join(self.build.environment.get_build_dir(), subdir), exist_ok=True) self.global_args_frozen = True - mlog.log('\nExecuting subproject ', mlog.bold(dirname), '.\n', sep='') - subi = Interpreter(self.build, self.backend, dirname, subdir, self.subproject_dir, - mesonlib.stringlistify(kwargs.get('default_options', []))) - subi.subprojects = self.subprojects - - subi.subproject_stack = self.subproject_stack + [dirname] - current_active = self.active_projectname - subi.run() + mlog.log() + with mlog.nested(): + mlog.log('Executing subproject ', mlog.bold(dirname), '.\n', sep='') + subi = Interpreter(self.build, self.backend, dirname, subdir, self.subproject_dir, + mesonlib.stringlistify(kwargs.get('default_options', []))) + subi.subprojects = self.subprojects + + subi.subproject_stack = self.subproject_stack + [dirname] + current_active = self.active_projectname + subi.run() + mlog.log('\nSubproject', mlog.bold(dirname), 'finished.') if 'version' in kwargs: pv = subi.project_version wanted = kwargs['version'] if pv == 'undefined' or not mesonlib.version_compare(pv, wanted): raise InterpreterException('Subproject %s version is %s but %s required.' % (dirname, pv, wanted)) self.active_projectname = current_active - mlog.log('\nSubproject', mlog.bold(dirname), 'finished.') self.build.subprojects[dirname] = subi.project_version self.subprojects.update(subi.subprojects) self.subprojects[dirname] = SubprojectHolder(subi) |