title: Pass Arguments to make call in Makefile
body: <p>I have a Makefile with a large number of possible variables set on the command line.  I'd like to be able to have one target in my makefile that uses the arguments and then call it from Make with various options:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>GUI ?= 0
  DEBUG ?= 0
  VERBOSE ?= 0
  
  run_prog:
    $(MYPROG) $(GUI) $(DEBUG) $(VERBOSE)
  
  run_prog_gui: 
    $(MAKE) run_prog GUI=1
  
  run_prog_debug:
    $(MAKE) run_prog DEBUG=1</code></pre>
  </div>
  </div>
  </p>
  
  <p>The problem is that I can't tell whether a user has overridden one of the variables:</p>
  
  <p><code>% make run_prog_debug VERBOSE=1</code></p>
  
  <p>I'd like to have a way of passing all the variables that were passed to me to the <code>run_prog</code> target in <code>run_prog_gui</code> for example.</p>
  
  <p>Is there a variable in <code>make</code> that gives you a string of all the variables set on the command line?</p>