[Top][All Lists]

[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

in GNU-make macros. Like in:

   msg = @echo "$(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:


Message sent via Savannah

reply via email to

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