title: Repeated percent string in makefile target
body: <p>I would like to represent targets and dependencies of the following form:</p>
  
  <pre><code>dir_MODULE/target_MODULE: dep_MODULE
  </code></pre>
  
  <p>However, the intuitive solutions do not work:</p>
  
  <pre><code>dir_%/target_%: dep_%
      @echo 1
  dir_%/target_$*: dep_%
      @echo 2
  
  &gt; make: *** No rule to make target `dir_test/target_test'. Stop.
  </code></pre>
  
  <p>Is there a workaround that does not depend on having a list of the possible values of MODULE in advance?</p>
  
  <p>(This is not a duplicate of <a href="https://stackoverflow.com/questions/11035930/can-i-have-more-than-one-sign-in-a-makefile-target">Can I have more than one % sign in a makefile target?</a>, because they wanted to generate targets of the form <code>dir_STR1/target_STR2</code> for the set of all possible <code>(STR1,STR2)</code> tuples; my case is simpler because of the constraint that <code>STR1 = STR2</code>.)</p>