From b838f6423711a8f69073ed2c27773b50ffe14d2c Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sat, 24 Dec 2016 11:53:41 +0100 Subject: [PATCH] ac/debug: Move sid_tables.h generation to common code. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Marek Olšák Reviewed-by: Dave Airlie --- src/amd/Makefile.am | 2 +- src/amd/Makefile.common.am | 8 +++++++- src/amd/Makefile.sources | 3 +++ .../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 1402ca54a7d..0a8456d1e4d 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 1a36e48101c..1425decb90e 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 122ef71c452..bde02d16a88 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 0ed955db22c..00c8a328c92 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 727a9cccfc2..15ae9771477 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.30.2