Help waf to guess release versions of nsc and pybindgen default tip
authorTom Henderson <tomh@tomh.org>
Fri, 20 Aug 2010 12:17:19 -0700
changeset 65899c325569fb01
parent 6588 a1ed37e031bc
Help waf to guess release versions of nsc and pybindgen
bindings/python/wscript
src/internet-stack/wscript
     1.1 --- a/bindings/python/wscript	Fri Aug 20 08:24:29 2010 -0700
     1.2 +++ b/bindings/python/wscript	Fri Aug 20 12:17:19 2010 -0700
     1.3 @@ -107,11 +107,18 @@
     1.4              conf.check_message("pybindgen location", '', True, ("%s (given)" % Options.options.with_pybindgen))
     1.5              conf.env['WITH_PYBINDGEN'] = os.path.abspath(Options.options.with_pybindgen)
     1.6      else:
     1.7 +        # ns-3-dev uses ../pybindgen, while ns-3 releases use ../REQUIRED_PYBINDGEN_VERSION
     1.8          pybindgen_dir = os.path.join('..', "pybindgen")
     1.9 +        pybindgen_release_str = "pybindgen-" + '.'.join([str(x) for x in REQUIRED_PYBINDGEN_VERSION])
    1.10 +        pybindgen_release_dir = os.path.join('..', pybindgen_release_str)
    1.11          if os.path.isdir(pybindgen_dir):
    1.12              conf.check_message("pybindgen location", '', True, ("%s (guessed)" % pybindgen_dir))
    1.13              conf.env['WITH_PYBINDGEN'] = os.path.abspath(pybindgen_dir)
    1.14 +        elif os.path.isdir(pybindgen_release_dir):
    1.15 +            conf.check_message("pybindgen location", '', True, ("%s (guessed)" % pybindgen_release_dir))
    1.16 +            conf.env['WITH_PYBINDGEN'] = os.path.abspath(pybindgen_release_dir)
    1.17          del pybindgen_dir
    1.18 +        del pybindgen_release_dir
    1.19      if not conf.env['WITH_PYBINDGEN']:
    1.20          conf.check_message("pybindgen location", '', False)
    1.21  
     2.1 --- a/src/internet-stack/wscript	Fri Aug 20 08:24:29 2010 -0700
     2.2 +++ b/src/internet-stack/wscript	Fri Aug 20 12:17:19 2010 -0700
     2.3 @@ -35,11 +35,17 @@
     2.4              conf.check_message("NSC location", '', True, ("%s (given)" % Options.options.with_nsc))
     2.5              conf.env['WITH_NSC'] = os.path.abspath(Options.options.with_nsc)
     2.6      else:
     2.7 +        # ns-3-dev uses ../nsc, while ns-3 releases use ../NSC_RELEASE_NAME
     2.8          nsc_dir = os.path.join('..', "nsc")
     2.9 +        nsc_release_dir = os.path.join('..', NSC_RELEASE_NAME)
    2.10          if os.path.isdir(nsc_dir):
    2.11              conf.check_message("NSC location", '', True, ("%s (guessed)" % nsc_dir))
    2.12              conf.env['WITH_NSC'] = os.path.abspath(nsc_dir)
    2.13 +        elif os.path.isdir(nsc_release_dir):
    2.14 +            conf.check_message("NSC location", '', True, ("%s (guessed)" % nsc_release_dir))
    2.15 +            conf.env['WITH_NSC'] = os.path.abspath(nsc_release_dir)
    2.16          del nsc_dir
    2.17 +        del nsc_release_dir
    2.18      if not conf.env['WITH_NSC']:
    2.19          conf.check_message("NSC location", '', False)
    2.20          conf.report_optional_feature("nsc", "Network Simulation Cradle", False,