Thanks Paul: On Sun 5/1/11 13:47 EDT [email protected] wrote: > On Sun, 2011-05-01 at 08:57 -0500, [email protected] wrote: > > Assume I need to use the make foreach function in the recipe, and > > that this function must somehow use the shell var pip to define > > it's second arg. > > What you are asking for is not possible, as described. > > foreach runs inside make. The variable exists in the shell. Make will > completely evaluate the recipe then give it to the shell to run. This > operation is strictly one way, and serial. There's no "two-way > communication" where the shell can give back information to make that it > can use when it does more evaluation later.
> > .PHONY : yip > > > > yip : > > pip="alpha beta gamma";\ > > echo "$(foreach foo,word-one $$pip,everyloop $(foo))" OK, make (and foreach) only sees the literal string $$pip, which is passed to the shell as $pip. My work around is to write pip as a make macro in a temp file, where this tempfile is itself a target with preqs which ensure that pip is defined. This tempfile is pulled in as a make include - this is working but seems a bit complex.. -- thanks again, Tom _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
