This patch fixes a few errors that prevented Windows build in paths with spaces.

[[
On Windows: fix build in paths with spaces

* build/generator/gen_win.py
  Quote what needs to be quoted
]]
Index: build/generator/gen_win.py
===================================================================
--- build/generator/gen_win.py  (revision 1893895)
+++ build/generator/gen_win.py  (working copy)
@@ -368,7 +368,7 @@
           cbuild = ("%s -g -Xlint -Xlint:-options %s %s "
                     " -target 1.8 -source 1.8 -classpath "
                     " %s -d %s "
-                    " -sourcepath %s $(InputPath)") \
+                    " -sourcepath %s \"$(InputPath)\"") \
                    % (self.quote(javac_exe), per_project_flags, headers,
                       self.quote(classes), self.quote(targetdir),
                       self.quote(sourcepath))
@@ -436,8 +436,8 @@
                   user_deps.append(isrc)
                   continue
 
-                cbuild = '%s %s -o %s $(InputPath)' \
-                         % (self.swig_exe, " ".join(swig_options), cout)
+                cbuild = '%s %s -o %s \"$(InputPath)\"' \
+                         % (self.quote(self.swig_exe), " ".join(swig_options), 
self.quote(cout))
 
                 cdesc = 'Generating %s' % cout
 
@@ -456,7 +456,7 @@
       for header in target.msvc_export:
         deps.append(self.path('subversion/include', header))
 
-      cbuild = "%s $(InputPath) %s > %s" \
+      cbuild = "%s \"$(InputPath)\" %s > %s" \
                % (self.quote(sys.executable), " ".join(deps), def_file)
 
       cdesc = 'Generating %s ' % def_file

Reply via email to