From the docs:
$(patsubst PATTERN,REPLACEMENT,TEXT)
Finds whitespace-separated words in TEXT that match PATTERN and replaces them with REPLACEMENT. Here PATTERN may contain a%
which acts as a wildcard, matching any number of any characters within a word.
...
Whitespace between words is folded into single space characters; leading and trailing whitespace is discarded.
Now, given a makefile, is:
# The pattern for patsubst, does NOT contain '%'
foo := $(patsubst x,y,x x x)
# The pattern for patsubst, does contain '%'
bar := $(patsubst x%,y,x x x)
# The variable 'foo', is a result from a patsubst-pattern, that did NOT contain a '%'
# The variable 'bar', is a result from a patsubst-pattern, that did contain a '%'
all ::
@echo 'foo is: "$(foo)"'
@echo 'bar is: "$(bar)"'
Executing, we get:
foo is: "y y y"
bar is: "y y y"
So, it is obvious, that Make, may or may not "fold" all whitespace into one and single whitespace.
Or, did I do something wrong.