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

(-)a/src/config-store/wscript (+2 lines)
 Lines 18-23    Link Here 
18
18
19
19
20
def build(bld):
20
def build(bld):
21
    bld.install_files('${PREFIX}/include/ns3', '../../ns3/config-store-config.h')
22
21
    module = bld.create_ns3_module('config-store', ['core', 'network'])
23
    module = bld.create_ns3_module('config-store', ['core', 'network'])
22
    module.source = [
24
    module.source = [
23
        'model/attribute-iterator.cc',
25
        'model/attribute-iterator.cc',
(-)a/src/wscript (-13 / +16 lines)
 Lines 340-347    Link Here 
340
340
341
    def _generate_pcfile(self, name, use, uselib_local, prefix, outfilename):
341
    def _generate_pcfile(self, name, use, uselib_local, prefix, outfilename):
342
        outfile = open(outfilename, 'w')
342
        outfile = open(outfilename, 'w')
343
        includedir = os.path.join(prefix, 'include')
343
        includedir = os.path.join(prefix, 'include', 'ns3')
344
        libdir = os.path.join(prefix, 'lib')
344
        if os.path.exists('/usr/lib64'):
345
            libdir = os.path.join(prefix, 'lib64')
346
        else:
347
            libdir = os.path.join(prefix, 'lib')
345
        libs = self._self_libs(self.env, name, '${libdir}')
348
        libs = self._self_libs(self.env, name, '${libdir}')
346
        for dep in use:
349
        for dep in use:
347
            libs = libs + self._lib(self.env, dep)
350
            libs = libs + self._lib(self.env, dep)
 Lines 351-358    Link Here 
351
        for dep in use:
354
        for dep in use:
352
            cflags = cflags + self._cflags(dep) + self._cxxflags(dep) + \
355
            cflags = cflags + self._cflags(dep) + self._cxxflags(dep) + \
353
                self._defines(dep) + self._includes(dep)
356
                self._defines(dep) + self._includes(dep)
354
        print >> outfile, """
357
        print >> outfile, """prefix=%s
355
prefix=%s
356
libdir=%s
358
libdir=%s
357
includedir=%s
359
includedir=%s
358
360
 Lines 360-367    Link Here 
360
Description: ns-3 module %s
362
Description: ns-3 module %s
361
Version: devel
363
Version: devel
362
Libs: %s
364
Libs: %s
363
Cflags: %s
365
Cflags: %s""" % (prefix, libdir, includedir,
364
""" % (prefix, libdir, includedir,
365
       name, name, ' '.join(libs), ' '.join(cflags))
366
       name, name, ' '.join(libs), ' '.join(cflags))
366
        outfile.close()
367
        outfile.close()
367
368
 Lines 379-385    Link Here 
379
        output_node = self.path.find_or_declare(output_filename)
380
        output_node = self.path.find_or_declare(output_filename)
380
        assert output_node is not None, str(self)
381
        assert output_node is not None, str(self)
381
        task = self.create_task('ns3pcfile', env=self.env)
382
        task = self.create_task('ns3pcfile', env=self.env)
382
        self.bld.install_files(os.path.join('${PREFIX}', 'lib', 'pkgconfig'),
383
        if os.path.exists('/usr/lib64'):
384
            libdir = os.path.join('${PREFIX}', 'lib64')
385
        else:
386
            libdir = os.path.join('${PREFIX}', 'lib')
387
        self.bld.install_files(os.path.join(libdir, 'pkgconfig'),
383
                               output_node)
388
                               output_node)
384
        task.set_outputs([output_node])
389
        task.set_outputs([output_node])
385
        task.module = self.module
390
        task.module = self.module
 Lines 398-404    Link Here 
398
    def apply(self):
403
    def apply(self):
399
        for filename in set(self.to_list(self.source)):
404
        for filename in set(self.to_list(self.source)):
400
            src_node = self.path.find_resource(filename)
405
            src_node = self.path.find_resource(filename)
401
            self.bld.install_files('${PREFIX}/include/ns3', [src_node])
406
            self.bld.install_files(os.path.join('${PREFIX}', 'include', 'ns3'), [src_node])
402
        if self.module is None:
407
        if self.module is None:
403
            raise Utils.WafError("'module' missing on ns3headers object %s" % self)
408
            raise Utils.WafError("'module' missing on ns3headers object %s" % self)
404
        ns3_dir_node = self.bld.path.find_dir("ns3")
409
        ns3_dir_node = self.bld.path.find_dir("ns3")
 Lines 512-524    Link Here 
512
        outfile = file(out_file_name, "w")
517
        outfile = file(out_file_name, "w")
513
        header_files.sort()
518
        header_files.sort()
514
519
515
        print >> outfile, """
520
        print >> outfile, """#ifdef NS3_MODULE_COMPILATION
516
#ifdef NS3_MODULE_COMPILATION
517
# error "Do not include ns3 module aggregator headers from other modules; these are meant only for end user scripts."
521
# error "Do not include ns3 module aggregator headers from other modules; these are meant only for end user scripts."
518
#endif
522
#endif
519
523
520
#ifndef NS3_MODULE_%s
524
#ifndef NS3_MODULE_%s""" % (self.module.upper().replace('-', '_'),)
521
    """ % (self.module.upper().replace('-', '_'),)
522
525
523
    #     if self.module_deps:
526
    #     if self.module_deps:
524
    #         print >> outfile, "// Module dependencies:"
527
    #         print >> outfile, "// Module dependencies:"
 Lines 580-586    Link Here 
580
            raise Utils.WscriptError("error finding headers for module %s" % self.module)
583
            raise Utils.WscriptError("error finding headers for module %s" % self.module)
581
        if not all_headers_inputs:
584
        if not all_headers_inputs:
582
            return
585
            return
583
        self.bld.install_files('${PREFIX}/include/ns3', 
586
        self.bld.install_files(os.path.join('${PREFIX}', 'include', 'ns3'), 
584
                               ns3_dir_node.find_or_declare("%s-module.h" % self.module))
587
                               ns3_dir_node.find_or_declare("%s-module.h" % self.module))
585
        all_headers_outputs = [ns3_dir_node.find_or_declare("%s-module.h" % self.module)]
588
        all_headers_outputs = [ns3_dir_node.find_or_declare("%s-module.h" % self.module)]
586
        task = self.create_task('gen_ns3_module_header', env=self.env)
589
        task = self.create_task('gen_ns3_module_header', env=self.env)
(-)a/wscript (-1 / +9 lines)
 Lines 727-732    Link Here 
727
        _doxygen(bld)
727
        _doxygen(bld)
728
        raise SystemExit(0)
728
        raise SystemExit(0)
729
729
730
    if os.path.exists('/usr/lib64'):
731
        libdir = os.path.join('${PREFIX}', 'lib64')
732
    else:
733
        libdir = os.path.join('${PREFIX}', 'lib')
734
735
    bld.install_files(libdir, [os.path.join('build', Options.options.build_profile, 'lib' + module + '.so') for module in modules])
736
730
def shutdown(ctx):
737
def shutdown(ctx):
731
    bld = wutils.bld
738
    bld = wutils.bld
732
    if wutils.bld is None:
739
    if wutils.bld is None:
 Lines 965-971    Link Here 
965
import os
972
import os
966
973
967
def _copytree(src, dst, symlinks=False, excludes=(), build_dir=None):
974
def _copytree(src, dst, symlinks=False, excludes=(), build_dir=None):
968
    """Recursively copy a directory tree using copy2().
975
    """
976
    Recursively copy a directory tree using copy2().
969
977
970
    The destination directory must not already exist.
978
    The destination directory must not already exist.
971
    If exception(s) occur, an Error is raised with a list of reasons.
979
    If exception(s) occur, an Error is raised with a list of reasons.

Return to bug 1199