title: Multiple target specific variables in Makefile
body: <p><code>Make</code> can't define multiple <a href="https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html" rel="nofollow noreferrer">target-specific variables</a>.</p>
  <p>But there is a macros from this <a href="https://stackoverflow.com/a/50357925/5537840">answer</a> that can solve the problem.</p>
  <pre><code>assign-vars = $(foreach A,$2,$(eval $1: $A))
  </code></pre>
  <p>But probably it can't set variable that depends on another variable. For example:</p>
  <pre><code>assign-vars = $(foreach A,$2,$(eval $1: $A))
  
  
  multiple_variable = a=10 \
                      b=$(shell echo $$(( $(a)-1 )) )
  
  $(call assign-vars, print, $(multiple_variable))
  
  print:
      @echo a=$(a)
      @echo b=$(b)
  </code></pre>
  <p>I expected to see <code>b=9</code> as a result from <code>print</code> target but I get <code>b=-1</code>.</p>
  <p>How can I fix it?</p>