summaryrefslogtreecommitdiffstats
path: root/bin/syncqt
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2011-04-20 13:57:51 -0500
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-02 15:30:08 +0200
commit1287361f64c6d429535e65c8dd248a94dfc633d1 (patch)
treeb53e7cc3d3efb44513c97f257316bba9e69abbef /bin/syncqt
parent2e8b6dcb4a6fa8ff42e967eb5dc27a461e721858 (diff)
Move private headers into versioned subdirectory
This will allow us to expose private headers in a controlled manner, and ensure that they are not used by accident. This also means that we internally will have to enable the private headers for the modules we wish to use in the project.
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-xbin/syncqt22
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));