Configure.py 文件源码

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

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def add_os_flags(self, var, dest=None, dup=True):
    """
    Import operating system environment values into ``conf.env`` dict::

        def configure(conf):
            conf.add_os_flags('CFLAGS')

    :param var: variable to use
    :type var: string
    :param dest: destination variable, by default the same as var
    :type dest: string
    :param dup: add the same set of flags again
    :type dup: bool
    """
    try:
        flags = shlex.split(self.environ[var])
    except KeyError:
        return
    # TODO: in waf 1.9, make dup=False the default
    if dup or ''.join(flags) not in ''.join(Utils.to_list(self.env[dest or var])):
        self.env.append_value(dest or var, flags)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号