Skip to contentSkip to conversation

package/pkg-waf: add missing $

PATCH Applied Romain Naour 3 participants 4 messages Feb 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-waf: add missing $

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

Cc Yann E. MORIN <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/pkg-waf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-waf.mk +1 -1
index 0e752072c8..c3e965bdf3 100644
@@ -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
Signature · 6 lines
2.34.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Romain. All,

On 2023-02-11 10:42 +0100, Romain Naour spake thusly:

Quoted 5 lines

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...

Quoted 12 lines
Cc Yann E. MORIN <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/pkg-waf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-waf.mk +0 -0
index 0e752072c8..c3e965bdf3 100644

package/pkg-waf.mk define inner-waf-package · line 45

Quoted 5 lines
package/pkg-waf.mk +1 -1
@@ -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.

Quoted 10 lines
package/pkg-waf.mk +0 -0
 endef
 
 # We need host-python3 to run waf
Signature · 6 lines
2.34.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Le 11/02/2023 à 10:51, Yann E. MORIN a écrit :

Quoted 32 lines

Romain. All,

On 2023-02-11 10:42 +0100, Romain Naour spake thusly:

Quoted 5 lines

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...

Quoted 12 lines
Cc Yann E. MORIN <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/pkg-waf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-waf.mk +0 -0
index 0e752072c8..c3e965bdf3 100644

package/pkg-waf.mk define inner-waf-package · line 45

Quoted 5 lines
package/pkg-waf.mk +1 -1
@@ -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:

Quoted 5 lines
    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

Quoted 15 lines

Regards,
Yann E. MORIN.

Quoted 10 lines
package/pkg-waf.mk +0 -0
 endef
 
 # We need host-python3 to run waf
Signature · 6 lines
2.34.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#3 lore raw
In reply to Romain Naour

Romain, All,

On 2023-02-11 10:42 +0100, Romain Naour spake thusly:

Quoted 9 lines

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

Cc Yann E. MORIN <[email protected]>
Cc Peter Korsgaard <[email protected]>

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 24 lines
---
 package/pkg-waf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pkg-waf.mk +1 -1
index 0e752072c8..c3e965bdf3 100644
@@ -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
Signature · 6 lines
2.34.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot