[Mesa-dev] [PATCH] i965: fix autotools build

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Mar 20 14:48:54 UTC 2018


In tree builds are failing because os.path.basename() doesn't seem to
deal well with a relative path not containing any '/'.

Fixes: 035cc7a12dc ("i965: perf: reduce i965 binary size")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/mesa/drivers/dri/i965/brw_oa.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_oa.py b/src/mesa/drivers/dri/i965/brw_oa.py
index 522311639bb..908c1ae9a11 100644
--- a/src/mesa/drivers/dri/i965/brw_oa.py
+++ b/src/mesa/drivers/dri/i965/brw_oa.py
@@ -632,7 +632,10 @@ def main():
 
         """))
 
-    c("#include \"" + os.path.basename(args.header) + "\"")
+    basename_header = args.header
+    if "/" in arg.header:
+        basename_header = os.path.basename(args.header)
+    c("#include \"{0}\"".format(basename_header))
 
     c(textwrap.dedent("""\
         #include "brw_context.h"
-- 
2.16.2



More information about the mesa-dev mailing list