Dimitry Golubovsky wrote:
Namely, the $(call myvar,foo) must expand into:
awk '$0 != foo { ... }'
where $0 is in the awk sense (i. e. whole line read from the input).
I tried to define myvar like this:
myvar = awk '$$0 != $(0) { .... }'
this does not work: $$0 expands to /bin/sh i. e. shell's $0, not awk's
Firstly, if you define
myvar = awk '$$0 != $0 { ... }'
and then look at the value of $(call myvar,foo) it IS what you want, namely:
awk '$0 != foo { ... }'
(You can verify this with $(warning $(call myvar,foo)))
Secondly, I tried doing $(shell $(call myvar,foo)) and I saw that the
shell was being asked to execute awk '$0 != foo { ... }'.
So what's the issue that you are seeing, exactly? I think it would be
helpful to post a full example, e.g. show the definition of your
variable, and exactly how you are using it.
John.
--
John Graham-Cumming
[EMAIL PROTECTED]
Home: http://www.jgc.org/
Blog: http://www.jgc.org/blog/
POPFile: http://getpopfile.org/
GNU Make Standard Library: http://gmsl.sf.net/
GNU Make Debugger: http://gmd.sf.net/
Fast, Parallel Builds: http://www.electric-cloud.com/
Sign up for my Spam and Anti-spam Newsletter
at http://www.jgc.org/
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make