[Buildroot] [PATCH 1 of 3 v2] dependencies: add function suitable-host-package

Thomas De Schampheleire patrickdepinguin+buildroot at gmail.com
Thu Dec 8 09:56:19 UTC 2011


Hi Arnout,

On Tue, Dec 6, 2011 at 6:12 PM, Arnout Vandecappelle <arnout at mind.be> wrote:
> On Wednesday 23 November 2011 14:59:50 Thomas De Schampheleire wrote:
>
>> +# suitable-host-pkg: calls check-host-$(1).sh shell script, which
>
>> +# should return the path to the suitable host tool, or nothing if no
>
>> +# suitable tool was found.
>
>> +define suitable-host-package
>
>> +$(shell toolchain/dependencies/check-host-$(1).sh)
>
>> +endef
>
>
> I should have noticed this in the first review, but: If the function is
>
> this simple, it becomes pointless. Especially because other check-host-*
>
> mk files may want to implement the checking in a different way, e.g.
>
> $(eval $(shell ...)).

I'm not sure if it's pointless. It provides a uniform way of checking
for host packages, and in that sense becomes a sort of
'infrastructure'. Moreover, the syntax is simpler and does not require
knowing the path to the correct check-host file. If anything changes,
it only needs to change in one place.

Compare:
$(if $(call suitable-host-package,foo),,host-foo)
with
$(if $(shell toolchain/dependencies/check-host-foo.sh),,host-foo)

>
>
>> +include toolchain/dependencies/check-host-*.mk
>
>
> And if this is the only thing remaining, perhaps it's better to merge
>
> this patch with the next one :-)
>
>
>

Best regards,
Thomas



More information about the buildroot mailing list