diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-03-20 21:21:38 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-04-12 15:42:59 +0000 |
commit | 9c4c136bc9f29bab1cc9684dfced55a92a8bbe96 (patch) | |
tree | 40241dec0d2f439b717805bcc86a2bc2a789eafa /bin | |
parent | 1a71fe0306d8d8984d62d83e2cd616b9bac7e2fe (diff) | |
download | qtbase-9c4c136bc9f29bab1cc9684dfced55a92a8bbe96.tar.gz |
rework syncqt interaction regarding cross-tree paths
instead of relying on more or less accidental qmake behaviors regarding
the base dir for relative paths (esp. if a file does not exist yet),
make everything explicit. to that effect, clearly define the base tree
(source or build) for every syncqt-generated variable, and write only
in-tree relative paths to the variables. on the receiving end, resolve
the paths as soon as headers.pri was read.
Task-number: QTBUG-67111
Change-Id: I32ae5760fb62ebc650fdb69e46aac786a8141564
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt.pl | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/bin/syncqt.pl b/bin/syncqt.pl index d3e500b68f..c6aced4412 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -920,7 +920,7 @@ foreach my $lib (@modules_to_sync) { $allheadersprivate = 1 if $allmoduleheadersprivate{$lib}; #information used after the syncing - my $pri_install_classes = ""; + my $pri_install_gfiles = ""; my $pri_install_files = ""; my $pri_install_ifiles = ""; my $pri_install_pfiles = ""; @@ -1086,9 +1086,9 @@ foreach my $lib (@modules_to_sync) { # if ($class =~ m/::/) { # $class =~ s,::,/,g; # } - my $class_header = fixPaths("$out_basedir/include/$lib/$class", $dir) . " "; - $pri_install_classes .= $class_header - unless($pri_install_classes =~ $class_header); + my $class_header = "$class "; + $pri_install_gfiles .= $class_header + unless($pri_install_gfiles =~ $class_header); $injection .= ":$class"; } @@ -1198,7 +1198,7 @@ foreach my $lib (@modules_to_sync) { } } - $pri_install_files .= fixPaths($header_path, $dir) . " "; + $pri_install_gfiles .= "$header "; } if ($verbose_level < 3) { print " }\n" unless ($first); @@ -1208,8 +1208,7 @@ foreach my $lib (@modules_to_sync) { my $vheader = "$out_basedir/include/$lib/".lc($lib)."version.h"; my $VHeader = "$out_basedir/include/$lib/${lib}Version"; syncHeader($lib, $VHeader, $vheader, 0); - $pri_install_files .= fixPaths($vheader, $dir) . " "; - $pri_install_classes .= fixPaths($VHeader, $dir) . " "; + $pri_install_gfiles .= lc($lib)."version.h ${lib}Version "; my @versions = split(/\./, $module_version); my $modulehexstring = sprintf("0x%02X%02X%02X", $versions[0], $versions[1], $versions[2]); my $vhdrcont = @@ -1225,7 +1224,7 @@ foreach my $lib (@modules_to_sync) { writeFile($vheader, $vhdrcont, $lib, "version header"); my $master_include = "$out_basedir/include/$lib/$lib"; - $pri_install_files .= fixPaths($master_include, $dir) . " "; + $pri_install_gfiles .= "$lib "; writeFile($master_include, $master_contents, $lib, "master header"); } @@ -1234,7 +1233,7 @@ foreach my $lib (@modules_to_sync) { my $headers_pri_contents = ""; $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n"; $headers_pri_contents .= "SYNCQT.INJECTED_HEADER_FILES = $pri_install_ifiles\n"; - $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n"; + $headers_pri_contents .= "SYNCQT.GENERATED_HEADER_FILES = $pri_install_gfiles\n"; $headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n"; $headers_pri_contents .= "SYNCQT.INJECTED_PRIVATE_HEADER_FILES = $pri_install_ipfiles\n"; $headers_pri_contents .= "SYNCQT.QPA_HEADER_FILES = $pri_install_qpafiles\n"; |