diff options
author | Chih-Wei Huang <[email protected]> | 2015-01-22 01:21:00 +0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-04-22 14:24:22 +0100 |
commit | 6c2c5f74a2e8d94d22454bd19cf961a66bfc9103 (patch) | |
tree | 56073e75eec939ef07d5096b5545603a4e080ad6 /src | |
parent | 63a76c15d8c259edc1a6bf8b696f109c86eace2e (diff) |
util: android: optimize the rules to generate format_srgb.c
Signed-off-by: Chih-Wei Huang <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/util/Android.mk | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/util/Android.mk b/src/util/Android.mk index 6b38cf9afb2..2eb0ef7a706 100644 --- a/src/util/Android.mk +++ b/src/util/Android.mk @@ -42,21 +42,15 @@ LOCAL_MODULE := libmesa_util # Generated sources -ifeq ($(LOCAL_MODULE_CLASS),) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -endif intermediates := $(call local-intermediates-dir) +LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/,$(MESA_UTIL_GENERATED_FILES)) -# This is the list of auto-generated files: sources and headers -sources := $(addprefix $(intermediates)/, $(MESA_UTIL_GENERATED_FILES)) - -LOCAL_GENERATED_SOURCES += $(sources) - -FORMAT_SRGB := $(LOCAL_PATH)/format_srgb.py - -$(intermediates)/format_srgb.c: $(FORMAT_SRGB) - @$(MESA_PYTHON2) $(FORMAT_SRGB) $< > $@ +$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2) +$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@ +$(LOCAL_GENERATED_SOURCES): $(intermediates)/%.c: $(LOCAL_PATH)/%.py + $(transform-generated-source) include $(MESA_COMMON_MK) include $(BUILD_STATIC_LIBRARY) @@ -82,21 +76,15 @@ LOCAL_MODULE := libmesa_util # Generated sources -ifeq ($(LOCAL_MODULE_CLASS),) LOCAL_MODULE_CLASS := STATIC_LIBRARIES -endif intermediates := $(call local-intermediates-dir) +LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/,$(MESA_UTIL_GENERATED_FILES)) -# This is the list of auto-generated files: sources and headers -sources := $(addprefix $(intermediates)/, $(MESA_UTIL_GENERATED_FILES)) - -LOCAL_GENERATED_SOURCES += $(sources) - -FORMAT_SRGB := $(LOCAL_PATH)/format_srgb.py - -$(intermediates)/format_srgb.c: $(FORMAT_SRGB) - @$(MESA_PYTHON2) $(FORMAT_SRGB) $< > $@ +$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2) +$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@ +$(LOCAL_GENERATED_SOURCES): $(intermediates)/%.c: $(LOCAL_PATH)/%.py + $(transform-generated-source) include $(MESA_COMMON_MK) include $(BUILD_HOST_STATIC_LIBRARY) |