Sort all readdirs, so the output is reliable
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>
Wed, 20 Jul 2011 15:42:26 +0000 (15:42 +0000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 20 Jul 2011 15:49:23 +0000 (17:49 +0200)
We need the content of the generated module master headers to be
reliable, so rebuilding in the same environment doesn't produce
different results. This minimizes the diff from package building
systems.

Change-Id: Ic914f56e13b11f313f01f6b8666c2d28aa50a985
Reviewed-on: http://codereview.qt.nokia.com/1900
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
bin/syncqt

index a955456..776ee9c 100755 (executable)
@@ -832,7 +832,7 @@ foreach my $lib (@modules_to_sync) {
         my @subdirs = ("$out_basedir/include/$lib");
         foreach my $subdir (@subdirs) {
             if (opendir DIR, $subdir) {
-                while(my $t = readdir(DIR)) {
+                foreach my $t (sort readdir(DIR)) {
                     my $file = "$subdir/$t";
                     if(-d $file) {
                         push @subdirs, $file unless($t eq "." || $t eq "..");
@@ -895,7 +895,7 @@ foreach my $lib (@modules_to_sync) {
         my @subdirs = ($headers_dir);
         foreach my $subdir (@subdirs) {
             opendir DIR, $subdir or next;
-            while(my $t = readdir(DIR)) {
+            foreach my $t (sort readdir(DIR)) {
                 push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
                                                !($t eq "..") && !($t eq ".obj") &&
                                                !($t eq ".moc") && !($t eq ".rcc") &&
@@ -1145,7 +1145,7 @@ if($check_includes) {
             my @subdirs = ($modules{$lib});
             foreach my $subdir (@subdirs) {
                 opendir DIR, $subdir or die "Huh, directory ".$subdir." cannot be opened.";
-                while(my $t = readdir(DIR)) {
+                foreach my $t (sort readdir(DIR)) {
                     push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") &&
                                                    !($t eq "..") && !($t eq ".obj") &&
                                                    !($t eq ".moc") && !($t eq ".rcc") &&