mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
meson: extend install_megadrivers script to handle symmlinking
Which is required for the gallium media state trackers. v2: - Make symlinks local instead of absolute Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
parent
b065de05c6
commit
f7f1b30f81
1 changed files with 14 additions and 0 deletions
|
|
@ -44,10 +44,24 @@ def main():
|
|||
|
||||
for each in args.drivers:
|
||||
driver = os.path.join(to, each)
|
||||
|
||||
if os.path.exists(driver):
|
||||
os.unlink(driver)
|
||||
print('installing {} to {}'.format(args.megadriver, driver))
|
||||
os.link(master, driver)
|
||||
|
||||
try:
|
||||
ret = os.getcwd()
|
||||
os.chdir(to)
|
||||
|
||||
name, ext = os.path.splitext(each)
|
||||
while ext != '.so':
|
||||
if os.path.exists(name):
|
||||
os.unlink(name)
|
||||
os.symlink(driver, name)
|
||||
name, ext = os.path.splitext(name)
|
||||
finally:
|
||||
os.chdir(ret)
|
||||
os.unlink(master)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue