cbdlib.py 文件源码

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

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def start(cwd, version, wafdir):
    # simple example, the file main.c is hard-coded
    try:
        os.stat(cwd + os.sep + 'cbit')
    except:
        print('call from a folder containing a file named "cbit"')
        sys.exit(1)

    Logs.init_log()
    Context.waf_dir = wafdir
    Context.top_dir = Context.run_dir = cwd
    Context.out_dir = os.path.join(cwd, 'build')
    Context.g_module = imp.new_module('wscript')
    Context.g_module.root_path = os.path.join(cwd, 'cbit')
    Context.Context.recurse = recurse_rep

    # this is a fake module, which looks like a standard wscript file
    Context.g_module.options = options
    Context.g_module.configure = configure
    Context.g_module.build = build

    Options.OptionsContext().execute()

    do_config = 'configure' in sys.argv
    try:
        os.stat(cwd + os.sep + 'build')
    except:
        do_config = True
    if do_config:
        Context.create_context('configure').execute()

    if 'clean' in sys.argv:
        Context.create_context('clean').execute()
    if 'build' in sys.argv:
        Context.create_context('build').execute()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号