title: qmake pre-build step before ANY compilation
body: <p>There are several questions on SO regarding how to create a pre-build step for <code>qmake</code>, I can do that with this in my <code>.pro</code> file:</p>
  
  <pre><code>versionTarget.target = ../VersionData/versioning.h
  versionTarget.depends = FORCE
  win32: versionTarget.commands = cd $$PWD; python.exe ./version_getter.py -p $$TARGET
  else:  versionTarget.commands = cd $$PWD; python ./version_getter.py -p $$TARGET
  
  PRE_TARGETDEPS += ../VersionData/versioning.h
  QMAKE_EXTRA_TARGETS += versionTarget
  </code></pre>
  
  <p>Now, the problem is that this approach is not a build step per se but just another build target, so if I have the <code>-j</code> flag configured for <code>make</code> it runs my script in <em>parallel</em> with the other build jobs.  This is very bad, because my script creates/updates a header file - having it change part way through the compilation is not acceptable.</p>
  
  <p>So, is there anyway I can have this script executed before <em>any</em> compilation is ran?  I know I can create another script and call the <code>version_getter.py</code> and <code>qmake</code> in sequence from that, but this is not desirable as I would have to compile from the command line rather than from within Qt Creator.</p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>The complete <code>.pri</code> file that is included by every one of my sub-projects is below:</p>
  
  <pre><code>CONFIG += thread
  QT += core \
        gui
  
  versionTarget.target = ../VersionData/versioning.h
  versionTarget.depends = FORCE
  win32: versionTarget.commands = cd $$PWD; python.exe ./version_getter.py -p $$TARGET
  else:  versionTarget.commands = cd $$PWD; python ./version_getter.py -p $$TARGET
  
  PRE_TARGETDEPS += ../VersionData/versioning.h
  QMAKE_EXTRA_TARGETS += versionTarget
  
  DEPENDPATH += ../VersionData
  INCLUDEPATH += ../VersionData
  HEADERS += ../VersionData/versioning.h
  
  UI_HEADERS_DIR = $${_PRO_FILE_PWD_}/include/Qui
  DESTDIR = $(SYREN_PATH)
  
  !win32-msvc {
      QMAKE_CXXFLAGS += -std=c++0x
  }
  </code></pre>
  
  <p>But this still results in the same parallel behaviour.  I thought it may have been due to my use of <code>ccache</code>, but turning it off made no difference (other than being much slower of course).</p>