On Sat, Mar 21, 2009 at 13:42, Vaidhyanathan Mayilrangam Gopalan
<[email protected]> wrote:

> With the latest cupcake merge, the make gives an error saying
> argument list too long. I tracked it down to
> build/core/tasks/localize.mk.

 I have to ask: how did you figure out which file was the source
 of the problem?  I was using strace to figure out which one was
 the problematic command, but that was as far as I had gotten.

> foo := a b c d
> foo1 := a1 b1 c1 d1
> foo2 := "something"
> files := $(foreach p, $(foo), $(foo2.$(p)) )
> bar := $(shell echo $(foo) >&2)
> bar := $(shell echo $(foo1) >&2)
> bar := $(shell echo $(files) >&2)
>
> When running this makefile, $files expands to an empty list
> while it should be  something.a something.b something.c
> something.d according to the manual.

 No, because:

 files := $(foreach p, $(foo), $(foo2.$(p)) )

 is iterating over $(foo) and expanding $(p) in the second
 expression, producing:

    $(foo2.a)
    $(foo2.b)
    $(foo2.c)
    $(foo2.d)

 which in turn gets expanded again.  As the variables foo2.a,
 foo2.b, etc, don't exist, files is blank.

 To get what you expect, you'd have to write:

 files := $(foreach p, $(foo), $(foo2).$(p) )

 I suspect this is not the issue in localize.mk.

 Marcelo
_______________________________________________
android-freerunner mailing list
[email protected]
http://android.koolu.org/listinfo.cgi/android-freerunner-koolu.org

Reply via email to