@fsutils.dropRootPrivs<EOL><INDENT>def build(self, builddir, component, args, release_build=False, build_args=None, targets=None,<EOL>release_no_debug_info_build=False):<DEDENT>
if build_args is None:<EOL><INDENT>build_args = []<EOL><DEDENT>if targets is None:<EOL><INDENT>targets = []<EOL><DEDENT>if release_no_debug_info_build:<EOL><INDENT>build_type = '<STR_LIT>'<EOL><DEDENT>elif release_build:<EOL><INDENT>build_type = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>build_type = '<STR_LIT>'<EOL><DEDENT>cmd = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>' % build_type, '<STR_LIT>', args.cmake_generator, '<STR_LIT:.>']<EOL>res = self.exec_helper(cmd, builddir)<EOL>if res is not None:<EOL><INDENT>return res<EOL><DEDENT>from yotta.lib import cmake_fixups<EOL>cmake_fixups.applyFixupsForFenerator(args.cmake_generator, builddir, component)<EOL>build_command = self.overrideBuildCommand(args.cmake_generator, targets=targets)<EOL>if build_command:<EOL><INDENT>cmd = build_command + build_args<EOL><DEDENT>else:<EOL><INDENT>cmd = ['<STR_LIT>', '<STR_LIT>', builddir]<EOL>if len(targets):<EOL><INDENT>cmd += ['<STR_LIT>', targets[<NUM_LIT:0>]]<EOL><DEDENT>cmd += build_args<EOL><DEDENT>res = self.exec_helper(cmd, builddir)<EOL>if res is not None:<EOL><INDENT>return res<EOL><DEDENT>hint = self.hintForCMakeGenerator(args.cmake_generator, component)<EOL>if hint:<EOL><INDENT>logger.info(hint)<EOL><DEDENT>
Execute the commands necessary to build this component, and all of
            its dependencies.