title: How should I use make to allow me to run all python scripts in a directory?
body: <p>I'm using the excellent Makefile.venv</p>
  
  <p><a href="https://github.com/sio/Makefile.venv" rel="nofollow noreferrer">https://github.com/sio/Makefile.venv</a></p>
  
  <p>to handle various aspects of python virtual environments.</p>
  
  <p>To run my hello world program, I have a target:</p>
  
  <pre><code>hello: venv
      $(VENV)/python hello.py
  </code></pre>
  
  <p>Notice that it depends on <code>venv</code> (which target sets up the virtual environment correctly), but not on <code>hello.py</code>, since that's just the script I wish to run when I type 'make hello', and I want this to happen whether or not the file's been updated recently.</p>
  
  <p>This works perfectly, but I've started to accumulate rules like this, eg:</p>
  
  <pre><code>hello-pyparsing: venv
      $(VENV)/python hello-pyparsing.py
  
  generators: venv
      $(VENV)/python generators.py
  </code></pre>
  
  <p>How should I abstract the common pattern to say that any <code>.py</code> file in the directory is a possible target? </p>
  
  <p>Bonus points if bash command completion works, ie <code>make &lt;Tab&gt;</code> gives me a list like <code>hello, hello-pyparsing, generators</code> to choose from!</p>