Skip to content

Instantly share code, notes, and snippets.

@pierrejoye
Created February 12, 2016 14:58
Show Gist options
  • Save pierrejoye/0d388e627ac629ee7141 to your computer and use it in GitHub Desktop.
Save pierrejoye/0d388e627ac629ee7141 to your computer and use it in GitHub Desktop.
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index cfbcab7..5b12867 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -1309,8 +1309,26 @@ function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
MFO.WriteLine("# objects for EXT " + extname);
MFO.WriteBlankLines(1);
- ADD_SOURCES(configure_module_dirname, file_list, extname, obj_dir);
-
+ if (file_list.search(new RegExp("\\\\")) < 0 ) {
+ ADD_SOURCES(configure_module_dirname, file_list, extname, obj_dir);
+ } else {
+ file_array = file_list.split(new RegExp("\s+"));
+ file_array.sort();
+ for (f in file_array) {
+ var dirs = file_array[f].split("\\");
+
+ if (dirs.length > 1) {
+ STDOUT.WriteLine(" *** DETECTED*****");
+ var d = "";
+ for (i=0;i < dirs.length - 1; i++) {
+ d += dirs[i]+"\\";
+ }
+ STDOUT.WriteLine("******************* adding with dir " + d);
+ ADD_SOURCES(configure_module_dirname+"\\"+dirs[0], dirs[dirs.length - 1], extname, obj_dir);
+ }
+ }
+ }
+
MFO.WriteBlankLines(1);
if (shared) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment