From 28e9867a3c3f6fe20c2e2d04fa295667f7ff1270 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 20 Mar 2017 12:08:14 +0100 Subject: don't try to timestamp injected qvulkanfunctions.h the target of the injected forwarding header doesn't exist at qmake time, as it is generated by an extra compiler, so the touch() calls in qt_module_headers.prf would fail. the error scenario described in ce942a226 is not applicable to gui/vulkan, as no bootstrapped modules are involved. therefore, we can just suppress the timestamping. Change-Id: I1c9b6fcdf3717069fdbb654e3cb5d73b199192f4 Reviewed-by: Friedemann Kleint Reviewed-by: Joerg Bornemann Reviewed-by: Laszlo Agocs --- bin/syncqt.pl | 7 +++++-- mkspecs/features/qt_module_headers.prf | 7 ++++--- sync.profile | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/syncqt.pl b/bin/syncqt.pl index 372aa2b331..d62ffcbc37 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -1004,13 +1004,16 @@ foreach my $lib (@modules_to_sync) { @headers = grep(!/^qt[a-z0-9]+-config(_p)?\.h$/, @headers); if (defined $inject_headers{$subdir}) { foreach my $if (@{$inject_headers{$subdir}}) { - @headers = grep(!/^\Q$if\E$/, @headers); #in case we configure'd previously + my $cif = $if; + $cif =~ s/^\^//; + @headers = grep(!/^\Q$cif\E$/, @headers); #in case we configure'd previously push @headers, "*".$if; } } my $header_dirname = ""; foreach my $header (@headers) { my $shadow = ($header =~ s/^\*//); + my $no_stamp = $shadow && ($header =~ s/^\^//); $header = 0 if ($header =~ /^ui_.*\.h$/); foreach (@ignore_headers) { $header = 0 if($header eq $_); @@ -1106,7 +1109,7 @@ foreach my $lib (@modules_to_sync) { $pri_install_pfiles.= "$pri_install_iheader ";; } $pri_injections .= fixPaths($iheader, "$out_basedir/include/$lib") - .":".fixPaths($oheader, "$out_basedir/include/$lib") + .":".($no_stamp ? "^" : "").fixPaths($oheader, "$out_basedir/include/$lib") .$injection." " if ($shadow); } diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index 5139a08ec5..06117a6bc2 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -119,18 +119,19 @@ exists($$OUT_PWD/qt$${MODULE}-config.h) { for (injection, SYNCQT.INJECTIONS) { injects = $$split(injection, :) dst_hdr = $$absolute_path($$member(injects, 0), $$MODULE_INC_OUTDIR) - fwd_hdr = $$member(injects, 1) + ofwd_hdr = $$member(injects, 1) + fwd_hdr = $$replace(ofwd_hdr, ^\\^, ) MAIN_FWD = $$MODULE_INC_OUTDIR/$$fwd_hdr MAIN_FWD_CONT = '$${LITERAL_HASH}include "$$relative_path($$dst_hdr, $$dirname(MAIN_FWD))"' write_file($$MAIN_FWD, MAIN_FWD_CONT)|error() - touch($$MAIN_FWD, $$dst_hdr) + equals(fwd_hdr, ofwd_hdr): touch($$MAIN_FWD, $$dst_hdr) !git_build: QMAKE_DISTCLEAN += $$MAIN_FWD injects = $$member(injects, 2, -1) for (inject, injects) { CLASS_FWD = $$MODULE_INC_OUTDIR/$$inject CLASS_FWD_CONT = '$${LITERAL_HASH}include "$$fwd_hdr"' write_file($$CLASS_FWD, CLASS_FWD_CONT)|error() - touch($$CLASS_FWD, $$dst_hdr) + touch($$CLASS_FWD, $$MAIN_FWD) !git_build: QMAKE_DISTCLEAN += $$CLASS_FWD } } diff --git a/sync.profile b/sync.profile index 5c42a27708..8ef2a126b3 100644 --- a/sync.profile +++ b/sync.profile @@ -84,5 +84,5 @@ my @zlib_headers = ( "zconf.h", "zlib.h" ); @ignore_for_qt_begin_namespace_check = ( "qt_windows.h", @zlib_headers, @angle_headers); %inject_headers = ( "$basedir/src/corelib/global" => [ "qconfig.h", "qconfig_p.h" ], - "$basedir/src/gui/vulkan" => [ "qvulkanfunctions.h" ] + "$basedir/src/gui/vulkan" => [ "^qvulkanfunctions.h" ] ); -- cgit v1.2.3