According to the Make documentation here: http://www.ecoop.net/coop/translated/GNUMake3.77/make_8.html#SEC80
The only processing make does on the result, before substituting it into the surrounding text, is to convert each newline or carriage-return / newline pair to a single space. It also removes the trailing (carriage-return and) newline, if it's the last thing in the result.
Why does Make do this processing at all?
Without a recursive wildcard command, having the ability to return a delimited list from find
would sure be nice.
When you use the variable, the value of the variable is substituted. Make docs ( like "define" in C ).
The new lines would cause havoc on make's ability to parse.
It is possible to have new lines in a variable though: Another question
I imagine it's just because "no new lines" is the used most case. You might be able to use other shell commands to replace those new lines with something else before make tried to replace them.
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