On Thu, Sep 2, 2021 at 9:51 AM Brian J. Murrell <br...@interlinx.bc.ca> wrote:
> How can I get make to not try to resolve the $ in the value as it seems
> to be doing for all of the echos in the debug target:

The value built-in function will provide the value of a variable without
expanding it. See Section 8.8 of the Gnu Make manual.
http://www.gnu.org/software/make/manual/make.html#Value-Function

In your example, be wary of the shell expanding $ in addition to Make. Use
single quotes to ensure the shell doesn't also expand $ during echo.

fooreal := $(value foo)
debug:
        echo 'foo = $(foo)'
        echo 'value(for) = $(value foo)'
        echo 'fooreal = $(fooreal)'
        echo 'value(fooreal) = $(value fooreal)'

Mike

Reply via email to