Thanks Emil,

I'll include this in the next version :)

On 13/03/18 15:17, Emil Velikov wrote:
From: Emil Velikov <emil.veli...@collabora.com>

Cc: Lionel Landwerlin <lionel.g.landwer...@intel.com>
---
  src/mesa/drivers/dri/i965/Android.mk       | 11 +++++---
  src/mesa/drivers/dri/i965/Makefile.am      | 24 ++++--------------
  src/mesa/drivers/dri/i965/Makefile.sources | 40 ++++++++++++------------------
  3 files changed, 28 insertions(+), 47 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/Android.mk 
b/src/mesa/drivers/dri/i965/Android.mk
index 964313e6c5e..a3d010a5894 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -309,15 +309,18 @@ intermediates := $(call local-generated-sources-dir)
  LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
        $(i965_oa_GENERATED_FILES))
-$(intermediates)/brw_oa_%.h: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
+i965_oa_xml_FILES := $(addprefix $(LOCAL_PATH)/, \
+       $(i965_oa_xml_FILES))
+
+$(intermediates)/brw_oa_metrics.h: $(LOCAL_PATH)/brw_oa.py $(i965_oa_xml_FILES)
        @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
        @mkdir -p $(dir $@)
-       $(hide) $(MESA_PYTHON2) $(word 2, $^) --header=$@ --chipset=$(basename $*) 
$<
+       $(hide) $(MESA_PYTHON2) $< --header=$@ $(i965_oa_xml_FILES)
-$(intermediates)/brw_oa_%.c: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
+$(intermediates)/brw_oa_metrics.c: $(LOCAL_PATH)/brw_oa.py $(i965_oa_xml_FILES)
        @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
        @mkdir -p $(dir $@)
-       $(hide) $(MESA_PYTHON2) $(word 2, $^) --code=$@ --chipset=$(basename $*) 
$<
+       $(hide) $(MESA_PYTHON2) $< --code=$@ $(i965_oa_xml_FILES)
include $(MESA_COMMON_MK)
  include $(BUILD_SHARED_LIBRARY)
diff --git a/src/mesa/drivers/dri/i965/Makefile.am 
b/src/mesa/drivers/dri/i965/Makefile.am
index 322f0cbfedb..8c8ecc6d76b 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -109,30 +109,16 @@ libi965_dri_la_LIBADD = \
  BUILT_SOURCES = $(i965_oa_GENERATED_FILES)
  CLEANFILES = $(BUILT_SOURCES)
-brw_metric_xml_files = \
-       brw_oa_hsw.xml \
-       brw_oa_bdw.xml \
-       brw_oa_chv.xml \
-       brw_oa_sklgt2.xml \
-       brw_oa_sklgt3.xml \
-       brw_oa_sklgt4.xml \
-       brw_oa_bxt.xml \
-       brw_oa_kblgt2.xml \
-       brw_oa_kblgt3.xml \
-       brw_oa_glk.xml \
-       brw_oa_cflgt2.xml \
-       brw_oa_cflgt3.xml
-
  EXTRA_DIST = \
        brw_oa.py \
-       $(brw_metric_xml_files) \
+       $(i965_oa_xml_FILES) \
        meson.build
# Note: we avoid using a multi target rule here and outputting both the
  # .c and .h files in one go so we don't hit problems with parallel
  # make and multiple invocations of the same script trying to write
  # to the same files.
-brw_oa_metrics.h: brw_oa.py $(brw_metric_xml_files) Makefile.am
-       $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py 
--header=$(builddir)/brw_oa_metrics.h $(brw_metric_xml_files)
-brw_oa_metrics.c: brw_oa.py $(brw_metric_xml_files) Makefile.am
-       $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py 
--code=$(builddir)/brw_oa_metrics.c $(brw_metric_xml_files)
+brw_oa_metrics.h: brw_oa.py $(i965_oa_xml_FILES)
+       $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py 
--header=$(builddir)/brw_oa_metrics.h $(i965_oa_xml_FILES)
+brw_oa_metrics.c: brw_oa.py $(i965_oa_xml_FILES)
+       $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py 
--code=$(builddir)/brw_oa_metrics.c $(i965_oa_xml_FILES)
diff --git a/src/mesa/drivers/dri/i965/Makefile.sources 
b/src/mesa/drivers/dri/i965/Makefile.sources
index 2f349aa07ab..ad45cd84692 100644
--- a/src/mesa/drivers/dri/i965/Makefile.sources
+++ b/src/mesa/drivers/dri/i965/Makefile.sources
@@ -156,27 +156,19 @@ i965_gen11_FILES = \
        genX_state_upload.c
i965_oa_GENERATED_FILES = \
-       brw_oa_hsw.h \
-       brw_oa_hsw.c \
-       brw_oa_bdw.h \
-       brw_oa_bdw.c \
-       brw_oa_chv.h \
-       brw_oa_chv.c \
-       brw_oa_sklgt2.h \
-       brw_oa_sklgt2.c \
-       brw_oa_sklgt3.h \
-       brw_oa_sklgt3.c \
-       brw_oa_sklgt4.h \
-       brw_oa_sklgt4.c \
-       brw_oa_bxt.h \
-       brw_oa_bxt.c \
-       brw_oa_kblgt2.h \
-       brw_oa_kblgt2.c \
-       brw_oa_kblgt3.h \
-       brw_oa_kblgt3.c \
-       brw_oa_glk.h \
-       brw_oa_glk.c \
-       brw_oa_cflgt2.h \
-       brw_oa_cflgt2.c \
-       brw_oa_cflgt3.h \
-       brw_oa_cflgt3.c
+       brw_oa_metrics.c \
+       brw_oa_metrics.h
+
+i965_oa_xml_FILES = \
+       brw_oa_hsw.xml \
+       brw_oa_bdw.xml \
+       brw_oa_chv.xml \
+       brw_oa_sklgt2.xml \
+       brw_oa_sklgt3.xml \
+       brw_oa_sklgt4.xml \
+       brw_oa_bxt.xml \
+       brw_oa_kblgt2.xml \
+       brw_oa_kblgt3.xml \
+       brw_oa_glk.xml \
+       brw_oa_cflgt2.xml \
+       brw_oa_cflgt3.xml


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to