[Mesa-dev] [PATCH 07/14] meson: extend install_megadrivers script to handle symmlinking

Dylan Baker dylan at pnwbakers.com
Tue Nov 28 23:30:28 UTC 2017


Which is required for the gallium media state trackers.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
 bin/install_megadrivers.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bin/install_megadrivers.py b/bin/install_megadrivers.py
index a98d7dd177b..587a1f6726d 100755
--- a/bin/install_megadrivers.py
+++ b/bin/install_megadrivers.py
@@ -44,10 +44,18 @@ 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)
+
+        name, ext = os.path.splitext(driver)
+        while ext != '.so':
+            if os.path.exists(name):
+                os.unlink(name)
+            os.symlink(driver, name)
+            name, ext = os.path.splitext(name)
     os.unlink(master)
 
 
-- 
2.15.0



More information about the mesa-dev mailing list