In Makefile there is defined a print
function, which takes print text as argument and then print it.
My question is that how to pass comma character as a text part to print it ?
For example below is relevant makefile section where comma is not printable.
print = echo '$(1)'
help:
@$(call print, He lives in Paris, does not he?)
Now if run makefile like:
$ make help
It prints
$ He lives in Paris
instead of
$ He lives in Paris, does not he?
I know in makefile comma uses as argument separate, but how I can make it as printable.
I used different escape character combination to pass comma as text message like \,
/,
$$,
','
","
but nothing works
The manual says:
Commas and unmatched parentheses or braces cannot appear in the text of an argument as written; leading spaces cannot appear in the text of the first argument as written. These characters can be put into the argument value by variable substitution.
So, you need to put comma into a variable, and use it in the argument. E.g:
print = echo '$(1)'
comma:= ,
help:
@$(call print,He lives in Paris$(comma) does not he?)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With