[Mesa-dev] [PATCH 1/8] Android: remove dependence on .SECONDEXPANSION

Emil Velikov emil.l.velikov at gmail.com
Thu Feb 25 01:31:55 UTC 2016


Hi Rob,

On 24 February 2016 at 18:56, Rob Herring <robh at kernel.org> wrote:
> With the Android build system changes to ninja/kati, the use of
> .SECONDEXPANSION is no longer supported. Fix this by avoiding rule specific
> variables and using $(transform-generated-source).
>
> Cc: Emil Velikov <emil.velikov at collabora.com>
> Signed-off-by: Rob Herring <robh at kernel.org>
> ---
>  src/mesa/drivers/dri/common/Android.mk | 22 +++++++++++++---------
>  1 file changed, 13 insertions(+), 9 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/common/Android.mk b/src/mesa/drivers/dri/common/Android.mk
> index f1a7330..8a21e63 100644
> --- a/src/mesa/drivers/dri/common/Android.mk
> +++ b/src/mesa/drivers/dri/common/Android.mk
> @@ -74,20 +74,24 @@ $(intermediates)/xmlpool/%.po: $(LOCAL_PATH)/xmlpool/%.po $(POT)
>                 sed -i -e 's/charset=.*\\n/charset=UTF-8\\n/' $@; \
>         fi
>
> -$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo: $(intermediates)/xmlpool/%.po
> +PRIVATE_SCRIPT := $(LOCAL_PATH)/xmlpool/gen_xmlpool.py
> +PRIVATE_LOCALEDIR := $(intermediates)/xmlpool
> +PRIVATE_TEMPLATE_HEADER := $(LOCAL_PATH)/xmlpool/t_options.h
> +PRIVATE_MO_FILES := $(MESA_DRI_OPTIONS_LANGS:%=$(intermediates)/xmlpool/%/LC_MESSAGES/options.mo)
> +
> +LOCAL_GENERATED_SOURCES += $(PRIVATE_MO_FILES)
> +
> +$(PRIVATE_MO_FILES): $(intermediates)/xmlpool/%/LC_MESSAGES/options.mo: $(intermediates)/xmlpool/%.po
>         mkdir -p $(dir $@)
>         msgfmt -o $@ $<
>
I sort of mentioned it before, but never got around to testing it:
Do you foresee any issues if we move the generation rules into a
common place, and reuse them in both builds ?
Sort of like how IGT does it, apart from that they keep the generated
sources in-tree. I.e. should use IGT_LIB_PATH := $(intermediates)

https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/lib/Android.mk
https://cgit.freedesktop.org/xorg/app/intel-gpu-tools/tree/lib/Makefile.sources

Note: I'm not saying that you have to do any of it :-)

Thanks
Emil


More information about the mesa-dev mailing list