build.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:foxbms-setup 作者: foxBMS 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号