[Mesa-dev] [PATCH 2/2] android: fix spirv_info generation

Chih-Wei Huang cwhuang at android-x86.org
Thu Jul 20 10:34:02 UTC 2017


2017-07-20 18:02 GMT+08:00 Chih-Wei Huang <cwhuang at android-x86.org>:
>
> OK. I see the real problem.
> The rules to build spirv_info.c are incorrectly
> to use $(LOCAL_PATH).
> Basically speaking, $(LOCAL_PATH) can't be used
> in the recipes[1] since it is always changing.
> When the recipe rules are executed its value
> is not you expected.
> (using it in targets and prerequisites is OK)
>
> The typical way to handle it is to use private variable:
>
> $(intermediates)/spirv/spirv_info.c: PRIVATE_LOCAL_PATH := $(LOCAL_PATH)
>
> Then use PRIVATE_LOCAL_PATH in the recpies.
>
> But in this case, seems it can just be simplified to $^
> (which means all the prerequisites)
>
> $(intermediates)/spirv/spirv_info.c:
> $(COMPILER_PATH)/spirv/spirv_info_c.py
> $(COMPILER_PATH)/spirv/spirv.core.grammar.json

Sorry. I meant $(LOCAL_PATH) instead of $(COMPILER_PATH).
(copied wrong lines)

I've submitted a real patch for it.

>          @mkdir -p $(dir $@)
>          $(hide) $(MESA_PYTHON2) $^ $@ || ($(RM) $@; false)



-- 
Chih-Wei
Android-x86 project
http://www.android-x86.org


More information about the mesa-dev mailing list