diff mbox series

package/android-tools: host-android-tools need pkg-conf

Message ID 20190409131754.24516-1-giulio.benetti@micronovasrl.com
State Accepted
Headers show
Series package/android-tools: host-android-tools need pkg-conf | expand

Commit Message

Giulio Benetti April 9, 2019, 1:17 p.m. UTC
Host version of this package needs pkg-conf the same way as target
package: for Makefiles library dependencies retrieving.

Set HOST_ANDROID_TOOLS_DEPENDENCIES = $(ANDROID_TOOLS_DEPENDENCIES) to
provide host-pkg-conf.

Fixes:
http://autobuild.buildroot.net/results/854/8543eb3815a67747349a2e60654d19b9804a3a89/

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 package/android-tools/android-tools.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni April 11, 2019, 6:22 a.m. UTC | #1
Hello,

On Tue,  9 Apr 2019 15:17:54 +0200
Giulio Benetti <giulio.benetti@micronovasrl.com> wrote:

>  ANDROID_TOOLS_DEPENDENCIES = host-pkgconf
> +HOST_ANDROID_TOOLS_DEPENDENCIES = $(ANDROID_TOOLS_DEPENDENCIES)

We don't typically re-use the target dependencies variable for the host
dependencies. So I changed this to = host-pkgconf and applied.

Thanks!

Thomas
Thomas Petazzoni April 11, 2019, 6:25 a.m. UTC | #2
On Thu, 11 Apr 2019 08:22:18 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> We don't typically re-use the target dependencies variable for the host
> dependencies. So I changed this to = host-pkgconf and applied.

An illustration of why re-using $(ANDROID_TOOLS_DEPENDENCIES) doesn't
do what you think it does:

$ cat foo.mk
FOO_DEPENDENCIES = host-pkgconf
HOST_FOO_DEPENDENCIES = $(FOO_DEPENDENCIES)

FOO_DEPENDENCIES += zlib
HOST_FOO_DEPENDENCIES += host-zlib

all:
	@echo $(FOO_DEPENDENCIES)
	@echo $(HOST_FOO_DEPENDENCIES)
$ make -f foo.mk
host-pkgconf zlib
host-pkgconf zlib host-zlib

See how HOST_FOO_DEPENDENCIES contains "zlib" ?

= assignments are evaluated at the time of use, not at the time of
assignment (contrary to := assignments).

Best regards,

Thomas
Giulio Benetti April 11, 2019, 6:46 a.m. UTC | #3
Hello Thomas,

Il 11/04/2019 08:25, Thomas Petazzoni ha scritto:
> On Thu, 11 Apr 2019 08:22:18 +0200
> Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 
>> We don't typically re-use the target dependencies variable for the host
>> dependencies. So I changed this to = host-pkgconf and applied.
> 
> An illustration of why re-using $(ANDROID_TOOLS_DEPENDENCIES) doesn't
> do what you think it does:
> 
> $ cat foo.mk
> FOO_DEPENDENCIES = host-pkgconf
> HOST_FOO_DEPENDENCIES = $(FOO_DEPENDENCIES)
> 
> FOO_DEPENDENCIES += zlib
> HOST_FOO_DEPENDENCIES += host-zlib
> 
> all:
> 	@echo $(FOO_DEPENDENCIES)
> 	@echo $(HOST_FOO_DEPENDENCIES)
> $ make -f foo.mk
> host-pkgconf zlib
> host-pkgconf zlib host-zlib
> 
> See how HOST_FOO_DEPENDENCIES contains "zlib" ?
> 
> = assignments are evaluated at the time of use, not at the time of
> assignment (contrary to := assignments).

Aah, this is why, '=' vs ':='.
Thank you for the explanation.
Peter Korsgaard April 14, 2019, 9:19 p.m. UTC | #4
>>>>> "Giulio" == Giulio Benetti <giulio.benetti@micronovasrl.com> writes:

 > Host version of this package needs pkg-conf the same way as target
 > package: for Makefiles library dependencies retrieving.

 > Set HOST_ANDROID_TOOLS_DEPENDENCIES = $(ANDROID_TOOLS_DEPENDENCIES) to
 > provide host-pkg-conf.

 > Fixes:
 > http://autobuild.buildroot.net/results/854/8543eb3815a67747349a2e60654d19b9804a3a89/

 > Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>

Committed to 2019.02.x, thanks.
diff mbox series

Patch

diff --git a/package/android-tools/android-tools.mk b/package/android-tools/android-tools.mk
index 3a63139014..b8808057a2 100644
--- a/package/android-tools/android-tools.mk
+++ b/package/android-tools/android-tools.mk
@@ -12,6 +12,7 @@  HOST_ANDROID_TOOLS_EXTRA_DOWNLOADS = $(ANDROID_TOOLS_EXTRA_DOWNLOADS)
 ANDROID_TOOLS_LICENSE = Apache-2.0
 ANDROID_TOOLS_LICENSE_FILES = debian/copyright
 ANDROID_TOOLS_DEPENDENCIES = host-pkgconf
+HOST_ANDROID_TOOLS_DEPENDENCIES = $(ANDROID_TOOLS_DEPENDENCIES)
 
 # Extract the Debian tarball inside the sources
 define ANDROID_TOOLS_DEBIAN_EXTRACT