[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Does "whitespace" have an explicit definition?
From: |
J.T. Conklin |
Subject: |
Does "whitespace" have an explicit definition? |
Date: |
Tue, 29 Jun 2010 19:17:41 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, berkeley-unix) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Does "whitespace" have an explicit definition?,
J.T. Conklin <=