improve dist support

Mathieu Lacage 2007-05-17 11:46:33 +02:00
parent fd0a70f87e
commit aa0d967512
2 changed files with 10 additions and 1 deletions

View File

@ -6,8 +6,15 @@ ns3 = build.Ns3()
ns3.build_dir = 'build-dir'
ns3.version = '0.2'
ns3.name = 'ns3'
ns3.distname = 'ns-3'
ns3.doxygen_config = os.path.join('doc', 'doxygen.conf')
ns3.add_extra_dist(os.path.join('doc', 'main.txt'))
ns3.add_extra_dist ('doc/contributing.txt')
ns3.add_extra_dist ('doc/build.txt')
ns3.add_extra_dist ('doc/mercurial.txt')
ns3.add_extra_dist ('README')
ns3.add_extra_dist ('RELEASE_NOTES')
ns3.add_extra_dist ('AUTHORS')
#

View File

@ -138,6 +138,7 @@ class Ns3:
self.build_dir = 'build'
self.version = '0.0.1'
self.name = 'noname'
self.distname = 'noname'
self.doxygen_config = ''
def add(self, module):
self.__modules.append(module)
@ -516,11 +517,12 @@ class Ns3:
dist_list.append(os.path.join(module.dir, f))
for f in self.extra_dist:
dist_list.append(f)
dist_list.append (self.doxygen_config)
dist_list.append('SConstruct')
dist_list.append('build.py')
targets = []
basename = self.name + '-' + self.version
basename = self.distname + '-' + self.version
for src in dist_list:
tgt = os.path.join(basename, src)
targets.append(dist_env.MyCopyBuilder(target=tgt, source=src))