Hi,

Found a small issue with buildzip.pl on Cygwin. abs_path() fails, terminating the script, if the path in question can't be found. This causes an SDL build to fail if the simdisk/.rockbox folder doesn't exist, when checking if $bindir and $src are the same.

As a work-around, I moved a glob_mkdir($bindir) up a bit, like this:

Index: tools/buildzip.pl
===================================================================
--- tools/buildzip.pl   (revision 28482)
+++ tools/buildzip.pl   (working copy)
@@ -126,15 +126,17 @@
         die "ERROR: No PREFIX given\n"
     }

+    # On Cygwin, the path must exist for abs_path to work
+    unless (glob_mkdir($bindir)) {
+        return 0;
+    }
+
     if ((!$app) && $src && (abs_path($bindir) eq abs_path($src))) {
         return 1;
     }

     # binary
     unless ($exe eq "") {
-        unless (glob_mkdir($bindir)) {
-            return 0;
-        }
         glob_install($exe, $bindir, "-m 0775");
     }

Any suggestions for a better solution (my Perl skills are limited)? Or is it OK to commit this?

--
  Magnus

Reply via email to