title: Joining elements of a list in GNU Make
body: <p>In my makefile I have a variable with a list of directories, like this:</p>
  
  <pre><code>DIRS = /usr /usr/share/ /lib
  </code></pre>
  
  <p>Now, I need to create PATH variable from it, which is basically the same, but uses semicolon as a separator:</p>
  
  <pre><code>PATH = /usr:/usr/share/:/lib
  </code></pre>
  
  <p>How do I do that? I mean, how do I join elements of DIRS list with semicolons, instead of spaces?</p>