title: Remove prefix with make
body: <p>Is there a way to remove a prefix from a string (a pathname in my case) in <code>make</code>?</p>
  
  <p>As an example, suppose I had the string:</p>
  
  <pre><code>FILES = a/b/c.d a/b/e.f
  </code></pre>
  
  <p>I want to remove the <code>a/</code>, and be left with <code>b/c.d b/e.f</code></p>
  
  <p>I have tried using various combinations of <code>dir</code>, <code>notdir</code> and <code>basename</code> from the <a href="http://www.gnu.org/software/make/manual/make.html" rel="noreferrer">GNU make manual</a>, but none seem to provide a nice solution.</p>
  
  <pre><code>$(dir $(FILE))      # a/b a/b
  $(notdir $(FILE))   # c.d e.f
  $(basename $(FILE)) # a/b/c a/b/e
  </code></pre>
  
  <p>The only way I've found to do this so far is:</p>
  
  <pre><code>$( join $(basename $(dir $(FILE))), $(notdir $(FILE)) )
  </code></pre>
  
  <p>Which is really ugly and long-winded. What I really need is some kind of <code>$(removeprefix ...)</code> function. Assuming that I know the prefix (<code>a/</code>) to be removed, can this be done with some kind of string manipulation?</p>