Pre-pre-build commands with qmake
With most non-trivial Qt projects that I create, I like to include a pre-pre-build command in
the qmake
project file. I'll explain why as we go, but first
off, let's look at what I mean by "pre-pre-build" (it is not at all a standard term).
The typical build process (as performed by make looks something like this:
- For the given target, check if any of the target's dependencies have been updated since it was last (re)built.
- If no dependencies have changed, do nothing - we're done ;)
- If one or more dependencies have changed, then:
- Build each dependent target.
- Build this target.
- If appropriate, link this target with its dependencies.
That is, of course, a gross oversimplification... but it will do the purpose of this post.