[Buildroot] [PATCH 1 of 5] Makefile.package.in: add utility functions find*clauses and notfirstword

Thomas De Schampheleire patrickdepinguin+buildroot at gmail.com
Thu Oct 20 06:55:47 UTC 2011


Hi Arnout,

On Thu, Oct 20, 2011 at 12:32 AM, Arnout Vandecappelle <arnout at mind.be> wrote:
>
> On Wednesday 19 October 2011 09:34:04, Thomas De Schampheleire wrote:
>> +# findfileclauses_cont: creates "-o -name 'X' -o -name 'Y'"
>> +# [1:namelist, 2:prefix]
>> +findfileclauses_cont=$(patsubst %,$(2) -name '%',$(1))
>> +# findfileclauses: creates "-name 'X' -o -name 'Y'"
>> +# [1:namelist]
>> +findfileclauses=$(call findfileclauses_cont,$(firstword $(1))) $(call findfileclauses_cont,$(call notfirstword,$(1)),-o)
>
>  The _cont function is a bit redundant, no?
>
> findfileclauses=-name '$(firstword $(1))' $(patsubst %,-o -name '%',$(call notfirstword,$(1)))
>
>  I don't think the duplication of -name warrants the additional function
> call.  It definitely doesn't make it easier to understand.

You're right. I got a little carried away with these functions... :-D

>
>  Nevertheless, this is a nifty patch!
>

Thanks!
I'll wait a while for some more feedback on this series, and then I'll update.

Best regards,
 Thomas


More information about the buildroot mailing list