}
ctor_func = args [++i];
break;
+ case "--dos2unix":
+ case "--dos2unix=true":
+ use_dos2unix = true;
+ break;
+ case "--dos2unix=false":
+ use_dos2unix = false;
+ break;
default:
sources.Add (args [i]);
break;
ts.WriteLine ();
}
ts.Close ();
+
+ string assembler = GetEnv ("AS", IsUnix ? "as" : "i686-pc-mingw32-as");
Console.WriteLine ("Compiling:");
- string cmd = String.Format ("{0} -o {1} {2} ", GetEnv ("AS", "as"), temp_o, temp_s);
+ string cmd = String.Format ("{0} -o {1} {2} ", assembler, temp_o, temp_s);
int ret = Execute (cmd);
if (ret != 0){
Error ("[Fail]");
" -L path Adds `path' to the search path for assemblies\n" +
" --nodeps Turns off automatic dependency embedding (default)\n" +
" --deps Turns on automatic dependency embedding\n" +
+ " --dos2unix[=true|false]\n" +
+ " When no value provided, or when `true` specified\n" +
+ " `dos2unix` will be invoked to convert paths on Windows.\n" +
+ " When `--dos2unix=false` used, dos2unix is NEVER used.\n" +
" --keeptemp Keeps the temporary files\n" +
" --config F Bundle system config file `F'\n" +
" --config-dir D Set MONO_CFG_DIR to `D'\n" +
return system (cmdLine);
}
-#if XAMARIN_ANDROID
// on Windows, we have to pipe the output of a
// `cmd` interpolation to dos2unix, because the shell does not
// strip the CRLFs generated by the native pkg-config distributed
}
// and if there is no dos2unix, just run cmd /c.
if (use_dos2unix == false) {
-#endif
Console.WriteLine (cmdLine);
ProcessStartInfo dos2unix = new ProcessStartInfo ();
dos2unix.UseShellExecute = false;
p.WaitForExit ();
return p.ExitCode;
}
-#if XAMARIN_ANDROID
}
-#endif
StringBuilder b = new StringBuilder ();
int count = 0;
for (int i = 0; i < cmdLine.Length; i++) {
if (cmdLine [i] == '`') {
-#if XAMARIN_ANDROID
if (count % 2 != 0) {
b.Append ("|dos2unix");
}
-#endif
count++;
}
b.Append (cmdLine [i]);