Mesa (master): android: util/format: fix generated sources rules
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 14 22:41:12 UTC 2020
Module: Mesa
Branch: master
Commit: aa8661141a0f466994145e99be4d4bd4f9684a9d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa8661141a0f466994145e99be4d4bd4f9684a9d
Author: Mauro Rossi <issor.oruam at gmail.com>
Date: Fri Aug 14 14:04:54 2020 +0200
android: util/format: fix generated sources rules
Changes are necessary after commit 84ed2d098
("util/format: expose generated format packing functions through a header")
because script for format/u_format_pack.h has different commandline
compared to existing pattern
Generated sources rules are ported from meson
Fixes: 84ed2d098 ("util/format: expose generated format packing functions through a header")
Signed-off-by: Mauro Rossi <issor.oruam at gmail.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6319>
---
src/util/Android.mk | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/util/Android.mk b/src/util/Android.mk
index 1ed3816d189..ec37c69a502 100644
--- a/src/util/Android.mk
+++ b/src/util/Android.mk
@@ -66,10 +66,24 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(intermediates)
UTIL_GENERATED_SOURCES := $(addprefix $(intermediates)/,$(MESA_UTIL_GENERATED_FILES))
LOCAL_GENERATED_SOURCES := $(UTIL_GENERATED_SOURCES)
-$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
-$(UTIL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
-$(UTIL_GENERATED_SOURCES): $(intermediates)/%.c: $(LOCAL_PATH)/%.py $(LOCAL_PATH)/format/u_format.csv
- $(transform-generated-source)
+format_srgb_gen := $(LOCAL_PATH)/format_srgb.py
+
+$(intermediates)/format_srgb.c: $(format_srgb_gen)
+ @mkdir -p $(dir $@)
+ $(hide) $(MESA_PYTHON2) $(format_srgb_gen) $< > $@
+
+u_format_gen := $(LOCAL_PATH)/format/u_format_table.py
+u_format_deps := $(LOCAL_PATH)/format/u_format.csv \
+ $(LOCAL_PATH)/format/u_format_pack.py \
+ $(LOCAL_PATH)/format/u_format_parse.py
+
+$(intermediates)/format/u_format_pack.h: $(u_format_deps)
+ @mkdir -p $(dir $@)
+ $(hide) $(MESA_PYTHON2) $(u_format_gen) --header $< > $@
+
+$(intermediates)/format/u_format_table.c: $(u_format_deps)
+ @mkdir -p $(dir $@)
+ $(hide) $(MESA_PYTHON2) $(u_format_gen) $< > $@
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
More information about the mesa-commit
mailing list