summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-03-20 14:59:57 +0000
committerLionel Landwerlin <[email protected]>2018-03-20 16:58:29 +0000
commit2d2b15fbcab08d7844c15351919cd469cd9e11c4 (patch)
tree60c61fe9ffa714da3f45707f526e7283cca692c1
parent9f3509665d880457487dff82a96132d2eb27a0b4 (diff)
i965: fix autotools/android build
Autotools/android builds generate the header & code files in 2 steps, but the code generation requires the name of the header file to include it. This change generates both files in one command. Fixes: 035cc7a12dc ("i965: perf: reduce i965 binary size") Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/Android.mk9
-rw-r--r--src/mesa/drivers/dri/i965/Makefile.am10
2 files changed, 6 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index a3d010a5894..8c4a613bcf3 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -312,15 +312,12 @@ LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
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) $< --header=$@ $(i965_oa_xml_FILES)
-
$(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) $< --code=$@ $(i965_oa_xml_FILES)
+ $(hide) $(MESA_PYTHON2) $< --code=$@ $(i965_oa_xml_FILES) --header=$@ $(i965_oa_xml_FILES)
+
+$(intermediates)/brw_oa_metrics.h: $(intermediates)/brw_oa_metrics.c
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 8c8ecc6d76b..fe106b4257c 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -114,11 +114,7 @@ EXTRA_DIST = \
$(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 $(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)
+ $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py --code=$(builddir)/brw_oa_metrics.c --header=$(builddir)/brw_oa_metrics.h $(i965_oa_xml_FILES)
+
+brw_oa_metrics.h: brw_oa_metrics.c