def build(mcu_switch=None, doxygen=False, supress_output=False):
"""Creates the build command string for the specified build and passes the
build command string to `start_process` which actually starts the build
process.
Args:
mcu_switch (string): specifies what will be built.
doxygen (bool): specifies if the doxygen documentation to a mcu should
be built.
supress_output (bool): indicates if the output should appear on the
command line.
"""
cmd = TOOLCHAIN_BASIC_CONFIGURE + ' '
if mcu_switch is None:
cmd += 'sphinx'
elif mcu_switch == '-p' or mcu_switch == '-s' or mcu_switch == '-b':
cmd += 'build' + ' ' + mcu_switch
if doxygen is True:
cmd += ' ' + 'doxygen'
else:
logging.error('Invalid build argument: \'%s\'', mcu_switch)
sys.exit(1)
start_process(cmd, supress_output)
评论列表
文章目录