[Mesa-dev] [PATCH 4/6] android: refine the rules to generate xmlpool/options.h
Chih-Wei Huang
cwhuang at android-x86.org
Fri Apr 3 14:01:24 PDT 2015
The patch gets rid of the last use of intermediates-dir-for.
Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
---
src/mesa/drivers/dri/Android.mk | 3 ---
src/mesa/drivers/dri/common/Android.mk | 18 ++++++++----------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/mesa/drivers/dri/Android.mk b/src/mesa/drivers/dri/Android.mk
index d399666..b18c8a2 100644
--- a/src/mesa/drivers/dri/Android.mk
+++ b/src/mesa/drivers/dri/Android.mk
@@ -54,9 +54,6 @@ MESA_DRI_SHARED_LIBRARIES := \
libglapi \
liblog
-# All DRI modules must add this to LOCAL_GENERATED_SOURCES.
-MESA_DRI_OPTIONS_H := $(call intermediates-dir-for,STATIC_LIBRARIES,libmesa_dri_common)/xmlpool/options.h
-
#-----------------------------------------------
# Build drivers and libmesa_dri_common
diff --git a/src/mesa/drivers/dri/common/Android.mk b/src/mesa/drivers/dri/common/Android.mk
index 511d4af..6ccfe27 100644
--- a/src/mesa/drivers/dri/common/Android.mk
+++ b/src/mesa/drivers/dri/common/Android.mk
@@ -50,8 +50,8 @@ endif
LOCAL_SRC_FILES := $(DRI_COMMON_FILES)
-LOCAL_GENERATED_SOURCES := \
- $(intermediates)/xmlpool/options.h
+MESA_DRI_OPTIONS_H := $(intermediates)/xmlpool/options.h
+LOCAL_GENERATED_SOURCES := $(MESA_DRI_OPTIONS_H)
#
# Generate options.h from gettext translations.
@@ -81,16 +81,14 @@ $(intermediates)/xmlpool/%/LC_MESSAGES/options.mo: $(intermediates)/xmlpool/%.po
mkdir -p $(dir $@)
msgfmt -o $@ $<
-$(intermediates)/xmlpool/options.h: PRIVATE_SCRIPT := $(LOCAL_PATH)/xmlpool/gen_xmlpool.py
-$(intermediates)/xmlpool/options.h: PRIVATE_LOCALEDIR := $(intermediates)/xmlpool
-$(intermediates)/xmlpool/options.h: PRIVATE_TEMPLATE_HEADER := $(LOCAL_PATH)/xmlpool/t_options.h
-$(intermediates)/xmlpool/options.h: PRIVATE_MO_FILES := $(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo)
+$(MESA_DRI_OPTIONS_H): PRIVATE_SCRIPT := $(LOCAL_PATH)/xmlpool/gen_xmlpool.py
+$(MESA_DRI_OPTIONS_H): PRIVATE_TEMPLATE_HEADER := $(LOCAL_PATH)/xmlpool/t_options.h
+$(MESA_DRI_OPTIONS_H): PRIVATE_MO_FILES := $(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo)
.SECONDEXPANSION:
-$(intermediates)/xmlpool/options.h: $$(PRIVATE_SCRIPT) $$(PRIVATE_TEMPLATE_HEADER) $$(PRIVATE_MO_FILES)
- mkdir -p $(dir $@)
- mkdir -p $(PRIVATE_LOCALEDIR)
+$(MESA_DRI_OPTIONS_H): $$(PRIVATE_SCRIPT) $$(PRIVATE_TEMPLATE_HEADER) $$(PRIVATE_MO_FILES)
+ @mkdir -p $(@D)
$(MESA_PYTHON2) $(PRIVATE_SCRIPT) $(PRIVATE_TEMPLATE_HEADER) \
- $(PRIVATE_LOCALEDIR) $(MESA_DRI_OPTIONS_LANGS) > $@
+ $(@D) $(MESA_DRI_OPTIONS_LANGS) > $@
include $(MESA_COMMON_MK)
include $(BUILD_STATIC_LIBRARY)
--
1.9.1
More information about the mesa-dev
mailing list