In m4 patsubst, how to replace newlines with spaces?

How can I tell m4 patsubstrto replace all lines of a newline in a line with a space?

I tried:

patsubst(MULTI_LINE_STR_DEFINE,`\n',` ')

and

patsubst(MULTI_LINE_STR_DEFINE,`\\n',` ')
+3
source share
1 answer
patsubst(MULTI_LINE_STR_DEFINE,`
',` ')

That is, you put a newline character literally between quotation marks.

+7
source

Source: https://habr.com/ru/post/1720100/


All Articles