nsc: fix liblinux2.6.18.so sym link creation ns-3.2-RC2
authorFlorian Westphal <fw@strlen.de>
Wed, 10 Sep 2008 13:11:35 +0200
changeset 3673319eb29611b1
parent 3672 817729f77408
child 3674 9ecfcb3e3868
nsc: fix liblinux2.6.18.so sym link creation

changeset 3628:a9c05c7e54f2 ('Move all NSC related build code into
src/internet-stack') erronoulsy moved the sym link creation outside
of the loop.

closes bug #328.
src/internet-stack/wscript
     1.1 --- a/src/internet-stack/wscript	Wed Sep 10 12:46:59 2008 +0200
     1.2 +++ b/src/internet-stack/wscript	Wed Sep 10 13:11:35 2008 +0200
     1.3 @@ -101,6 +101,7 @@
     1.4  
     1.5      def run(self):
     1.6          # XXX: Detect gcc major version(s) available to build supported stacks
     1.7 +        builddir = self.builddir
     1.8          kernels = [['linux-2.6.18', 'linux2.6.18'],
     1.9                     ['linux-2.6.26', 'linux2.6.26']]
    1.10          for dir, name in kernels:
    1.11 @@ -108,14 +109,13 @@
    1.12              if not os.path.exists(os.path.join("..", NSC_DIR, dir, soname)):
    1.13                  if os.system('cd ../%s && python scons.py %s' % (NSC_DIR, dir)) != 0:
    1.14                      Params.fatal("Building NSC stack failed")
    1.15 -        builddir = self.builddir
    1.16  
    1.17 -        if not os.path.exists(builddir + '/' + soname):
    1.18 -            try:
    1.19 -                os.symlink('../../' + NSC_DIR + '/' + dir + '/' + soname, builddir +  '/' + soname)
    1.20 -            except:
    1.21 -                Params.fatal("Error linking " + builddir + '/' + soname)
    1.22 -        
    1.23 +            if not os.path.exists(builddir + '/' + soname):
    1.24 +                try:
    1.25 +                    os.symlink('../../' + NSC_DIR + '/' + dir + '/' + soname, builddir +  '/' + soname)
    1.26 +                except:
    1.27 +                    Params.fatal("Error linking " + builddir + '/' + soname)
    1.28 +
    1.29  
    1.30  def build(bld):
    1.31      obj = bld.create_ns3_module('internet-stack', ['node'])