Bug 1632

Summary: prepend bake build directory to the guessed locations that waf will look to find libraries
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: build systemAssignee: Mitch Watrous <watrous>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P5    
Version: pre-release   
Hardware: All   
OS: All   

Description Tom Henderson 2013-04-19 16:19:19 UTC
We have this code presently in our click, openflow, and nsc wscripts:

    # Check for the location of NSC
    if Options.options.with_nsc:
        if os.path.isdir(Options.options.with_nsc):
            conf.msg("Checking for NSC location", ("%s (given)" % Options.options.with_nsc))
            conf.env['WITH_NSC'] = os.path.abspath(Options.options.with_nsc)
    else:
        # ns-3-dev uses ../nsc, while ns-3 releases use ../NSC_RELEASE_NAME
        nsc_dir = os.path.join('..', "nsc")
        nsc_release_dir = os.path.join('..', NSC_RELEASE_NAME)
        if os.path.isdir(nsc_dir):
            conf.msg("Checking for NSC location",("%s (guessed)" % nsc_dir))
            conf.env['WITH_NSC'] = os.path.abspath(nsc_dir)
        elif os.path.isdir(nsc_release_dir):
            conf.msg("Checking for NSC location", ("%s (guessed)" % nsc_release_dir))
            conf.env['WITH_NSC'] = os.path.abspath(nsc_release_dir)
        del nsc_dir
        del nsc_release_dir

This will try to find NSC at the user-specified location, if set during configure step, but if not set, waf will try to find the nsc libraries in well-known places (one directory level up).

I would like to try to modify this to first look in the default build/ directory for bake, under the premise that we would like to encourage consistent builds (as discussed on the list here:
http://mailman.isi.edu/pipermail/ns-developers/2013-April/010954.html).

I would like to retain the logic that looks for NSC one-level-up; I'd just like it to use the bake location first if it finds libraries there.
Comment 1 Mitch Watrous 2013-04-26 16:56:48 UTC
Bug closed.

ns-3-dev changeset: 1fa2f15d0706