revamp automatic makefile generation for sub-projects
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Fri, 18 May 2012 20:13:51 +0000 (22:13 +0200)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Tue, 19 Jun 2012 14:46:08 +0000 (16:46 +0200)
commit575a51663007095c8c4d14295ed6028cc18513f8
tree2df9fb4d9853a6700f8b291db11c67faf7bf5f60
parente6d97f3f77b94268edbe2a651476188cdcc8dc5d
revamp automatic makefile generation for sub-projects

instead of making the "real" targets depend on the makefiles, add
conditional makefile generation to the targets themselves.
this causes makefile generation to follow the recursion order determined
by the project, which is important when dealing with prl and module pri
files.
a side effect of this is that qmake and make calls are interleaved now,
which is entirely different from a 'qmake -r' run.

on the downside, calling make with multiple targets which operate on the
same subprojects without prior makefile generation will make a mess, as
the qmake calls will be racing. this should be no problem, as qmake does
not generate recursive targets where this would be useful - at least by
default.

it is not sufficient to just order the creation of the makefiles
non-recursively (e.g., by using gnu-specific order-only-prerequisites),
as an interrupted and subsequently resumed build would happily skip the
nested makefiles.
workable alternative approaches would be walking the entire tree in a
pre-pass to ensure makefile presence (which is incredibly slow) or
creating additional stamp files only after recursing and having the
makefiles depend on them (which is ugly).

Task-number: QTBUG-23376
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Change-Id: I88d3e7610215677d362026de316513d3bea04b06
mkspecs/common/shell-unix.conf
mkspecs/common/shell-win32.conf
qmake/generators/makefile.cpp
qmake/generators/makefile.h