Commit Graph

7860 Commits

Author SHA1 Message Date
Bjoern Breitmeyer
00f9ac93c2 Fixed Wince Makefile environment
Integrated the checksdk tool into qmake and made
the makefiles selfcontained, so configure make, is now
enough to build qt for wince

Change-Id: I29076702eca2ec23d4d06bb3d5c5cef9d4f95161
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
2f1762535b make missing qt modules fatal
there is no point in continuing; it will error out later (in more
cryptic ways) anyway.

Change-Id: I2562eadc2d91bfaa6e85368dc3774da31409a141
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
0fdf7c3a43 less confusing wording
Change-Id: Ia509fe1a28de803673623d425f5949b35404598c
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
1ee462604b fix misnomer: qt_module.prf => qt_build_config.prf
qt_module suggests to be congruent to qt_plugin.

Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
b3a497d781 fix regexp in qmodule.pri inclusion check
this also allows us removing the redundant flag variable

Change-Id: If26d22280ce7bc2ef3514c7c11ce7cd9baec1293
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
575a516630 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
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
e6d97f3f77 support for private depends in modules
if a module's private headers add additional dependencies, QT_PRIVATE is
now the place to declare them. note however, that this may not contain
other private headers in turn - that would be much harder to implement,
and we want the explicitness anyway.

Change-Id: Ic516fcf1a003c95798df4fbe216f92016afaf47e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
5290f6df89 introduce $$QMAKE_CHK_EXISTS_GLUE
instead of hard-coding platform differences, use a variable.

Change-Id: I20e98811ad5f07429148c6f88aedbabc3ba58fff
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
45a201b6a3 centralize definitions of shell commands
there are only two types. everything else is duplication.

Change-Id: I87f2bdd3d56b94bb2ecdb60e8861afeb9af3666f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
3c144b54cf normalize $$QMAKE_QMAKE
everything in the projects should be normalized. only the makefile
generators need to adjust it to the native form.

Change-Id: I06a4e997f32134d13949ec4a9dd1b44367aab7cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
2cfde5d9c3 correctly find idc even for makefiles
this is a qt tool, so it needs appropriate treatment

Change-Id: I0cb30ba07e03c72ee275cd916ca0a39a99fc3705
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
46d35cc566 fix in-/out-dir mixup
no point in entering the outdir and leaving the indir.
this doesn't really matter except for the obsolete borland generator,
but whatever.

Change-Id: Ieb4e4c549ebd65f99e4d00819c52822968b060a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
4fdd663208 remove unnecessary conditional
the code above already deals with the differences

Change-Id: Ifb799e46f5187e7bd3d0f0169e868ad267bcfe23
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
d83619f65f remove duplicate assignments of MKDIR & CHK_DIR_EXISTS
Change-Id: I314659a1ba25227380176dc65a9c81e3c6df28c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
a40469ce57 unobfuscate makefiles re $(CHK_DIR_EXISTS)
no need to define an obscure variable for it. just inline it.
the assignments are left in for compatibility with hand-written commands.

Change-Id: I9bc3914e2c4116f3b8fe00a421ca0f036bb7e214
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
76f0ce06e2 make 'qmake_all' targets respect .depends and CONFIG+=ordered
Change-Id: I010a9886ee0d40e4319cb6bd873b038336a42111
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
2bbd50c6e4 make 'qmake_all' target of SUBDIRS projects properly recursive
so far it would rebuild the makefiles one level down only, which is
somewhat arbitrary and not really helpful.

Change-Id: I5fe01f379ecc4b210610a674d7df7dfc18131eef
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
76ed07168d make 'qmake' target of SUBDIRS projects non-recursive
that's consistent with other projects. 'qmake_all' can be used for
recursion.

Change-Id: Ie6d620f7a3e0e28d3f2f82f01ca94c2f46137c68
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
0e6ddb71cc don't use $(MAKEFILE) to refer to SUBDIRS' makefiles
$(MAKEFILE) is our own file, and using it would wreak havoc if it was
named anything but Makefile.

Change-Id: I51cae2014a85399b409f18788f864ff2a82e493e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
91cf67c85d do not add "/." to _PRO_FILE_PWD_
if a "subdir" project added a project file from the same directory as
itself, "/." would be appended to the path, which is obviously not useful.

Change-Id: Ia733dedb57e568c5cf9a3d5eb29727176a5142c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:04 +02:00
Oswald Buddenhagen
3d31e39f13 don't refer to removed headers
Change-Id: Ib1d51f8fb6078c6ac365b455bde5bebf66b13b15
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:04 +02:00
Oswald Buddenhagen
426d1ef0c1 allow projects to suppress qmake recursion
webkit does some unholy tricks with the ordering of qmake and make
invocations, so it does not work with qmake -r. to make it still
possible to integrate it into the qt5 aggregator project, give it a
chance to "break out" from the recursion.

Change-Id: I926836e44c0e0790cdd90e6b0c8f766dccc33c4d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:04 +02:00
Oswald Buddenhagen
98470fd9be scan module path backwards
the last read file wins, so reading in inverse order ensures that we
respect the list's sorting by decreasing priority.

Change-Id: I2e6539a52d4195ed6af4c0143b035c39577b8310
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:04 +02:00
Oswald Buddenhagen
a56ef02b2d let default_pre add modules to the qmake path
that way qmake is made aware of the forwarding pris which are generated
for this module even when a top-level .qmake.cache prevents the module's
root from being found automatically.
the path is also added to the cache, so that subsequent partial
qmake-ing of the tree will still find the module.

this also makes the -cache-module-fwd parameter of syncqt useless, so
remove it.

Change-Id: I2afbc52a465c0b3260e9bcaf032c43a82ae8061f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
a943f40483 recognize QMAKEMODULES env var, property and cache variable
the latter allows sub-projects to dynamically extend the qmake search path
specifically for modules. the others are just for congruency with
QMAKEPATH and QMAKEFEATURES.

Change-Id: I0c099035f8dc8ee8645566dbc635644a15ed9da5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
e78c3bb620 look for mkspecs/ even below .qmake.cache/.conf-determined root
otherwise a cache/config in an aggregator project may unduly hide the
mkspecs/ of the aggregated project from qmake's view.

Change-Id: Idb0b124de071822f8f55463d9f8a4d194ef3130e
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
1f83f0cf2a add support for a super cache
qmake will now look for .qmake.super, just like it looks for .qmake.cache,
and the cache() function has a mode to write this super cache.
this allows the creation of aggregator projects like, say, qt5.
a notable difference to the normal cache is that this file is *not* added
as a dependency of the Makefile. this means that modifications done by
later sub-projects will not cause a re-processing of earlier projects, and
consequently that one should be cautious regarding what information to
store there.
another notable difference is that this file is read *before* the spec,
so the spec can use the variables from the cache without resorting to
$$fromfile() & co.

Change-Id: I4807b6d34014261fa9eebd6f0ae128b802d86691
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
16d5b6911f look for .qmake.conf files
this is the source dir equivalent of .qmake.cache and can be checked
into the repository. it can be used to make project-wide settings, or
just to signal the presence of an mkspecs/ directory.

Change-Id: I5f1cebad2aa2a89e78089341b2051613b6b7a613
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:02 +02:00
Oswald Buddenhagen
f86f3613a5 find .qmake.cache for subprojects independently
this allows the creation of aggregator projects, like, say, qt5.
this is not expected to have a negative impact, as no project could
reasonably expect a nested .qmake.cache to *not* take effect - in fact,
if the project was processed stand-alone, it would already use it.

Change-Id: I33f2935d309baba7e95465f2fefb8231c4f03eda
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:02 +02:00
Oswald Buddenhagen
c80697cfbe allow setting QMAKEPATH and QMAKEFEATURES in .qmake.cache
Change-Id: Ie383abb57c06cb49d38345d64750837b8fe14c70
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:02 +02:00
Oswald Buddenhagen
e894155a41 don't duplicate project_build_root's calculation needlessly
Change-Id: Id2f343c450149b13b52c2cae8eb6eb4bfd73fc03
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:02 +02:00
Oswald Buddenhagen
32042413f2 move generation of module master headers to qt_module_headers
this has the advantage that the %mastercontent assignments in sync.profile
are not necessary any more. as it happens, most modules got them wrong
anyway.

Change-Id: Ibdf689be408f18e1d90c44ef4ecacd7c24b1f1c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
8dba9e50ac make master phonon compat header a forwarding header
instead of writing the same file twice, just forward to the compat
header, like it is done for every other header.

Change-Id: I8c908f80149aff4720cca6d51ab5b550c31f78b1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
eae5135808 remove detection-based usage of modules which are frameworks
each qt module comes properly declared and located, so there is simply
no point in performing a search.

Change-Id: I86fad21bb8e128b85f1000cc116cc44a23642eb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
a0374fd490 fix direct includes from modules which are frameworks
Change-Id: I1f2c1e5ebdb2fa258500a08b32dcafb4150ee424
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
5cea63d2f2 let modules which are frameworks remember that fact
this will allow us to not rely on the modules matching the global
qt_framework setting.

Change-Id: Ic1dce757ff63d06af54a2428e23a1bbcf1c81ba1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
88a07df5e5 remove workarounds for broken syncqt
SYNCQT.HEADER_FILES contains qconfig.h just fine nowadays.

Change-Id: I52b35d2ac41d772acaef06f3931df75742c867cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
c595988a58 automatically add QT_BUILD_FOO_LIB to DEFINES
Change-Id: I35d9861e48469eb5cc8824e361450684047e6559
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
0f548b1744 remove backwards compatibility hacks
there won't be terribly many projects relying on it. now's the time to
find out for sure ...

this reverts commit 3279b07302fde0eb14f9b197c9ad2e14d512817e

Change-Id: Id36687ab3bfc7dd5ce35b584621a8f5b3ee00fc9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:00 +02:00
Oswald Buddenhagen
6fb0b7f5fc clean up projects from QPRO_PWD nonsense, etc.
Change-Id: I4c41aedf5bfb37e31ad202cacd2312b0bdb168e2
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:59 +02:00
Oswald Buddenhagen
131ba187f2 auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTION
less boilerplate, more accuracy

Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:59 +02:00
Oswald Buddenhagen
f3cca88ac4 move QMAKE_PKGCONFIG_VARIABLES stuff out of qt_module_config.prf
this only needs to be set in one module each - the one which provides
the relevant tool.

this is moderately source-incompatible, in that a package which queries
a given variable from the wrong library won't get the path it looks for
any more. as it's likely that everyone was using QtCore as a reference
anyway, this will only affect uic - which is in the new QtWidgets
library, to which people need to adjust anyway.

Change-Id: If05d3c33fda6cd12466e261391b825c59651d3e4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:59 +02:00
Oswald Buddenhagen
19009cde45 remove ACTIVEQT_IDC assignment from QMAKE_IDC
the specs have been cleaned of it

Change-Id: Ica0ab4d5f9d36f1f9566759326f3b3144e34cd67
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:59 +02:00
Oswald Buddenhagen
65c1ed6281 remove support for CONFIG+=qt_compat
this is truly prehistoric stuff

Change-Id: Ia781fc03c081bff895f4d2b5325d3624441bdf5f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
8b75fc7bac don't explicitly inject qt header/library paths
the modules already do that on demand.

Change-Id: I889a5cd7b62631e2551ada4b096f20b3b79b2c75
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
4816ca6c56 always add library path from module
that way we can theoretically support modules outside $QTDIR.
also, it's just cleaner.

Change-Id: I6139ebc7328b64ace8552b3e54f9a8c69248ceec
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
5d1b4c79d2 make module includepath addition less convoluted
don't prepend the paths, as this will only mess up building of
subsequent modules (e.g., building qtdeclarative against an installed
qtbase would pick up the headers from the qtdeclarative previously
installed into the same directory as qtbase).
for frameworks this was a rather pointless exercise in the first place,
as their headers are properly isolated anyway.

however, make sure that we don't add system locations to the search
paths, as this is a) unnecessary and b) messes up subsequent libraries
in non-standard locations which want to shadow versions in standard
locations (pkg-config .pc files which add standard paths are considered
broken as well).

Change-Id: Ie1dc65d4767e98e1df6e49012505141935a6c704
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
46ae5598e5 add qtCompileTest()
this fully replaces qtmodule-configtests.
it is way shorter and it actually integrates reasonably with qmake.

Change-Id: I819cc6807ad3661c419b54fa253894936dd88a64
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:57 +02:00
Oswald Buddenhagen
2d8dd9a6c9 do not route qtmodule-configtests invocation through syncqt
there is completely no reason to do it.

Change-Id: Ie186ef4c1bbd12c256acb2fe374d12ebe777d6c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:57 +02:00
Oswald Buddenhagen
0b37ec3321 don't use qt_module_config for winmain
it is not really a Qt module, and pretending causes some messups.

Change-Id: Id0980f7c00d6d176dd4937f8b265b8b571aa1277
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:44:56 +02:00