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

(-)a/bindings/python/wscript (-11 / +17 lines)
 Lines 307-313    Link Here 
307
    return ns3headers.path.abspath()
307
    return ns3headers.path.abspath()
308
308
309
class apiscan_task(Task.TaskBase):
309
class apiscan_task(Task.TaskBase):
310
    """Uses gccxml to scan the file 'everything.h' and extract API definitions.
310
    """
311
    Uses gccxml to scan the file 'everything.h' and extract API definitions.
311
    """
312
    """
312
    after = 'gen_ns3_module_header_task ns3header_task'
313
    after = 'gen_ns3_module_header_task ns3header_task'
313
    before = 'cc cxx gchx'
314
    before = 'cc cxx gchx'
 Lines 393-411    Link Here 
393
394
394
        header_files.sort(sort_func)
395
        header_files.sort(sort_func)
395
396
396
        print >> outfile, """
397
        print >> outfile, """/* http://www.nsnam.org/bugzilla/show_bug.cgi?id=413 */
397
398
/* http://www.nsnam.org/bugzilla/show_bug.cgi?id=413 */
399
#ifdef ECHO
398
#ifdef ECHO
400
# undef ECHO
399
# undef ECHO
401
#endif
400
#endif
402
401
"""
403
    """
404
        for header in header_files:
402
        for header in header_files:
405
            print >> outfile, "#include \"ns3/%s\"" % (header,)
403
            print >> outfile, "#include \"ns3/%s\"" % (header,)
406
404
407
        print >> outfile, """
405
        print >> outfile, """namespace ns3 {
408
namespace ns3 {
409
static inline Ptr<Object>
406
static inline Ptr<Object>
410
__dummy_function_to_force_template_instantiation (Ptr<Object> obj, TypeId typeId)
407
__dummy_function_to_force_template_instantiation (Ptr<Object> obj, TypeId typeId)
411
{
408
{
 Lines 436-442    Link Here 
436
433
437
434
438
class all_ns3_headers_taskgen(TaskGen.task_gen):
435
class all_ns3_headers_taskgen(TaskGen.task_gen):
439
    """Generates a 'everything.h' header file that includes some/all public ns3 headers.
436
    """
437
    Generates a 'everything.h' header file that includes some/all public ns3 headers.
440
    This single header file is to be parsed only once by gccxml, for greater efficiency.
438
    This single header file is to be parsed only once by gccxml, for greater efficiency.
441
    """
439
    """
442
    def __init__(self, *args, **kwargs):
440
    def __init__(self, *args, **kwargs):
 Lines 511-517    Link Here 
511
509
512
510
513
class python_scan_task(Task.TaskBase):
511
class python_scan_task(Task.TaskBase):
514
    """Uses gccxml to scan the file 'everything.h' and extract API definitions.
512
    """
513
    Uses gccxml to scan the file 'everything.h' and extract API definitions.
515
    """
514
    """
516
    after = 'gen_everything_h_task'
515
    after = 'gen_everything_h_task'
517
    before = 'cc cxx gchx'
516
    before = 'cc cxx gchx'
 Lines 548-554    Link Here 
548
        return retval
547
        return retval
549
548
550
class python_scan_task_collector(Task.TaskBase):
549
class python_scan_task_collector(Task.TaskBase):
551
    """Tasks that waits for the python-scan-* tasks to complete and then signals WAF to exit
550
    """
551
    Tasks that waits for the python-scan-* tasks to complete and then signals WAF to exit
552
    """
552
    """
553
    after = 'python_scan_task apiscan_task'
553
    after = 'python_scan_task apiscan_task'
554
    before = 'cc cxx'
554
    before = 'cc cxx'
 Lines 766-768    Link Here 
766
        task.set_outputs(bld.path.find_or_declare("ns3.py"))
766
        task.set_outputs(bld.path.find_or_declare("ns3.py"))
767
        task.dep_vars = ['PYTHON_MODULES_BUILT']
767
        task.dep_vars = ['PYTHON_MODULES_BUILT']
768
768
769
    if os.path.exists('/usr/lib64'):
770
        libdir = os.path.join('${PREFIX}', 'lib64')
771
    else:
772
        libdir = os.path.join('${PREFIX}', 'lib')
773
774
    bld.install_files(os.path.join(libdir, 'python' + sys.version[0:3], 'site-packages'), [os.path.join('build', Options.options.build_profile, 'bindings', 'python', 'ns', module) for module in env['PYTHON_MODULES_BUILT'], os.path.join('build', Options.options.build_profile, 'bindings', 'python', 'ns3.py')])

Return to bug 1200