如何缩进m4宏中的文本块

时间:2015-03-13 07:17:58

标签: macros m4

有没有一种方法可以在m4宏中统一缩进文本块?换句话说,宏

define(`mytext',dnl
This is
a
piece of text
that I would like
to indent)
mytext

产生

This is
a
piece of text
that I would like
to indent

我希望有办法将整个文本块缩进到指定的数量。

1 个答案:

答案 0 :(得分:2)

patsubst

怎么样?
patsubst(mytext,`^', ` ')