title: Function "patsubst" in Makefile
body: <p><strong><em>From the <a href="https://www.gnu.org/software/make/manual/html_node/Text-Functions.html#Text-Functions" rel="noreferrer">docs</a>:</em></strong></p>
  
  <blockquote>
    <p><code>$(patsubst PATTERN,REPLACEMENT,TEXT)</code>
    <br>
    <br>
         Finds whitespace-separated words in TEXT that match PATTERN and
         replaces them with REPLACEMENT.  Here PATTERN may contain a <code>%</code>
         which acts as a wildcard, matching any number of any characters
         within a word.
    <br>
    ...
    <br>
         Whitespace between words is <strong><em>folded into single space</em></strong> characters;
         leading and trailing whitespace is discarded.</p>
  </blockquote>
  
  <p><br>
  <br></p>
  
  <p><strong><em>Now, given a makefile, is:</em></strong></p>
  
  <pre class="lang-make prettyprint-override"><code># 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)"'
  </code></pre>
  
  <p><br>
  <br>
  <strong><em>Executing, we get:</em></strong></p>
  
  <pre class="lang-console prettyprint-override"><code>foo is: "y    y    y"
  bar is: "y y y"
  </code></pre>
  
  <p><br>
  <br></p>
  
  <p>So, it is obvious, that Make, may or may <strong><em>not</em></strong> "fold" all whitespace into one and single whitespace.</p>
  
  <p>Or, did I do something wrong.</p>