summaryrefslogtreecommitdiffstats
path: root/scripts/qt
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-03-19 21:30:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-22 14:22:22 +0100
commite7115f55a8d7d621da46654030a72ca7ae144b56 (patch)
tree9a1a785703420f466f51ae69bd1aeeb9e11b054b /scripts/qt
parenta3299bbda33f82c3311c8ccfc18ba44cdf011ea7 (diff)
make use of <module>_BUILD_PARTS
this avoids the nasty hack of running qmake in a submodule before its dependencies have been built. Change-Id: I75d2bdab7682e07bce2ef1a4807fb28672d8c4cf Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Diffstat (limited to 'scripts/qt')
-rwxr-xr-xscripts/qt/qtmod_test.pl40
1 files changed, 12 insertions, 28 deletions
diff --git a/scripts/qt/qtmod_test.pl b/scripts/qt/qtmod_test.pl
index d2353213..f087b6f2 100755
--- a/scripts/qt/qtmod_test.pl
+++ b/scripts/qt/qtmod_test.pl
@@ -965,39 +965,29 @@ sub run_compile
my @make_args = split(/ /, $make_args);
my @commands;
+ my @qmake_args;
+ if ($qt_minimal_deps) {
+ # Qt 5 only:
+ # minimal deps mode? Then we turned off some build parts in configure, and must
+ # now explicitly enable them for this module only.
+ push @qmake_args, uc($qt_gitmodule)."_BUILD_PARTS = ".join(" ", @OPTIONAL_BUILD_PARTS);
+ }
+
if (($self->{'qt.gitmodule'} eq 'qt5') or ($self->{'qt.gitmodule'} eq 'qt')) {
# Building qt5 or qt4; just do a `make' of all default targets in the top-level makefile.
push @commands, sub { $self->exe( $make_bin, @make_args ) };
}
elsif ($module_in_qt5) {
- if ($qt_minimal_deps) {
- # minimal deps mode? Then we turned off some build parts in configure, and must
- # now explicitly enable them for this module only.
-
- if (! -e $qt_gitmodule_build_dir) {
- mkpath( $qt_gitmodule_build_dir );
- # Note, we don't have to worry about emptying the build dir,
- # because it's always under the top-level build dir, and we already
- # cleaned that if it existed.
- }
-
- push @commands, sub {
- local $CWD = $qt_gitmodule_build_dir;
- $self->exe(
- $qmake_bin,
- $qt_gitmodule_dir,
- map { "QT_BUILD_PARTS+=$_" } @OPTIONAL_BUILD_PARTS
- );
- };
- }
-
# Building a module hosted in qt5; `configure' is expected to have generated a
# makefile with a `module-FOO' target for this module, with correct dependency
# information. Issuing a `make module-FOO' should automatically build the module
# and all deps, as parallel as possible.
my $make_target = "module-$qt_gitmodule";
- push @commands, sub { $self->exe( $make_bin, @make_args, $make_target ) };
+ push @commands, sub {
+ local $ENV{'QMAKEFLAGS'} = join(" ", map { '"'.$_.'"' } @qmake_args);
+ $self->exe( $make_bin, @make_args, $make_target );
+ };
}
else {
# Building a module, hosted outside of qt5.
@@ -1019,12 +1009,6 @@ sub run_compile
push @commands, sub { chdir( $qt_gitmodule_build_dir ) };
- my @qmake_args;
- if ($qt_minimal_deps) {
- # minimal deps mode? Then we turned off some build parts in configure, and must
- # now explicitly enable them for this module only.
- push @qmake_args, map { "QT_BUILD_PARTS+=$_" } @OPTIONAL_BUILD_PARTS;
- }
push @commands, sub { $self->exe(
$qmake_bin,
$qt_gitmodule_dir,