bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62881] parentheses confuse make parser


From: Dmitry Goncharov
Subject: [bug #62881] parentheses confuse make parser
Date: Tue, 9 Aug 2022 15:05:24 -0400 (EDT)

Follow-up Comment #1, bug #62881 (project make):

A user reported the following here
https://lists.gnu.org/archive/html/bug-make/2022-08/msg00017.html

++++
in GNU-make macros. Like in:

   msg = @echo "$(1)"

   ptest_1:
        $(call msg, foo (arg1, arg2, arg3))

...

--------------------

A 'make ptest_1' shows:
   foo (arg1, arg2, arg3)

...


So does a "foo (arg1, arg2, arg3)" becomes one
argument due to the parenthesis or something?
----

"foo (arg1, arg2, arg3)" indeed becomes one argument due to the parenthesis.
Make needs to chop "foo (arg1, arg2, arg3))" into 3 arguments for 'msg'.
make assumes that any comma after an open parenthesis delimits an argument for
a nested macro. Like in "foo $(arg1, arg2, arg3))".
There is no '$' in this case and make could figure out that the user intended
'foo (arg1' to be the 1st arg, etc.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62881>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]