%% Greg Chicares <[EMAIL PROTECTED]> writes:

  gc> In the example below, shouldn't
  gc>   foo='$(foo)'
  gc> with single quotes pass the string
  gc>   $(foo)
  gc> itself, instead of its value?

  gc> all:
  gc>         $(MAKE) -f receive_options.make foo=$(foo)
  gc>         $(MAKE) -f receive_options.make foo='$(foo)'
  gc>         $(MAKE) -f receive_options.make foo="$(foo)"

No.

Make is not the shell and it doesn't implement the shell's parser.
Every "$" in the shell script is expanded by make before the shell is
invoked, without regard to quoting etc.

If you want to put a literal "$" into your shell script, you have to
escape it as "$$":

> all:
>         $(MAKE) -f receive_options.make foo=$$(foo)
>         $(MAKE) -f receive_options.make foo='$$(foo)'
>         $(MAKE) -f receive_options.make foo="$$(foo)"

and quotes don't make any difference.  They will, of course, matter
greatly as to how the _shell_ parses the command line.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


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

Reply via email to