From 22ffc05266c68b78cf328d091ba6b0db03f56867 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Tue, 31 Mar 2020 14:05:59 -0700 Subject: [PATCH] util: Move xxd.py to util Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/SConscript.glsl | 2 +- src/compiler/glsl/meson.build | 2 +- src/util/meson.build | 2 ++ src/{compiler/glsl => util}/xxd.py | 0 4 files changed, 4 insertions(+), 2 deletions(-) rename src/{compiler/glsl => util}/xxd.py (100%) diff --git a/src/compiler/SConscript.glsl b/src/compiler/SConscript.glsl index 85abfbac78a..44a02173dfd 100644 --- a/src/compiler/SConscript.glsl +++ b/src/compiler/SConscript.glsl @@ -90,7 +90,7 @@ compiler_objs += mesa_objs # GLSL generated sources env.CodeGenerate( target = 'glsl/float64_glsl.h', - script = 'glsl/xxd.py', + script = '../util/xxd.py', source = ['glsl/float64.glsl'], command = python_cmd + ' $SCRIPT $SOURCE $TARGET -n float64_source', ) diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build index e59630590b9..82e7df889ec 100644 --- a/src/compiler/glsl/meson.build +++ b/src/compiler/glsl/meson.build @@ -55,7 +55,7 @@ ir_expression_operation_strings_h = custom_target( float64_glsl_h = custom_target( 'float64_glsl.h', - input : ['xxd.py', 'float64.glsl'], + input : [files_xxd, 'float64.glsl'], output : 'float64_glsl.h', command : [prog_python, '@INPUT@', '@OUTPUT@', '-n', 'float64_source'], ) diff --git a/src/util/meson.build b/src/util/meson.build index e1a820c6fe3..16e3999db96 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -224,6 +224,8 @@ idep_xmlconfig = declare_dependency( link_with : _libxmlconfig, ) +files_xxd = files('xxd.py') + if with_tests # DRI_CONF macros use designated initializers (required for union # initializaiton), so we need c++2a since gtest forces us to use c++ diff --git a/src/compiler/glsl/xxd.py b/src/util/xxd.py similarity index 100% rename from src/compiler/glsl/xxd.py rename to src/util/xxd.py