[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make funct in recipe sees shell var as one word (but is space delim list
From: |
gnu_make0 |
Subject: |
make funct in recipe sees shell var as one word (but is space delim list) |
Date: |
Sun, 01 May 2011 08:57:49 -0500 |
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
- make funct in recipe sees shell var as one word (but is space delim list),
gnu_make0 <=