Close filehandle when done
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>
Mon, 18 Jul 2011 12:08:12 +0000 (07:08 -0500)
committerQt by Nokia <qt-info@nokia.com>
Thu, 21 Jul 2011 18:40:51 +0000 (20:40 +0200)
Also add a fixme, since the version headers are currently
being created in the source directory.

Change-Id: If6e9eeba854a1f35561b69518eb8739dc28a58be
Reviewed-on: http://codereview.qt.nokia.com/1763
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
bin/syncqt

index 776ee9c..afa3238 100755 (executable)
@@ -870,6 +870,7 @@ foreach my $lib (@modules_to_sync) {
         my $modulepri = $modulepris{$lib};
         if (-e $modulepri) {
             my $modulepriname = basename($modulepri);
+            # FIXME: this creates a file in the source location for shadow-builds
             my $moduleversionheader = "$modules{$lib}/" . lc($lib) . "version.h";
             my $modulehexstring = sprintf("0x%02X%02X%02X", int($module_major_version), int($module_minor_version), int($module_patch_version));
             open MODULE_VERSION_HEADER_FILE, ">$moduleversionheader";
@@ -882,6 +883,8 @@ foreach my $lib (@modules_to_sync) {
             print MODULE_VERSION_HEADER_FILE "#define " .uc($lib) . "_VERSION $modulehexstring\n", ;
             print MODULE_VERSION_HEADER_FILE "\n";
             print MODULE_VERSION_HEADER_FILE "#endif // QT_". uc($lib) . "_VERSION_H\n";
+            close MODULE_VERSION_HEADER_FILE;
+            print "$moduleversionheader created for $lib\n" if(!$quiet);
         } elsif ($modulepri) {
             print "WARNING: Module $lib\'s pri file '$modulepri' not found.\nSkipped creating module version header for $lib.\n";
         }