summaryrefslogtreecommitdiffstats
path: root/bin/syncqt
diff options
context:
space:
mode:
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-xbin/syncqt30
1 files changed, 27 insertions, 3 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 45ac9d0fb0..3d25ecc817 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -558,8 +558,11 @@ sub locateSyncProfile
# check if this is an in-source build, and if so use that as the basedir too
$basedir = locateSyncProfile($out_basedir);
-$basedir = dirname($basedir) if ($basedir);
-$quoted_basedir = "\Q$basedir";
+if ($basedir) {
+ $basedir = dirname($basedir) ;
+ $basedir =~ s=\\=/=g;
+ $quoted_basedir = "\Q$basedir";
+}
# --------------------------------------------------------------------
# "main" function
@@ -624,6 +627,7 @@ while ( @ARGV ) {
die "Could not find a sync.profile for '$arg'\n" if (!$basedir);
$basedir = dirname($basedir);
$basedir =~ s=\\=/=g;
+ $quoted_basedir = "\Q$basedir";
$var = "ignore";
}
@@ -743,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});
@@ -762,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);
}
@@ -909,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));