Mulitple lines in make
Posted
by Navi
on Stack Overflow
See other posts from Stack Overflow
or by Navi
Published on 2010-05-13T15:01:13Z
Indexed on
2010/05/13
15:04 UTC
Read the original article
Hit count: 318
Filed under:
make
I am trying to store a multiline string in a variable in 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}
This doesn't work, so I am wondering if this is possible at all. I need to preserve the newlines here and shell is converting them in spaces. Any suggestions?
© Stack Overflow or respective owner