Sort all readdirs, so the output is reliable

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>
This commit is contained in:
Marius Storm-Olsen 2011-07-20 15:42:26 +00:00 committed by Qt by Nokia
parent 4686b7af03
commit e41f377587

View File

@ -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") &&