title: Makefile dependency that doesn't trigger recompilation?
body: <p>I want to declare non-file targets in a makefile that </p>
  
  <ul>
  <li>Can be used as dependency by file targets without causing those to always be rebuilt, and</li>
  <li>Execute commands if and only if some dependency has been rebuilt.</li>
  </ul>
  
  <p>In the simplest case, such a target would simply serve as a "name" for a list of targets.</p>
  
  <p>However, any file-target that depends on such a "name" target will always be rebuilt, e.g.:</p>
  
  <pre><code>&gt;&gt; make --debug
     File 'PREPROCESS' does not exist.
    Must remake target 'PREPROCESS'.
    Successfully remade target file 'PREPROCESS'.
   Prerequisite 'PREPROCESS' of target 'config.ini' does not exist.
  Must remake target 'config.ini'.
  </code></pre>
  
  <p>The only workaround I can think of is creating a dummy file with <code>touch $@</code>, but that would clutter the source directory with unwanted files.</p>
  
  <p>Usually, makefiles solve this by defining a group of files as a variable at the beginning of the file and use that variable in dependency lists, but that doesn't allow to execute code at the end of such a phase.</p>
  
  <p>Is there some better way to name a group of dependencies?</p>
  
  <h2>Example makefile</h2>
  
  <pre><code>config.ini: PREPROCESS
      touch $@
  
  .PHONY: clean
  
  PREPROCESS: preproc.ini preproc.x
      : ./print_preprocess_report
  
  preproc.ini:
      touch $@
  
  preproc.x:
      touch $@
  
  clean:
      rm -f preproc.ini preproc.x config.ini
  </code></pre>