【发布时间】:2010-05-13 15:01:13
【问题描述】:
我正在尝试将多行字符串存储在 make 中的变量中
var=$(shell cat <<End-of-message \
-------------------------------------\
This is line 1 of the message.\
This is line 2 of the message.\
This is line 3 of the message.\
This is line 4 of the message.\
This is the last line of the message.\
-------------------------------------\
End-of-message)
printit:
@echo ${var}
这不起作用,所以我想知道这是否可能。我需要在此处保留换行符,并且 shell 将它们转换为空格。有什么建议吗?
【问题讨论】:
-
有什么原因你不能在外部文件中而不是在 makefile 中使用需要使用的文本?
标签: makefile