While playing around trying to find a solution to iterate through a
multi-line variable by lines I wrote about the other day, I discovered
newlines don't seem to be considered whitespace in text functions.
For example, with the following definition of FOO
define FOO
foo abc
bar xyz
endef
In GNU Make 3.81, $(words $(FOO)) expands to 3, $(word 1,$(FOO)) to
"foo", $(word 2,$(FOO)) to "abc\nbar", and $(word 3,$(FOO)) to "xyz".
Is this intentional? I went through the manual and examined each
place the word "whitespace" was used and didn't find a gmake specific
definition. As such, my expectation was that the common definition of
whitespace: space, horizontal tab, carriage return, newline, form
feed, and vertical tab characters would be used, at least as far as
variable expansion for function arguments is concerned.
--jtc
--
J.T. Conklin
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make