summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-09 20:30:44 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-09 20:31:06 +1000
commit0b8a3a4036f3dfc59a39ae4b6364f93a66a40415 (patch)
tree261ea56c2502b36f27733fc42a484e7c312d3264 /buildtools
parent5f90d3260be8f30e5d9ccd542aca1807d58d2443 (diff)
downloadsamba-0b8a3a4036f3dfc59a39ae4b6364f93a66a40415.tar.gz
samba-0b8a3a4036f3dfc59a39ae4b6364f93a66a40415.tar.bz2
samba-0b8a3a4036f3dfc59a39ae4b6364f93a66a40415.zip
build: no need to re-create the lib and bin symlinks if they exist
this saves a few unlink/symlink calls for null builds
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_install.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index fee456a8dd..df65da1e15 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -133,6 +133,9 @@ def symlink_lib(self):
link_target = os.path.join(blddir, link_target)
if os.path.lexists(link_target):
+ old_link = os.readlink(link_target)
+ if libpath == old_link:
+ return
os.unlink(link_target)
os.symlink(libpath, link_target)
@@ -150,5 +153,8 @@ def symlink_bin(self):
bldpath = os.path.join(self.bld.env.BUILD_DIRECTORY, self.target)
if os.path.lexists(bldpath):
+ old_link = os.readlink(bldpath)
+ if binpath == old_link:
+ return
os.unlink(bldpath)
os.symlink(binpath, bldpath)