[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to preserve $-containing terms in an expanded variable (with call)?
From: |
Dimitry Golubovsky |
Subject: |
How to preserve $-containing terms in an expanded variable (with call)? |
Date: |
Mon, 13 Mar 2006 07:00:24 -0500 |
I am puzzled at the following problem I cannot solve.
I need to create a variable to use with "call", which after
substitution of all parameters must still contain something with
dollar-sign.
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
$$$0 expands into nothing, and $$$$0 expands into some number which
makes no sense.
How can I preserve a dollar sign so it does not expand any more while
keeping other $-constructs expanding as required?
I use:
bash$ make --version
GNU Make 3.80
Thanks for any ideas.
--
Dimitry Golubovsky
Anywhere on the Web
--
Dimitry Golubovsky
Anywhere on the Web
- How to preserve $-containing terms in an expanded variable (with call)?,
Dimitry Golubovsky <=