def _do_subproject_meson(self, dirname, subdir, default_options, kwargs, ast=None, build_def_files=None):
    with mlog.nested():
        new_build = self.build.copy()
        subi = Interpreter(new_build, self.backend, dirname, subdir, self.subproject_dir, self.modules, default_options, ast=ast)
        subi.subprojects = self.subprojects
        subi.subproject_stack = (self.subproject_stack + [dirname])
        current_active = self.active_projectname
        current_warnings_counter = mlog.log_warnings_counter
        mlog.log_warnings_counter = 0
        subi.run()
        subi_warnings = mlog.log_warnings_counter
        mlog.log_warnings_counter = current_warnings_counter
        mlog.log('Subproject', mlog.bold(dirname), 'finished.')
    mlog.log()
    if ('version' in kwargs):
        pv = subi.project_version
        wanted = kwargs['version']
        if ((pv == 'undefined') or (not mesonlib.version_compare_many(pv, wanted)[0])):
            raise InterpreterException(('Subproject %s version is %s but %s required.' % (dirname, pv, wanted)))
    self.active_projectname = current_active
    self.subprojects.update(subi.subprojects)
    self.subprojects[dirname] = SubprojectHolder(subi, self.subproject_dir, dirname, warnings=subi_warnings)
    if build_def_files:
        self.build_def_files = list(set((self.build_def_files + build_def_files)))
    else:
        self.build_def_files = list(set((self.build_def_files + subi.build_def_files)))
    self.build.merge(subi.build)
    self.build.subprojects[dirname] = subi.project_version
    self.summary.update(subi.summary)
    return self.subprojects[dirname]
def _do_subproject_meson(self, dirname, subdir, default_options, kwargs, ast=None, build_def_files=None):
    with mlog.nested():
        new_build = self.build.copy()
        subi = Interpreter(new_build, self.backend, dirname, subdir, self.subproject_dir, self.modules, default_options, ast=ast)
        subi.subprojects = self.subprojects
        subi.subproject_stack = (self.subproject_stack + [dirname])
        current_active = self.active_projectname
        current_warnings_counter = mlog.log_warnings_counter
        mlog.log_warnings_counter = 0
        subi.run()
        subi_warnings = mlog.log_warnings_counter
        mlog.log_warnings_counter = current_warnings_counter
        mlog.log('Subproject', mlog.bold(dirname), 'finished.')
    mlog.log()
    if ('version' in kwargs):
        pv = subi.project_version
        wanted = kwargs['version']
        if ((pv == 'undefined') or (not mesonlib.version_compare_many(pv, wanted)[0])):
            raise InterpreterException(('Subproject %s version is %s but %s required.' % (dirname, pv, wanted)))
    self.active_projectname = current_active
    self.subprojects.update(subi.subprojects)
    self.subprojects[dirname] = SubprojectHolder(subi, self.subproject_dir, dirname, warnings=subi_warnings)
    if build_def_files:
        self.build_def_files = list(set((self.build_def_files + build_def_files)))
    else:
        self.build_def_files = list(set((self.build_def_files + subi.build_def_files)))
    self.build.merge(subi.build)
    self.build.subprojects[dirname] = subi.project_version
    self.summary.update(subi.summary)
    return self.subprojects[dirname]