<div dir="ltr"><div dir="ltr">Hi Chih-Wei,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 24, 2019 at 7:26 AM Chih-Wei Huang <<a href="mailto:cwhuang@android-x86.org">cwhuang@android-x86.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Mauro Rossi <<a href="mailto:issor.oruam@gmail.com" target="_blank">issor.oruam@gmail.com</a>> 於 2019年6月22日 週六 上午2:06寫道:<br>
><br>
> Changelog in Android makefile:<br>
> - Add LOCAL_MODULE_CLASS, intermediates and LOCAL_GENERATED_SOURCES<br>
> - Use LOCAL_EXPORT_C_INCLUDE_DIRS to export $(intermediates) path<br>
> - Move generated header rules before 'include $(BUILD_STATIC_LIBRARY)'<br>
><br>
> Fixes the following building error:<br>
><br>
> In file included from external/mesa/src/gallium/targets/dri/target.c:1:<br>
> external/mesa/src/gallium/auxiliary/target-helpers/drm_helper.h:257:16:<br>
> fatal error: 'virgl/virgl_driinfo.h' file not found<br>
> #include "virgl/virgl_driinfo.h"<br>
> ^~~~~~~~~~~~~~~~~~~~~~~<br>
> 1 error generated.<br>
><br>
> Fixes: cf800998a ("virgl: Add driinfo file and tie it into the build")<br>
> Signed-off-by: Mauro Rossi <<a href="mailto:issor.oruam@gmail.com" target="_blank">issor.oruam@gmail.com</a>><br>
> ---<br>
> src/gallium/drivers/virgl/Android.mk | 10 ++++++++--<br>
> 1 file changed, 8 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/gallium/drivers/virgl/Android.mk b/src/gallium/drivers/virgl/Android.mk<br>
> index f77bcf196e..585ed7b2ce 100644<br>
> --- a/src/gallium/drivers/virgl/Android.mk<br>
> +++ b/src/gallium/drivers/virgl/Android.mk<br>
> @@ -30,8 +30,9 @@ LOCAL_SRC_FILES := \<br>
><br>
> LOCAL_MODULE := libmesa_pipe_virgl<br>
><br>
> -include $(GALLIUM_COMMON_MK)<br>
> -include $(BUILD_STATIC_LIBRARY)<br>
> +LOCAL_MODULE_CLASS := STATIC_LIBRARIES<br>
> +intermediates := $(call local-generated-sources-dir)<br>
> +LOCAL_GENERATED_SOURCES += $(intermediates)/virgl/virgl_driinfo.h<br>
><br>
> GEN_DRIINFO_INPUTS := \<br>
> $(MESA_TOP)/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h \<br>
> @@ -44,6 +45,11 @@ $(intermediates)/virgl/virgl_driinfo.h: $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS)<br>
> @echo "Gen Header: $(PRIVATE_MODULE) <= $(notdir $(@))"<br>
> $(hide) $(MESA_PYTHON2) $(MERGE_DRIINFO) $(GEN_DRIINFO_INPUTS) > $@ || ($(RM) $@; false)<br>
><br>
> +LOCAL_EXPORT_C_INCLUDE_DIRS += $(intermediates)<br>
> +<br>
> +include $(GALLIUM_COMMON_MK)<br>
> +include $(BUILD_STATIC_LIBRARY)<br>
> +<br>
> ifneq ($(HAVE_GALLIUM_VIRGL),)<br>
> GALLIUM_TARGET_DRIVERS += virtio_gpu<br>
> $(eval GALLIUM_LIBS += $(LOCAL_MODULE) libmesa_winsys_virgl_common libmesa_winsys_virgl libmesa_winsys_virgl_vtest)<br>
> --<br>
<br>
I suggest to use := instead of += in<br>
LOCAL_GENERATED_SOURCES and LOCAL_EXPORT_C_INCLUDE_DIRS<br>
since they don't catenate others.<br></blockquote><div><br></div><div>Thanks a lot, I did not know that, I will correct in the final version.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Except that, the patch looks good to me.<br>
<br>
Review-by: Chih-Wei Huang <<a href="mailto:cwhuang@linux.org.tw" target="_blank">cwhuang@linux.org.tw</a>><br></blockquote><div><br></div><div>Thanks for the review</div><div>Mauro </div></div></div>