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

(-)a/src/wscript (-2 / +7 lines)
 Lines 59-69    Link Here 
59
            if not conf.env['LIB_BOOST']:
59
            if not conf.env['LIB_BOOST']:
60
                conf.env['LIB_BOOST'] = []
60
                conf.env['LIB_BOOST'] = []
61
61
62
    # Append blddir to the module path before recursing into modules
63
    blddir = os.path.abspath(os.path.join(conf.bldnode.abspath(), conf.variant))
64
    conf.env.append_value('NS3_MODULE_PATH', blddir)
65
62
    for module in all_modules:
66
    for module in all_modules:
63
        conf.recurse(module, mandatory=False)
67
        conf.recurse(module, mandatory=False)
64
68
65
    blddir = os.path.abspath(os.path.join(conf.bldnode.abspath(), conf.variant))
69
    # Remove duplicate path items
66
    conf.env.append_value('NS3_MODULE_PATH', blddir)
70
    conf.env['NS3_MODULE_PATH'] = wutils.uniquify_list(conf.env['NS3_MODULE_PATH'])
71
67
    if Options.options.enable_rpath:
72
    if Options.options.enable_rpath:
68
        conf.env.append_value('RPATH', '-Wl,-rpath,%s' % (os.path.join(blddir),))
73
        conf.env.append_value('RPATH', '-Wl,-rpath,%s' % (os.path.join(blddir),))
69
74
(-)a/wutils.py (+7 lines)
 Lines 228-230    Link Here 
228
    return run_argv([env['PYTHON'][0]] + execvec, env, cwd=cwd)
228
    return run_argv([env['PYTHON'][0]] + execvec, env, cwd=cwd)
229
229
230
230
231
def uniquify_list(seq):
232
    """Remove duplicates while preserving order
233
       From Dave Kirby http://www.peterbe.com/plog/uniqifiers-benchmark
234
    """
235
    seen = set()
236
    return [ x for x in seq if x not in seen and not seen.add(x)]
237

Return to bug 1869