[1/2] android: anv: fix generated files depedencies

Submitted by Mauro Rossi on March 3, 2019, 7:57 p.m.

Details

Message ID 20190303195742.11183-1-issor.oruam@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Mauro Rossi March 3, 2019, 7:57 p.m.
Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies
Rename the variable labels according to targets and python scripts
Align the building rules as per Automake for simplification

Fixes building errors during rebuils due to missing dependencies

Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build")
Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Cc: "19.0" <mesa-stable@lists.freedesktop.org>
---
 src/intel/Android.vulkan.mk | 38 +++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
index 04c9d5b3e4..2e99ac6294 100644
--- a/src/intel/Android.vulkan.mk
+++ b/src/intel/Android.vulkan.mk
@@ -23,9 +23,10 @@  LOCAL_PATH := $(call my-dir)
 include $(CLEAR_VARS)
 include $(LOCAL_PATH)/Makefile.sources
 
-VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
-
-VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
+ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
+ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
+ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py
+VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml
 
 VULKAN_COMMON_INCLUDES := \
 	$(MESA_TOP)/include \
@@ -64,10 +65,13 @@  $(intermediates)/vulkan/dummy.c:
 	@echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
 	$(hide) touch $@
 
-$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c
-	$(VK_ENTRYPOINTS_SCRIPT) \
+$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \
+					   $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
+					   $(ANV_EXTENSIONS_SCRIPT) \
+					   $(VULKAN_API_XML)
+	$(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
 		--outdir $(dir $@) \
-		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml
+		--xml $(VULKAN_API_XML)
 
 LOCAL_EXPORT_C_INCLUDE_DIRS := \
         $(intermediates)
@@ -241,22 +245,28 @@  LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c
 LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c
 LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h
 
-$(intermediates)/vulkan/anv_entrypoints.c:
+$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
+					   $(ANV_EXTENSIONS_SCRIPT) \
+					   $(VULKAN_API_XML)
 	@mkdir -p $(dir $@)
-	$(VK_ENTRYPOINTS_SCRIPT) \
+	$(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
 		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
 		--outdir $(dir $@)
 
-$(intermediates)/vulkan/anv_extensions.c:
+$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \
+					  $(ANV_EXTENSIONS_SCRIPT) \
+					  $(VULKAN_API_XML)
 	@mkdir -p $(dir $@)
-	$(VK_EXTENSIONS_SCRIPT) \
-		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
+	$(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
+		--xml $(VULKAN_API_XML) \
 		--out-c $@
 
-$(intermediates)/vulkan/anv_extensions.h:
+$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \
+					   $(ANV_EXTENSIONS_SCRIPT) \
+					   $(VULKAN_API_XML)
 	@mkdir -p $(dir $@)
-	$(VK_EXTENSIONS_SCRIPT) \
-		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
+	$(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
+		--xml $(VULKAN_API_XML) \
 		--out-h $@
 
 LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)

Comments

On 3/3/19 9:57 PM, Mauro Rossi wrote:
> Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies
> Rename the variable labels according to targets and python scripts
> Align the building rules as per Automake for simplification
> 
> Fixes building errors during rebuils due to missing dependencies

rebuils -> rebuilds

> Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build")
> Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables")
> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
> Cc: "19.0" <mesa-stable@lists.freedesktop.org>
> ---
>   src/intel/Android.vulkan.mk | 38 +++++++++++++++++++++++--------------
>   1 file changed, 24 insertions(+), 14 deletions(-)
> 
> diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
> index 04c9d5b3e4..2e99ac6294 100644
> --- a/src/intel/Android.vulkan.mk
> +++ b/src/intel/Android.vulkan.mk
> @@ -23,9 +23,10 @@ LOCAL_PATH := $(call my-dir)
>   include $(CLEAR_VARS)
>   include $(LOCAL_PATH)/Makefile.sources
>   
> -VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
> -
> -VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
> +ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
> +ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
> +ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py
> +VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml
>   
>   VULKAN_COMMON_INCLUDES := \
>   	$(MESA_TOP)/include \
> @@ -64,10 +65,13 @@ $(intermediates)/vulkan/dummy.c:
>   	@echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
>   	$(hide) touch $@
>   
> -$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c
> -	$(VK_ENTRYPOINTS_SCRIPT) \
> +$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \
> +					   $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> +					   $(ANV_EXTENSIONS_SCRIPT) \
> +					   $(VULKAN_API_XML)
> +	$(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>   		--outdir $(dir $@) \
> -		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml
> +		--xml $(VULKAN_API_XML)
>   
>   LOCAL_EXPORT_C_INCLUDE_DIRS := \
>           $(intermediates)
> @@ -241,22 +245,28 @@ LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c
>   LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c
>   LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h
>   
> -$(intermediates)/vulkan/anv_entrypoints.c:
> +$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> +					   $(ANV_EXTENSIONS_SCRIPT) \
> +					   $(VULKAN_API_XML)
>   	@mkdir -p $(dir $@)
> -	$(VK_ENTRYPOINTS_SCRIPT) \
> +	$(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>   		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \

This one should be $(VULKAN_API_XML) as well

>   		--outdir $(dir $@)
>   
> -$(intermediates)/vulkan/anv_extensions.c:
> +$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +					  $(ANV_EXTENSIONS_SCRIPT) \
> +					  $(VULKAN_API_XML)
>   	@mkdir -p $(dir $@)
> -	$(VK_EXTENSIONS_SCRIPT) \
> -		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
> +	$(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +		--xml $(VULKAN_API_XML) \
>   		--out-c $@
>   
> -$(intermediates)/vulkan/anv_extensions.h:
> +$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +					   $(ANV_EXTENSIONS_SCRIPT) \
> +					   $(VULKAN_API_XML)
>   	@mkdir -p $(dir $@)
> -	$(VK_EXTENSIONS_SCRIPT) \
> -		--xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
> +	$(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +		--xml $(VULKAN_API_XML) \
>   		--out-h $@
>   
>   LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
>
Mauro Rossi <issor.oruam@gmail.com> 於 2019年3月4日 週一 上午3:58寫道:
>
> Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies
> Rename the variable labels according to targets and python scripts
> Align the building rules as per Automake for simplification
>
> Fixes building errors during rebuils due to missing dependencies
>
> Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build")
> Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables")
> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
> Cc: "19.0" <mesa-stable@lists.freedesktop.org>
> ---
>  src/intel/Android.vulkan.mk | 38 +++++++++++++++++++++++--------------
>  1 file changed, 24 insertions(+), 14 deletions(-)
>
> diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
> index 04c9d5b3e4..2e99ac6294 100644
> --- a/src/intel/Android.vulkan.mk
> +++ b/src/intel/Android.vulkan.mk
> @@ -23,9 +23,10 @@ LOCAL_PATH := $(call my-dir)
>  include $(CLEAR_VARS)
>  include $(LOCAL_PATH)/Makefile.sources
>
> -VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
> -
> -VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
> +ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
> +ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
> +ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py
> +VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml
>
>  VULKAN_COMMON_INCLUDES := \
>         $(MESA_TOP)/include \
> @@ -64,10 +65,13 @@ $(intermediates)/vulkan/dummy.c:
>         @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
>         $(hide) touch $@
>
> -$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c
> -       $(VK_ENTRYPOINTS_SCRIPT) \
> +$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \

I know it was not introduced in this patch.
However, it makes no sense to let the header depend on a generated empty file.
This should be removed.

> +                                          $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> +                                          $(ANV_EXTENSIONS_SCRIPT) \
> +                                          $(VULKAN_API_XML)
> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>                 --outdir $(dir $@) \
> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml
> +               --xml $(VULKAN_API_XML)
>
>  LOCAL_EXPORT_C_INCLUDE_DIRS := \
>          $(intermediates)
> @@ -241,22 +245,28 @@ LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c
>  LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c
>  LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h
>
> -$(intermediates)/vulkan/anv_entrypoints.c:
> +$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> +                                          $(ANV_EXTENSIONS_SCRIPT) \
> +                                          $(VULKAN_API_XML)
>         @mkdir -p $(dir $@)
> -       $(VK_ENTRYPOINTS_SCRIPT) \
> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>                 --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
>                 --outdir $(dir $@)
>
> -$(intermediates)/vulkan/anv_extensions.c:
> +$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +                                         $(ANV_EXTENSIONS_SCRIPT) \
> +                                         $(VULKAN_API_XML)
>         @mkdir -p $(dir $@)
> -       $(VK_EXTENSIONS_SCRIPT) \
> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +               --xml $(VULKAN_API_XML) \
>                 --out-c $@
>
> -$(intermediates)/vulkan/anv_extensions.h:
> +$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +                                          $(ANV_EXTENSIONS_SCRIPT) \
> +                                          $(VULKAN_API_XML)
>         @mkdir -p $(dir $@)
> -       $(VK_EXTENSIONS_SCRIPT) \
> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
> +               --xml $(VULKAN_API_XML) \
>                 --out-h $@
>
>  LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> --
On 3/5/19 9:26 AM, Chih-Wei Huang wrote:
> Mauro Rossi <issor.oruam@gmail.com> 於 2019年3月4日 週一 上午3:58寫道:
>>
>> Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies
>> Rename the variable labels according to targets and python scripts
>> Align the building rules as per Automake for simplification
>>
>> Fixes building errors during rebuils due to missing dependencies
>>
>> Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build")
>> Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables")
>> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
>> Cc: "19.0" <mesa-stable@lists.freedesktop.org>
>> ---
>>   src/intel/Android.vulkan.mk | 38 +++++++++++++++++++++++--------------
>>   1 file changed, 24 insertions(+), 14 deletions(-)
>>
>> diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
>> index 04c9d5b3e4..2e99ac6294 100644
>> --- a/src/intel/Android.vulkan.mk
>> +++ b/src/intel/Android.vulkan.mk
>> @@ -23,9 +23,10 @@ LOCAL_PATH := $(call my-dir)
>>   include $(CLEAR_VARS)
>>   include $(LOCAL_PATH)/Makefile.sources
>>
>> -VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
>> -
>> -VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
>> +ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
>> +ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
>> +ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py
>> +VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml
>>
>>   VULKAN_COMMON_INCLUDES := \
>>          $(MESA_TOP)/include \
>> @@ -64,10 +65,13 @@ $(intermediates)/vulkan/dummy.c:
>>          @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
>>          $(hide) touch $@
>>
>> -$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c
>> -       $(VK_ENTRYPOINTS_SCRIPT) \
>> +$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \
> 
> I know it was not introduced in this patch.
> However, it makes no sense to let the header depend on a generated empty file.
> This should be removed.

dummy.c is there to meet the Android build system's rules .. comment in 
this file says:

# libmesa_anv_entrypoints with header and dummy.c
#
# This static library is built to pull entrypoints header
# for multiple gen specific build targets below. The c file
# is generated separately for libmesa_vulkan_common to avoid
# duplicate symbols when linking the anv libraries.

we have same hack applied also in following files within Mesa tree:

src/mesa/Android.libmesa_git_sha1.mk
src/intel/Android.genxml.mk
src/broadcom/Android.genxml.mk


>> +                                          $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>> +                                          $(ANV_EXTENSIONS_SCRIPT) \
>> +                                          $(VULKAN_API_XML)
>> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>>                  --outdir $(dir $@) \
>> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml
>> +               --xml $(VULKAN_API_XML)
>>
>>   LOCAL_EXPORT_C_INCLUDE_DIRS := \
>>           $(intermediates)
>> @@ -241,22 +245,28 @@ LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c
>>   LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c
>>   LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h
>>
>> -$(intermediates)/vulkan/anv_entrypoints.c:
>> +$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>> +                                          $(ANV_EXTENSIONS_SCRIPT) \
>> +                                          $(VULKAN_API_XML)
>>          @mkdir -p $(dir $@)
>> -       $(VK_ENTRYPOINTS_SCRIPT) \
>> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>>                  --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
>>                  --outdir $(dir $@)
>>
>> -$(intermediates)/vulkan/anv_extensions.c:
>> +$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \
>> +                                         $(ANV_EXTENSIONS_SCRIPT) \
>> +                                         $(VULKAN_API_XML)
>>          @mkdir -p $(dir $@)
>> -       $(VK_EXTENSIONS_SCRIPT) \
>> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
>> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
>> +               --xml $(VULKAN_API_XML) \
>>                  --out-c $@
>>
>> -$(intermediates)/vulkan/anv_extensions.h:
>> +$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \
>> +                                          $(ANV_EXTENSIONS_SCRIPT) \
>> +                                          $(VULKAN_API_XML)
>>          @mkdir -p $(dir $@)
>> -       $(VK_EXTENSIONS_SCRIPT) \
>> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
>> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
>> +               --xml $(VULKAN_API_XML) \
>>                  --out-h $@
>>
>>   LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
>> --
> 
>
Tapani Pälli <tapani.palli@intel.com> 於 2019年3月5日 週二 下午4:48寫道:
>
> On 3/5/19 9:26 AM, Chih-Wei Huang wrote:
> > Mauro Rossi <issor.oruam@gmail.com> 於 2019年3月4日 週一 上午3:58寫道:
> >>
> >> Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies
> >> Rename the variable labels according to targets and python scripts
> >> Align the building rules as per Automake for simplification
> >>
> >> Fixes building errors during rebuils due to missing dependencies
> >>
> >> Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build")
> >> Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables")
> >> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
> >> Cc: "19.0" <mesa-stable@lists.freedesktop.org>
> >> ---
> >>   src/intel/Android.vulkan.mk | 38 +++++++++++++++++++++++--------------
> >>   1 file changed, 24 insertions(+), 14 deletions(-)
> >>
> >> diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
> >> index 04c9d5b3e4..2e99ac6294 100644
> >> --- a/src/intel/Android.vulkan.mk
> >> +++ b/src/intel/Android.vulkan.mk
> >> @@ -23,9 +23,10 @@ LOCAL_PATH := $(call my-dir)
> >>   include $(CLEAR_VARS)
> >>   include $(LOCAL_PATH)/Makefile.sources
> >>
> >> -VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
> >> -
> >> -VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
> >> +ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
> >> +ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
> >> +ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py
> >> +VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml
> >>
> >>   VULKAN_COMMON_INCLUDES := \
> >>          $(MESA_TOP)/include \
> >> @@ -64,10 +65,13 @@ $(intermediates)/vulkan/dummy.c:
> >>          @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
> >>          $(hide) touch $@
> >>
> >> -$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c
> >> -       $(VK_ENTRYPOINTS_SCRIPT) \
> >> +$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \
> >
> > I know it was not introduced in this patch.
> > However, it makes no sense to let the header depend on a generated empty file.
> > This should be removed.
>
> dummy.c is there to meet the Android build system's rules .. comment in
> this file says:

I understand that.
I meant the header anv_entrypoints.h doesn't need to
depend on the generated dummy.c. That's clear.

> # libmesa_anv_entrypoints with header and dummy.c
> #
> # This static library is built to pull entrypoints header
> # for multiple gen specific build targets below. The c file
> # is generated separately for libmesa_vulkan_common to avoid
> # duplicate symbols when linking the anv libraries.
>
> we have same hack applied also in following files within Mesa tree:
>
> src/mesa/Android.libmesa_git_sha1.mk
> src/intel/Android.genxml.mk
> src/broadcom/Android.genxml.mk
>
>
> >> +                                          $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> >> +                                          $(ANV_EXTENSIONS_SCRIPT) \
> >> +                                          $(VULKAN_API_XML)
> >> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> >>                  --outdir $(dir $@) \
> >> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml
> >> +               --xml $(VULKAN_API_XML)
> >>
> >>   LOCAL_EXPORT_C_INCLUDE_DIRS := \
> >>           $(intermediates)
> >> @@ -241,22 +245,28 @@ LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c
> >>   LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c
> >>   LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h
> >>
> >> -$(intermediates)/vulkan/anv_entrypoints.c:
> >> +$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> >> +                                          $(ANV_EXTENSIONS_SCRIPT) \
> >> +                                          $(VULKAN_API_XML)
> >>          @mkdir -p $(dir $@)
> >> -       $(VK_ENTRYPOINTS_SCRIPT) \
> >> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
> >>                  --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
> >>                  --outdir $(dir $@)
> >>
> >> -$(intermediates)/vulkan/anv_extensions.c:
> >> +$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \
> >> +                                         $(ANV_EXTENSIONS_SCRIPT) \
> >> +                                         $(VULKAN_API_XML)
> >>          @mkdir -p $(dir $@)
> >> -       $(VK_EXTENSIONS_SCRIPT) \
> >> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
> >> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
> >> +               --xml $(VULKAN_API_XML) \
> >>                  --out-c $@
> >>
> >> -$(intermediates)/vulkan/anv_extensions.h:
> >> +$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \
> >> +                                          $(ANV_EXTENSIONS_SCRIPT) \
> >> +                                          $(VULKAN_API_XML)
> >>          @mkdir -p $(dir $@)
> >> -       $(VK_EXTENSIONS_SCRIPT) \
> >> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
> >> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
> >> +               --xml $(VULKAN_API_XML) \
> >>                  --out-h $@
> >>
> >>   LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
On 3/5/19 11:09 AM, Chih-Wei Huang wrote:
> Tapani Pälli <tapani.palli@intel.com> 於 2019年3月5日 週二 下午4:48寫道:
>>
>> On 3/5/19 9:26 AM, Chih-Wei Huang wrote:
>>> Mauro Rossi <issor.oruam@gmail.com> 於 2019年3月4日 週一 上午3:58寫道:
>>>>
>>>> Fix anv_extrypoints.{c,h} and anv_extensions.{c,h} missing dependencies
>>>> Rename the variable labels according to targets and python scripts
>>>> Align the building rules as per Automake for simplification
>>>>
>>>> Fixes building errors during rebuils due to missing dependencies
>>>>
>>>> Fixes: 9a508b7 ("android: anv/extensions: fix generated sources build")
>>>> Fixes: dd088d4bec7 ("anv/extensions: Generate a header file with extension tables")
>>>> Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
>>>> Cc: "19.0" <mesa-stable@lists.freedesktop.org>
>>>> ---
>>>>    src/intel/Android.vulkan.mk | 38 +++++++++++++++++++++++--------------
>>>>    1 file changed, 24 insertions(+), 14 deletions(-)
>>>>
>>>> diff --git a/src/intel/Android.vulkan.mk b/src/intel/Android.vulkan.mk
>>>> index 04c9d5b3e4..2e99ac6294 100644
>>>> --- a/src/intel/Android.vulkan.mk
>>>> +++ b/src/intel/Android.vulkan.mk
>>>> @@ -23,9 +23,10 @@ LOCAL_PATH := $(call my-dir)
>>>>    include $(CLEAR_VARS)
>>>>    include $(LOCAL_PATH)/Makefile.sources
>>>>
>>>> -VK_ENTRYPOINTS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
>>>> -
>>>> -VK_EXTENSIONS_SCRIPT := $(MESA_PYTHON2) $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
>>>> +ANV_ENTRYPOINTS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_entrypoints_gen.py
>>>> +ANV_EXTENSIONS_GEN_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions_gen.py
>>>> +ANV_EXTENSIONS_SCRIPT := $(LOCAL_PATH)/vulkan/anv_extensions.py
>>>> +VULKAN_API_XML := $(MESA_TOP)/src/vulkan/registry/vk.xml
>>>>
>>>>    VULKAN_COMMON_INCLUDES := \
>>>>           $(MESA_TOP)/include \
>>>> @@ -64,10 +65,13 @@ $(intermediates)/vulkan/dummy.c:
>>>>           @echo "Gen Dummy: $(PRIVATE_MODULE) <= $(notdir $(@))"
>>>>           $(hide) touch $@
>>>>
>>>> -$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c
>>>> -       $(VK_ENTRYPOINTS_SCRIPT) \
>>>> +$(intermediates)/vulkan/anv_entrypoints.h: $(intermediates)/vulkan/dummy.c \
>>>
>>> I know it was not introduced in this patch.
>>> However, it makes no sense to let the header depend on a generated empty file.
>>> This should be removed.
>>
>> dummy.c is there to meet the Android build system's rules .. comment in
>> this file says:
> 
> I understand that.
> I meant the header anv_entrypoints.h doesn't need to
> depend on the generated dummy.c. That's clear.

Yeah is see, it is enough to have it in LOCAL_GENERATED_SOURCES and 
there is no need to depend on it to get it generated.

>> # libmesa_anv_entrypoints with header and dummy.c
>> #
>> # This static library is built to pull entrypoints header
>> # for multiple gen specific build targets below. The c file
>> # is generated separately for libmesa_vulkan_common to avoid
>> # duplicate symbols when linking the anv libraries.
>>
>> we have same hack applied also in following files within Mesa tree:
>>
>> src/mesa/Android.libmesa_git_sha1.mk
>> src/intel/Android.genxml.mk
>> src/broadcom/Android.genxml.mk
>>
>>
>>>> +                                          $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>>>> +                                          $(ANV_EXTENSIONS_SCRIPT) \
>>>> +                                          $(VULKAN_API_XML)
>>>> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>>>>                   --outdir $(dir $@) \
>>>> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml
>>>> +               --xml $(VULKAN_API_XML)
>>>>
>>>>    LOCAL_EXPORT_C_INCLUDE_DIRS := \
>>>>            $(intermediates)
>>>> @@ -241,22 +245,28 @@ LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_entrypoints.c
>>>>    LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.c
>>>>    LOCAL_GENERATED_SOURCES += $(intermediates)/vulkan/anv_extensions.h
>>>>
>>>> -$(intermediates)/vulkan/anv_entrypoints.c:
>>>> +$(intermediates)/vulkan/anv_entrypoints.c: $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>>>> +                                          $(ANV_EXTENSIONS_SCRIPT) \
>>>> +                                          $(VULKAN_API_XML)
>>>>           @mkdir -p $(dir $@)
>>>> -       $(VK_ENTRYPOINTS_SCRIPT) \
>>>> +       $(MESA_PYTHON2) $(ANV_ENTRYPOINTS_GEN_SCRIPT) \
>>>>                   --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
>>>>                   --outdir $(dir $@)
>>>>
>>>> -$(intermediates)/vulkan/anv_extensions.c:
>>>> +$(intermediates)/vulkan/anv_extensions.c: $(ANV_EXTENSIONS_GEN_SCRIPT) \
>>>> +                                         $(ANV_EXTENSIONS_SCRIPT) \
>>>> +                                         $(VULKAN_API_XML)
>>>>           @mkdir -p $(dir $@)
>>>> -       $(VK_EXTENSIONS_SCRIPT) \
>>>> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
>>>> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
>>>> +               --xml $(VULKAN_API_XML) \
>>>>                   --out-c $@
>>>>
>>>> -$(intermediates)/vulkan/anv_extensions.h:
>>>> +$(intermediates)/vulkan/anv_extensions.h: $(ANV_EXTENSIONS_GEN_SCRIPT) \
>>>> +                                          $(ANV_EXTENSIONS_SCRIPT) \
>>>> +                                          $(VULKAN_API_XML)
>>>>           @mkdir -p $(dir $@)
>>>> -       $(VK_EXTENSIONS_SCRIPT) \
>>>> -               --xml $(MESA_TOP)/src/vulkan/registry/vk.xml \
>>>> +       $(MESA_PYTHON2) $(ANV_EXTENSIONS_GEN_SCRIPT) \
>>>> +               --xml $(VULKAN_API_XML) \
>>>>                   --out-h $@
>>>>
>>>>    LOCAL_SHARED_LIBRARIES := $(ANV_SHARED_LIBRARIES)
> 
>