[Mesa-dev] [PATCH 1/5] ac/debug: Move sid_tables.h generation to common code.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Jan 2 18:57:34 UTC 2017


Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
Cc: Marek Olšák <maraeo at gmail.com>
---
 src/amd/Makefile.am                                        |  2 +-
 src/amd/Makefile.common.am                                 |  8 +++++++-
 src/amd/Makefile.sources                                   |  3 +++
 src/{gallium/drivers/radeonsi => amd/common}/sid_tables.py |  0
 src/gallium/drivers/radeonsi/Makefile.am                   | 11 +----------
 src/gallium/drivers/radeonsi/Makefile.sources              |  3 ---
 6 files changed, 12 insertions(+), 15 deletions(-)
 rename src/{gallium/drivers/radeonsi => amd/common}/sid_tables.py (100%)

diff --git a/src/amd/Makefile.am b/src/amd/Makefile.am
index 1402ca54a7..0a8456d1e4 100644
--- a/src/amd/Makefile.am
+++ b/src/amd/Makefile.am
@@ -23,6 +23,6 @@ include Makefile.sources
 
 noinst_LTLIBRARIES =
 
-EXTRA_DIST = $(COMMON_HEADER_FILES)
+EXTRA_DIST = $(COMMON_HEADER_FILES) $(srcdir)/common/sid_tables.py
 include Makefile.addrlib.am
 include Makefile.common.am
diff --git a/src/amd/Makefile.common.am b/src/amd/Makefile.common.am
index 1a36e48101..1425decb90 100644
--- a/src/amd/Makefile.common.am
+++ b/src/amd/Makefile.common.am
@@ -52,7 +52,9 @@ common_libamd_common_la_CXXFLAGS = \
 
 noinst_LTLIBRARIES += $(COMMON_LIBS)
 
-common_libamd_common_la_SOURCES = $(AMD_COMPILER_FILES)
+common_libamd_common_la_SOURCES = \
+	$(AMD_COMPILER_FILES) \
+	$(AMD_GENERATED_FILES)
 
 # nir_to_llvm requires LLVM 3.9, which is only required as a minimum when
 # radv is built.
@@ -60,4 +62,8 @@ if HAVE_RADEON_VULKAN
 common_libamd_common_la_SOURCES += $(AMD_NIR_FILES)
 endif
 
+$(srcdir)/common/sid_tables.h: $(srcdir)/common/sid_tables.py $(srcdir)/common/sid.h
+	$(AM_V_GEN) $(PYTHON2) $(srcdir)/common/sid_tables.py $(srcdir)/common/sid.h > $@
+
+BUILT_SOURCES = $(AMD_GENERATED_FILES)
 endif
diff --git a/src/amd/Makefile.sources b/src/amd/Makefile.sources
index 122ef71c45..bde02d16a8 100644
--- a/src/amd/Makefile.sources
+++ b/src/amd/Makefile.sources
@@ -36,3 +36,6 @@ AMD_COMPILER_FILES = \
 AMD_NIR_FILES = \
 	common/ac_nir_to_llvm.c \
 	common/ac_nir_to_llvm.h
+
+AMD_GENERATED_FILES = \
+	common/sid_tables.h
diff --git a/src/gallium/drivers/radeonsi/sid_tables.py b/src/amd/common/sid_tables.py
similarity index 100%
rename from src/gallium/drivers/radeonsi/sid_tables.py
rename to src/amd/common/sid_tables.py
diff --git a/src/gallium/drivers/radeonsi/Makefile.am b/src/gallium/drivers/radeonsi/Makefile.am
index 0ed955db22..00c8a328c9 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -31,13 +31,4 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libradeonsi.la
 
-libradeonsi_la_SOURCES = $(C_SOURCES) $(GENERATED_SOURCES)
-
-sid_tables.h: $(srcdir)/sid_tables.py $(top_srcdir)/src/amd/common/sid.h
-	$(AM_V_GEN) $(PYTHON2) $(srcdir)/sid_tables.py $(top_srcdir)/src/amd/common/sid.h > $@
-
-EXTRA_DIST = \
-	sid_tables.py
-
-BUILT_SOURCES =\
-	sid_tables.h
+libradeonsi_la_SOURCES = $(C_SOURCES)
diff --git a/src/gallium/drivers/radeonsi/Makefile.sources b/src/gallium/drivers/radeonsi/Makefile.sources
index 727a9cccfc..15ae977147 100644
--- a/src/gallium/drivers/radeonsi/Makefile.sources
+++ b/src/gallium/drivers/radeonsi/Makefile.sources
@@ -23,6 +23,3 @@ C_SOURCES := \
 	si_state_shaders.c \
 	si_state.h \
 	si_uvd.c
-
-GENERATED_SOURCES := \
-	sid_tables.h
-- 
2.11.0



More information about the mesa-dev mailing list