pls consider:

  $ cat makefile
  .PHONY : yip

  yip :
          pip="alpha beta gamma";\
          echo "$(foreach foo,word-one $$pip,everyloop $(foo))"
            # make interpolates $$pip into a single word (spaces ignored!)
  $ make
  pip="alpha beta gamma";\
          echo "everyloop word-one everyloop $pip"
  everyloop word-one everyloop alpha beta gamma
  # make interpolates $pip into a single word (spaces ignored!)

Is there a way to convince make to see $$pip within the foreach as
three separate words?

--
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.  In my code pip is a shell var defined in the
recipe by an expression using another make function - pip can not
be a make macro, because I need to delay it's definition until the
recipe runs.

The solution needs to work for GNU make 3.80.

--
thanks/regards,
Tom

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to