From a85375c57f5c913fc2fd86309d840bfecd2bcc21 Mon Sep 17 00:00:00 2001 From: Kevin Simons Date: Fri, 4 Nov 2011 12:20:49 +0100 Subject: Add a new handler to syncqt for explicitly dealing with special case headers Change-Id: I83b26fc88aee0052502c0a4d385ea97f8c933c66 Reviewed-by: Oswald Buddenhagen Reviewed-by: Marius Storm-Olsen --- bin/syncqt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/syncqt b/bin/syncqt index 2523959032..3fd9316637 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -69,7 +69,7 @@ $qtbasedir = dirname(dirname($0)) if (!$qtbasedir); $qtbasedir =~ s=\\=/=g if (defined $qtbasedir); # will be defined based on the modules sync.profile -our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %mastercontent, %modulepris); +our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %mastercontent, %modulepris, %explicitheaders); # global variables (modified by options) my $isunix = 0; @@ -1057,14 +1057,24 @@ foreach my $lib (@modules_to_sync) { # if ($class =~ m/::/) { # class =~ s,::,/,g; # } - $class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n"; - $header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts)); + + if (defined $explicitheaders{$lib}{$class}) { + $header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$explicitheaders{$lib}{$class}", 0, $ts)); + } else { + $class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n"; + $header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts)); + } # KDE-Compat headers for Phonon if ($lib eq "phonon") { $header_copies++ if (syncHeader($lib, "$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0, $ts)); } } + + if ($explicitheaders{$lib}{basename($header)}) { + $header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$explicitheaders{$lib}{basename($header)}", "$out_basedir/include/$lib/$header", 0, $ts)); + } + } elsif ($create_private_headers) { if ($module_version) { @headers = ( "$out_basedir/include/$lib/$module_version/$lib/private/$header" ); @@ -1094,6 +1104,10 @@ foreach my $lib (@modules_to_sync) { $pri_install_classes .= $class_header unless($pri_install_classes =~ $class_header); } + if ($explicitheaders{$lib}{basename($iheader)}) { + my $compat_header = fixPaths("$out_basedir/include/$lib/$explicitheaders{$lib}{basename($iheader)}", $current_dir) . " "; + $pri_install_files .= $compat_header unless($pri_install_files =~ $compat_header); + } $pri_install_files.= "$pri_install_iheader ";; } } -- cgit v1.2.3