bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

$(foreach) example not understandable


From: Dan Jacobson
Subject: $(foreach) example not understandable
Date: Thu, 10 Oct 2024 16:10:47 +0800

Regarding
https://www.gnu.org/software/make/manual/html_node/Foreach-Function.html
I have spent hours and hours trying to figure out what you are trying to
say.

Yes I understand the sh, and perl "for" functions just fine.

The problem apparently is your example,

    dirs := a b c d
    files := $(foreach dir,$(dirs),$(wildcard $(dir)/*))

In it you are trying to do many things at once, causing your example to
go beyond simple users' comprehension.

Therefore please add an additional previous simpler example,
refraining from using any other function than just the foreach function.

Something simple, like sh's
$ for i in a b c; do echo =$i=; done
=a=
=b=
=c=



reply via email to

[Prev in Thread] Current Thread [Next in Thread]