diff mbox series

package/pkg-waf: add missing $

Message ID 20230211094202.3816592-1-romain.naour@gmail.com
State Accepted
Headers show
Series package/pkg-waf: add missing $ | expand

Commit Message

Romain Naour Feb. 11, 2023, 9:42 a.m. UTC
We want to have $(@D) expanded at the time the recipe is run, so like
all other variables, we need to $$-expand it.

Fixes:
http://autobuild.buildroot.org/results/b6f/b6fd3a866af182edc7831492aecc8323f377b826

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
---
 package/pkg-waf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yann E. MORIN Feb. 11, 2023, 9:51 a.m. UTC | #1
Romain. All,

On 2023-02-11 10:42 +0100, Romain Naour spake thusly:
> We want to have $(@D) expanded at the time the recipe is run, so like
> all other variables, we need to $$-expand it.
> 
> Fixes:
> http://autobuild.buildroot.org/results/b6f/b6fd3a866af182edc7831492aecc8323f377b826

Thanks for the quick fix, but se below...

> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> ---
>  package/pkg-waf.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
> index 0e752072c8..c3e965bdf3 100644
> --- a/package/pkg-waf.mk
> +++ b/package/pkg-waf.mk
> @@ -42,7 +42,7 @@ define inner-waf-package
>  # otherwise waf errors out with:
>  # Waf script 'X' and library 'Y' do not match
>  define WAF_PACKAGE_REMOVE_WAF_LIB
> -	$(RM) -fr $(@D)/waf $(@D)/waflib
> +	$(RM) -fr $$(@D)/waf $$(@D)/waflib

Shouldn't we be using $$($$(PKG)_SRCDIR) or $$($(2)_SRCDIR) instead of
$$(@D), like is used everywhere else in the file:

    cd $$($$(PKG)_SRCDIR) && python3 configure [...]

    cd $$($$(PKG)_SRCDIR) && python3 $$($(2)_WAF)

(Note that last one uses a mix of $$(PKG) and $(2)...)

Regards,
Yann E. MORIN.

>  endef
>  
>  # We need host-python3 to run waf
> -- 
> 2.34.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Romain Naour Feb. 11, 2023, 9:57 a.m. UTC | #2
Le 11/02/2023 à 10:51, Yann E. MORIN a écrit :
> Romain. All,
> 
> On 2023-02-11 10:42 +0100, Romain Naour spake thusly:
>> We want to have $(@D) expanded at the time the recipe is run, so like
>> all other variables, we need to $$-expand it.
>>
>> Fixes:
>> http://autobuild.buildroot.org/results/b6f/b6fd3a866af182edc7831492aecc8323f377b826
> 
> Thanks for the quick fix, but se below...
> 
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
>> Cc: Peter Korsgaard <peter@korsgaard.com>
>> ---
>>  package/pkg-waf.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
>> index 0e752072c8..c3e965bdf3 100644
>> --- a/package/pkg-waf.mk
>> +++ b/package/pkg-waf.mk
>> @@ -42,7 +42,7 @@ define inner-waf-package
>>  # otherwise waf errors out with:
>>  # Waf script 'X' and library 'Y' do not match
>>  define WAF_PACKAGE_REMOVE_WAF_LIB
>> -	$(RM) -fr $(@D)/waf $(@D)/waflib
>> +	$(RM) -fr $$(@D)/waf $$(@D)/waflib
> 
> Shouldn't we be using $$($$(PKG)_SRCDIR) or $$($(2)_SRCDIR) instead of
> $$(@D), like is used everywhere else in the file:
> 
>     cd $$($$(PKG)_SRCDIR) && python3 configure [...]
> 
>     cd $$($$(PKG)_SRCDIR) && python3 $$($(2)_WAF)
> 
> (Note that last one uses a mix of $$(PKG) and $(2)...)

I guess @D come from the HOOK from aubio and move to pkg-waf.

It seems @D is used at several place in pkg-<*>.mk infra.

I'm not sure what we prefer/should use.

Best regards,
Romain


> 
> Regards,
> Yann E. MORIN.
> 
>>  endef
>>  
>>  # We need host-python3 to run waf
>> -- 
>> 2.34.3
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
>
Yann E. MORIN Feb. 11, 2023, 10:04 a.m. UTC | #3
Romain, All,

On 2023-02-11 10:42 +0100, Romain Naour spake thusly:
> We want to have $(@D) expanded at the time the recipe is run, so like
> all other variables, we need to $$-expand it.
> 
> Fixes:
> http://autobuild.buildroot.org/results/b6f/b6fd3a866af182edc7831492aecc8323f377b826
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Peter Korsgaard <peter@korsgaard.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/pkg-waf.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
> index 0e752072c8..c3e965bdf3 100644
> --- a/package/pkg-waf.mk
> +++ b/package/pkg-waf.mk
> @@ -42,7 +42,7 @@ define inner-waf-package
>  # otherwise waf errors out with:
>  # Waf script 'X' and library 'Y' do not match
>  define WAF_PACKAGE_REMOVE_WAF_LIB
> -	$(RM) -fr $(@D)/waf $(@D)/waflib
> +	$(RM) -fr $$(@D)/waf $$(@D)/waflib
>  endef
>  
>  # We need host-python3 to run waf
> -- 
> 2.34.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/pkg-waf.mk b/package/pkg-waf.mk
index 0e752072c8..c3e965bdf3 100644
--- a/package/pkg-waf.mk
+++ b/package/pkg-waf.mk
@@ -42,7 +42,7 @@  define inner-waf-package
 # otherwise waf errors out with:
 # Waf script 'X' and library 'Y' do not match
 define WAF_PACKAGE_REMOVE_WAF_LIB
-	$(RM) -fr $(@D)/waf $(@D)/waflib
+	$(RM) -fr $$(@D)/waf $$(@D)/waflib
 endef
 
 # We need host-python3 to run waf