summaryrefslogtreecommitdiff
path: root/build.cmd
diff options
context:
space:
mode:
authorTanner Gooding <tannergooding@users.noreply.github.com>2015-05-01 10:54:04 -0700
committerTanner Gooding <tannergooding@users.noreply.github.com>2015-05-01 10:54:04 -0700
commit1272e792d82ab47c6950a99eb685150cacad98ee (patch)
tree57beb959f6c82e599b7c979c6a57d795d9fe354a /build.cmd
parent55a733da472a729d7e4a1d7de5e5458299d8f736 (diff)
downloadcoreclr-1272e792d82ab47c6950a99eb685150cacad98ee.tar.gz
coreclr-1272e792d82ab47c6950a99eb685150cacad98ee.tar.bz2
coreclr-1272e792d82ab47c6950a99eb685150cacad98ee.zip
Only clean previous output for the selected configuration.
This modifies the `build.cmd`, `build.sh`, and `buildtest.cmd` to only remove previous output (binaries, intermediates, and logs) for the selected configuration when the `clean` argument is specified. This also modifies `runtest.cmd` to output log files in the same format as `build.cmd`, `build.sh`, and `buildtest.cmd` do currently.
Diffstat (limited to 'build.cmd')
-rw-r--r--build.cmd11
1 files changed, 9 insertions, 2 deletions
diff --git a/build.cmd b/build.cmd
index 6ebdb1d1b5..3753f0e796 100644
--- a/build.cmd
+++ b/build.cmd
@@ -51,6 +51,7 @@ set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildTyp
set "__PackagesBinDir=%__BinDir%\.nuget"
set "__ToolsDir=%__RootBinDir%\tools"
set "__TestBinDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%"
+set "__TestIntermediatesDir=%__RootBinDir%\tests\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"
:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
set "__CMakeBinDir=%__BinDir%"
@@ -64,8 +65,14 @@ echo.
:: MSBuild projects would need a rebuild
set __MSBCleanBuildArgs=/t:rebuild
-:: Cleanup the binaries drop folder
-if exist "%__RootBinDir%" rd /s /q "%__RootBinDir%"
+:: Cleanup the previous output for the selected configuration
+if exist "%__BinDir%" rd /s /q "%__BinDir%"
+if exist "%__IntermediatesDir%" rd /s /q "%__IntermediatesDir%"
+
+if exist "%__TestBinDir%" rd /s /q "%__TestBinDir%"
+if exist "%__TestIntermediatesDir%" rd /s /q "%__TestIntermediatesDir%"
+
+if exist "%__LogsDir%" del /f /q "%__LogsDir%\*_%__BuildOS%__%__BuildArch%__%__BuildType%.*"
:MakeDirectories
if not exist "%__BinDir%" md "%__BinDir%"