diff options
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-x | bin/syncqt | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/bin/syncqt b/bin/syncqt index 8fa253a733..3d25ecc817 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -747,6 +747,21 @@ mkpath "$out_basedir/include/Qt", !$quiet; foreach my $lib (@modules_to_sync) { #iteration info my $dir = $modules{$lib}; + my $module_version = ""; + + if (-e "$modulepris{$lib}") { + my $content = fileContents($modulepris{$lib}); + my @version_rows = grep(/QT\..*\.VERSION/, split('\n', $content)); + if(@version_rows) { + # We only pick the first one, since each module need a separate .pri file + $module_version = $version_rows[0]; + chomp $module_version; + $module_version =~ s/^\s*QT\..*\.VERSION\s*=\s*([^#]+).*$/$1/; + $module_version =~ s/\s+$//; + } + } + print "WARNING: Module $lib\'s pri missing QT.<module>.VERSION variable! Private headers not versioned!\n" if (!$module_version); + my $pathtoheaders = ""; $pathtoheaders = $moduleheaders{$lib} if ($moduleheaders{$lib}); @@ -766,6 +781,7 @@ foreach my $lib (@modules_to_sync) { chomp $line; if($line =~ /^ *QT *\+?= *([^\r\n]*)/) { foreach(split(/ /, $1)) { + $_ =~ s/-private$//; my $content = $mastercontent{$_}; $master_contents .= $content if ($content); } @@ -913,7 +929,11 @@ foreach my $lib (@modules_to_sync) { } } } elsif ($create_private_headers) { - @headers = ( "$out_basedir/include/$lib/private/$header" ); + if ($module_version) { + @headers = ( "$out_basedir/include/$lib/$module_version/$lib/private/$header" ); + } else { + @headers = ( "$out_basedir/include/$lib/private/$header" ); + } } foreach(@headers) { #sync them $header_copies++ if(syncHeader($_, $iheader, $copy_headers && !$shadow, $ts)); |