View | Details | Raw Unified | Return to bug 2852
Collapse All | Expand All

(-)a/wscript (-15 / +14 lines)
 Lines 807-827   def _find_ns3_module(self, name): Link Here 
807
807
808
# Parse the waf lockfile generated by latest 'configure' operation
808
# Parse the waf lockfile generated by latest 'configure' operation
809
def get_build_profile(env=None):
809
def get_build_profile(env=None):
810
    if env == None:
810
    if env:
811
        lockfile = os.environ.get('WAFLOCK', '.lock-waf_%s_build' % sys.platform)
811
        return Options.options.build_profile
812
        profile = "not found"
812
813
        with open(lockfile, "r") as f:
813
    lockfile = os.environ.get('WAFLOCK', '.lock-waf_%s_build' % sys.platform)
814
            for line in f:
814
    with open(lockfile, "r") as f:
815
                if line.startswith("options ="):
815
        for line in f:
816
                    key, val = line.split('=')
816
            if line.startswith("options ="):
817
                    arr = val.split(',')
817
                _, val = line.split('=', 1)
818
                    for x in arr:
818
                for x in val.split(','):
819
                        optkey,optval = x.split(':')
819
                    optkey, optval = x.split(':')
820
                        if (optkey.lstrip() == '\'build_profile\''):
820
                    if (optkey.lstrip() == '\'build_profile\''):
821
                            profile = str(optval.lstrip()).replace("'","")
821
                        return str(optval.lstrip()).replace("'","")
822
    else:
822
823
        profile = Options.options.build_profile
823
    return "not found"
824
    return profile
825
824
826
def build(bld):
825
def build(bld):
827
    env = bld.env
826
    env = bld.env

Return to bug 2852