diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-03-21 08:18:12 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-03-21 08:49:01 +0100 |
commit | 2ab9b747fcc5aa50e8cca758f7780158e734a222 (patch) | |
tree | 7017007823d54c2d658079e928f7220a1f57a852 /bin | |
parent | f1e681bed21e131864fe1e1c91679f7a56b06823 (diff) | |
parent | 8bfbaa41783dad66976fc83d4ca8c7e2673f5629 (diff) |
Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
configure
mkspecs/features/qt_module_headers.prf
mkspecs/features/qt_tool.prf
src/angle/angle.pro
src/tools/bootstrap/bootstrap.pro
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/bin/syncqt b/bin/syncqt index d503e3a87e..90b32a1a81 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -83,9 +83,6 @@ our $quoted_basedir; # Make sure we use Windows line endings for chomp and friends on Windows. $INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys"); -my $mkspecsdir = dirname(dirname($0)); -normalizePath(\$mkspecsdir) if (defined $mkspecsdir); - # will be defined based on the modules sync.profile our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %explicitheaders, %deprecatedheaders); our @qpa_headers = (); @@ -103,6 +100,7 @@ my $copy_headers = 0; my $create_uic_class_map = 0; my $create_private_headers = 1; my $minimal = 0; +my $module_version = 0; my @modules_to_sync ; $force_relative = 1 if ( -d "/System/Library/Frameworks" ); @@ -128,7 +126,7 @@ sub showUsage print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n"; print " -minimal Do not create CamelCase headers (default: " . ($minimal ? "yes" : "no") . ")\n"; print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n"; - print " -mkspecsdir <PATH> Set the path to the mkspecs (detected: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . ")\n"; + print " -version <VERSION> Specify the module's version (default: detect from qglobal.h)\n"; print " -quiet Only report problems, not activity (same as -verbose 0)\n"; print " -v, -verbose <level> Sets the verbosity level (max. 4) (default: $verbose_level)\n"; print " The short form increases the level by +1\n"; @@ -662,8 +660,8 @@ while ( @ARGV ) { } elsif($arg eq "-private") { $var = "create_private_headers"; $val = "yes"; - } elsif($arg eq "-mkspecsdir") { - $var = "mkspecsdir"; + } elsif($arg eq "-version") { + $var = "version"; $val = shift @ARGV; } elsif($arg =~/^-/) { print "Unknown option: $arg\n\n" if(!$var); @@ -739,12 +737,11 @@ while ( @ARGV ) { push @modules_to_sync, $module; $moduleheaders{$module} = $headerdir; $create_uic_class_map = 0; - } elsif ($var eq "mkspecsdir") { + } elsif ($var eq "version") { if($val) { - $mkspecsdir = $val; - normalizePath(\$mkspecsdir); + $module_version = $val; } else { - die "The -mkspecsdir option requires an argument"; + die "The -version option requires an argument"; } } elsif ($var eq "output") { my $outdir = $val; @@ -759,11 +756,6 @@ while ( @ARGV ) { } } -die "Cannot automatically detect/use provided path to QtBase's build directory!\n" . - "QTDIR detected/provided: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . "\n" . - "Please use the -mkspecsdir option to provide the correct path.\nsyncqt failed" - if (!$mkspecsdir || !-d $mkspecsdir); - # if we have no $basedir we cannot be sure which sources you want, so die die "Could not find any sync.profile for your module!\nPass <module directory> to syncqt to sync your header files.\nsyncqt failed" if (!$basedir); @@ -784,12 +776,12 @@ my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate; $isunix = checkUnix; #cache checkUnix -my $qt_version = fileContents($mkspecsdir."/qconfig.pri"); -if (length($qt_version)) { - $qt_version =~ s,.*^QT_VERSION[ \t]*=[ \t]*(\S+).*,$1,sm; -} else { - $qt_version = fileContents($basedir."/src/corelib/global/qglobal.h"); - $qt_version =~ s,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,$1,sm; +if (!$module_version) { + my $filco = fileContents($basedir."/src/corelib/global/qglobal.h"); + if ($filco !~ m,.*^#[ \t]*define[ \t]+QT_VERSION_STR[ \t]+"([^"]+)".*,sm) { + die "Cannot determine Qt/Module version. Use -version.\n"; + } + $module_version = $1; } foreach my $lib (@modules_to_sync) { die "No such module: $lib" unless(defined $modules{$lib}); @@ -798,11 +790,6 @@ foreach my $lib (@modules_to_sync) { my @dirs = split(/;/, $modules{$lib}); my $dir = $dirs[0]; - my $project = $dir; - $project =~ s,/([^/]+)$,/$1/$1.pro,; - my $module_version = fileContents($project); - $module_version = $qt_version unless ($module_version =~ s,.*^VERSION[ \t]*=[ \t]*(\S+).*,$1,sm); - my $pathtoheaders = ""; $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib}); |