mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
build: no need to re-create the lib and bin symlinks if they exist
this saves a few unlink/symlink calls for null builds
This commit is contained in:
parent
5f90d3260b
commit
0b8a3a4036
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user