From 150408e37d58c64509e7183014593c51f370415b Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Date: Fri, 7 Jun 2013 15:55:30 +0200
Subject: [PATCH] don't process ANGLE and zlib headers like real qt modules

we run syncqt on them only to get normal forwarding headers and the
headers.pri file. the module master include header and the module
version header are useless, and scanning for qt class names just wastes
time.

Change-Id: I58e8d1eb36cea5c31cbd46ce673438316d1963dc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
---
 bin/syncqt.pl | 11 ++++++++---
 sync.profile  |  8 ++++----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/bin/syncqt.pl b/bin/syncqt.pl
index 497e8deb2c4..cc91a11de0a 100755
--- a/bin/syncqt.pl
+++ b/bin/syncqt.pl
@@ -837,7 +837,9 @@ foreach my $lib (@modules_to_sync) {
     die "No such module: $lib" unless(defined $modules{$lib});
 
     #iteration info
-    my @dirs = split(/;/, $modules{$lib});
+    my $module = $modules{$lib};
+    my $is_qt = !($module =~ s/^!//);
+    my @dirs = split(/;/, $module);
     my $dir = $dirs[0];
 
     my $pathtoheaders = "";
@@ -946,7 +948,7 @@ foreach my $lib (@modules_to_sync) {
                         }
 
                         my $iheader = $subdir . "/" . $header;
-                        my @classes = $public_header && !$minimal ? classNames($iheader) : ();
+                        my @classes = $public_header && (!$minimal && $is_qt) ? classNames($iheader) : ();
                         if($showonly) {
                             print "$header [$lib]\n";
                             foreach(@classes) {
@@ -1056,7 +1058,7 @@ foreach my $lib (@modules_to_sync) {
         "#include \"".lc($lib)."version.h\"\n" .
         "#endif\n";
 
-    unless ($showonly || $minimal) {
+    unless ($showonly || $minimal || !$is_qt) {
         # create deprecated headers
         my $first = 1;
         while (my ($header, $include) = each %{$deprecatedheaders{$lib}}) {
@@ -1141,7 +1143,9 @@ foreach my $lib (@modules_to_sync) {
         my $master_include = "$out_basedir/include/$lib/$lib";
         $pri_install_files .= fixPaths($master_include, $dir) . " ";
         writeFile($master_include, $master_contents, $lib, "master header");
+    }
 
+    unless ($showonly || $minimal) {
         #handle the headers.pri for each module
         my $headers_pri_contents = "";
         $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n";
@@ -1174,6 +1178,7 @@ unless($showonly || !$create_uic_class_map) {
 
 if($check_includes) {
     foreach my $lib (@modules_to_sync) {
+        next if ($modules{$lib} =~ /^!/);
             #calc subdirs
             my @subdirs = listSubdirs(map { s/^\^//; $_ } split(/;/, $modules{$lib}));
 
diff --git a/sync.profile b/sync.profile
index 3d89d9d71f3..91503d425f1 100644
--- a/sync.profile
+++ b/sync.profile
@@ -11,10 +11,10 @@
     "QtDBus" => "$basedir/src/dbus",
     "QtConcurrent" => "$basedir/src/concurrent",
     "QtPlatformSupport" => "$basedir/src/platformsupport",
-    "KHR" => "$basedir/src/3rdparty/angle/include/KHR",
-    "GLES2" => "$basedir/src/3rdparty/angle/include/GLES2",
-    "EGL" => "$basedir/src/3rdparty/angle/include/EGL",
-    "QtZlib" => "$basedir/src/3rdparty/zlib",
+    "KHR" => "!$basedir/src/3rdparty/angle/include/KHR",
+    "GLES2" => "!$basedir/src/3rdparty/angle/include/GLES2",
+    "EGL" => "!$basedir/src/3rdparty/angle/include/EGL",
+    "QtZlib" => "!$basedir/src/3rdparty/zlib",
     "QtOpenGLExtensions" => "$basedir/src/openglextensions",
 );
 %moduleheaders = ( # restrict the module headers to those found in relative path
-- 
GitLab