Skip to content

Commit ff1993a

Browse files
grendellodellis1972
authored andcommitted
Build stuff (#17)
* Add the V make parameter to enable verbose logging Setting V to anything than 0 (zero) enables verbose logging for {ms,x}build as well as exports MONO_OPTIONS=--debug to enable stack traces should an exception be thrown when running mono. To add/override MONO_OPTIONS simply set it on the command line when invoking make, for instance: make V=1 MONO_OPTIONS="--trace" * File.Move doesn't overwrite targets File.Move will throw an exception whenever the target file exists. Assuming that the task should overwrite the existing target files for smooth operation, this change checks whether the target file exists and, if so, deletes it prior to calling File.Move
1 parent 39c5905 commit ff1993a

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
V ?= 0
12
CONFIGURATION = Debug
23
MSBUILD = xbuild /p:Configuration=$(CONFIGURATION) $(MSBUILD_ARGS)
34

5+
ifneq ($(V),0)
6+
MONO_OPTIONS += --debug
7+
MSBUILD += /v:d
8+
endif
9+
10+
ifneq ($(MONO_OPTIONS),)
11+
export MONO_OPTIONS
12+
endif
13+
414
all:
515
$(MSBUILD)
616

src/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks/UnzipDirectoryChildren.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ async TTask ExtractFile (string tempDir, string sourceFile, string relativeDestD
112112
Log.LogMessage (MessageImportance.Low, $"mv '{fse}' '{dest}'");
113113
if (Directory.Exists (fse))
114114
Process.Start ("/bin/mv", $@"""{fse}"" ""{dest}""").WaitForExit ();
115-
else
115+
else {
116+
if (File.Exists (dest))
117+
File.Delete (dest);
116118
File.Move (fse, dest);
119+
}
117120
}
118121
}
119122
}

0 commit comments

Comments
 (0)