android: gallium/aux: update old generated sources rules

This is in preparation for additional generated sources rules for Android
which will require ad hoc rules, so it is necessary to replace old ones

NOTE: pre-existing gen rules based on $(transform-generated-source) macro
are both obsolete and use of '%' pattern rule is incompatible with ad hoc
python commands for different targets

Changelog:
- remove util/u_format_srgb.c target
- replace obsolete indices/{u_indices,unfilled}_gen.c 'common' gen rules
  with 'per target' gen rules using $(MESA_PYTHON3) as per meson gen rules

Fixes: 3471af9c6c ("gallium/aux: Add GPU tracepoint mechanism")
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7942>
This commit is contained in:
Mauro Rossi
2020-12-05 16:40:12 +01:00
committed by Marge Bot
parent 98df055736
commit 0553e717e4

View File

@@ -64,13 +64,19 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES
intermediates := $(call local-generated-sources-dir)
LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES))
$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
u_indices_gen_deps := \
$(MESA_TOP)/src/gallium/auxiliary/indices/u_indices_gen.py
$(intermediates)/indices/u_indices_gen.c \
$(intermediates)/indices/u_unfilled_gen.c \
$(intermediates)/util/u_format_srgb.c: $(intermediates)/%.c: $(LOCAL_PATH)/%.py
$(transform-generated-source)
$(intermediates)/indices/u_indices_gen.c: $(u_indices_gen_deps)
@mkdir -p $(dir $@)
$(hide) $(MESA_PYTHON3) $< > $@
u_unfilled_gen_deps := \
$(MESA_TOP)/src/gallium/auxiliary/indices/u_unfilled_gen.py
$(intermediates)/indices/u_unfilled_gen.c: $(u_unfilled_gen_deps)
@mkdir -p $(dir $@)
$(hide) $(MESA_PYTHON3) $< > $@
LOCAL_GENERATED_SOURCES += $(MESA_GEN_NIR_H)