merge with tip
authorTom Henderson <tomh@tomh.org>
Mon, 20 Apr 2009 19:53:22 -0700
changeset 4383 68b89964dd28
parent 4382 e63da65e8fb9 (current diff)
parent 4370 a64e987a727a (diff)
child 4384 85344a688fbb
merge with tip
--- a/src/contrib/wscript	Fri Apr 17 15:46:01 2009 -0700
+++ b/src/contrib/wscript	Mon Apr 20 19:53:22 2009 -0700
@@ -16,7 +16,7 @@
                                  "library 'libxml-2.0 >= 2.7' not found")
     conf.sub_config('stats')
 
-    conf.write_config_header('ns3/contrib-config.h')
+    conf.write_config_header('ns3/contrib-config.h', project_root_relative=True)
 
 def build(bld):
     module = bld.create_ns3_module('contrib', ['simulator', 'common'])
--- a/src/core/wscript	Fri Apr 17 15:46:01 2009 -0700
+++ b/src/core/wscript	Mon Apr 20 19:53:22 2009 -0700
@@ -41,7 +41,7 @@
                                  conf.env['ENABLE_THREADING'],
                                  "<pthread.h> include not detected")
 
-    conf.write_config_header('ns3/core-config.h')
+    conf.write_config_header('ns3/core-config.h', project_root_relative=True)
 
 def build(bld):
     core = bld.create_ns3_module('core')
--- a/src/devices/emu/emu-net-device.cc	Fri Apr 17 15:46:01 2009 -0700
+++ b/src/devices/emu/emu-net-device.cc	Mon Apr 20 19:53:22 2009 -0700
@@ -68,6 +68,11 @@
                    Mac48AddressValue (Mac48Address ("ff:ff:ff:ff:ff:ff")),
                    MakeMac48AddressAccessor (&EmuNetDevice::m_address),
                    MakeMac48AddressChecker ())
+    .AddAttribute ("DeviceName", 
+                   "The name of the underlying real device (e.g. eth1).",
+                   StringValue ("eth1"),
+                   MakeStringAccessor (&EmuNetDevice::m_deviceName),
+                   MakeStringChecker ())
     .AddAttribute ("Start", 
                    "The simulation time at which to spin up the device thread.",
                    TimeValue (Seconds (0.)),
--- a/src/simulator/wscript	Fri Apr 17 15:46:01 2009 -0700
+++ b/src/simulator/wscript	Mon Apr 20 19:53:22 2009 -0700
@@ -31,7 +31,7 @@
 
     conf.check(header_name='sys/inttypes.h', define_name='HAVE_SYS_INT_TYPES_H')
 
-    conf.write_config_header('ns3/simulator-config.h')
+    conf.write_config_header('ns3/simulator-config.h', project_root_relative=True)
 
     if not conf.check(lib='rt', uselib='RT', define_name='HAVE_RT'):
         conf.report_optional_feature("RealTime", "Real Time Simulator",
--- a/src/wscript	Fri Apr 17 15:46:01 2009 -0700
+++ b/src/wscript	Mon Apr 20 19:53:22 2009 -0700
@@ -67,7 +67,7 @@
 
 
 def create_ns3_module(bld, name, dependencies=()):
-    module = bld.new_task_gen('cxx', 'objects')
+    module = bld.new_task_gen('cxx')
     module.name = 'ns3-' + name
     module.target = module.name
     module.add_objects = ['ns3-' + dep for dep in dependencies]
Binary file waf has changed
--- a/wscript	Fri Apr 17 15:46:01 2009 -0700
+++ b/wscript	Mon Apr 20 19:53:22 2009 -0700
@@ -174,7 +174,7 @@
     try:
         retval = conf.run_c_code(code='#include <stdio.h>\nint main() { return 0; }\n',
                                  env=env, compile_filename='test.cc',
-                                 compile_mode='cxx',type='program', execute=False)
+                                 compile_mode='cxx',type='cprogram', execute=False)
     except Configure.ConfigurationError:
         ok = False
     else:
@@ -296,10 +296,11 @@
     after = 'cxx_link cc_link'
     maxjobs = 1
     def __init__(self, bld, program):
+        self.bld = bld
         self.m_display = 'build-suid'
         self.__program = program
         self.__env = bld.env.copy ()
-        super(SuidBuildTask, self).__init__()
+        super(SuidBuildTask, self).__init__(generator=self)
         try:
             program_obj = wutils.find_program(self.__program.target, self.__env)
         except ValueError, ex:
@@ -498,7 +499,7 @@
     "run the NS-3 unit tests"
     Scripting.build(bld)
     ## generate the trace sources list docs
-    env = bld.env
+    env = wutils.bld.env
     proc_env = wutils.get_proc_env()
     try:
         program_obj = wutils.find_program('print-introspected-doxygen', env)
@@ -514,7 +515,7 @@
         out.close()
 
     print "-- Running NS-3 C++ core unit tests..."
-    wutils.run_program('run-tests', wutils.get_command_template(env))
+    wutils.run_program('run-tests', env, wutils.get_command_template(env))
 
     if env['ENABLE_PYTHON_BINDINGS']:
         print "-- Running NS-3 Python bindings unit tests..."