build: check that the symlink doesn't exist before creating
authorAndrew Tridgell <tridge@samba.org>
Tue, 16 Mar 2010 21:50:49 +0000 (08:50 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:49 +0000 (20:26 +1000)
buildtools/wafsamba/wafsamba.py

index a6b95523139a37b2d3cf22de9d8779edc5d6638e..db4b7b80d2c003c3bbc005b8150000cb54c92811 100644 (file)
@@ -29,8 +29,11 @@ def SAMBA_BUILD_ENV(conf):
     mkdir_p(os.path.join(conf.blddir, 'python/samba/dcerpc'))
     # this allows all of the bin/shared and bin/python targets
     # to be expressed in terms of build directory paths
-    os.symlink('../python', os.path.join(conf.blddir, 'default/python'))
-    os.symlink('../shared', os.path.join(conf.blddir, 'default/shared'))
+    for p in ['python','shared']:
+        link_target = os.path.join(conf.blddir, 'default/' + p)
+        if not os.path.lexists(link_target):
+            os.symlink('../' + p, link_target)
+
 
 
 ################################################################