On Sat, 2011-04-30 at 15:52 +0430, ali hagigat wrote: > 8.1 Function Call Syntax > Commas and unmatched parentheses or braces cannot appear in the text > of an argument written; > ------------------- > all: ; > var1=$(subst this,that,this is a, text) > $(warning $(var1)) > makefile28:3: that is a, text > make: `all' is up to date. > -------------------- > Why "," was used successfully then?
The algorithm make uses to parse function arguments, for a function expecting N arguments, is: Break up the text after the function name on comma characters, until you have N arguments (so, the first N-1 commas). Everything after the N-1'th comma is considered the last argument. Once that's done, the function will proceed with expanding the arguments (or not, depending on the function definition). For functions which have no specific number of arguments (such as call), then N is essentially infinite (every comma serves as an argument delimiter) -- ------------------------------------------------------------------------------- Paul D. Smith <[email protected]> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
