title: Repeat element from list
body: <p>In a makefile is there any way to specifiy the same element of a list (I think this is the correct term) more than once? For example, having a a list with 3 files <code>A.txt B.txt C.txt</code>, I'd like to create targets based on these elements that would be contained within a directory where the pattern would have to be repeated twice: <code>A/A-rambo B/B-rambo C/C-rambo</code>.</p>
  
  <p>I tried:</p>
  
  <pre><code>TXT = A.txt B.txt C.txt
  
  DIR := $(patsubst %.txt,%,$(TXT))
  OUT := $(patsubst %,%/%-rambo,$(DIR))
  
  $(info $(OUT))
  </code></pre>
  
  <p>but this prints <code>A/%-rambo B/%-rambo C/%-rambo</code>, where the second <code>%</code>is not being replaced.</p>
  
  <p>And so does <code>OUT := $(patsubst %,$(addsuffix /%-rambo,%),$(DIR))</code></p>