[Tizen] Support armv7hl build
[platform/upstream/coreclr.git] / clean.cmd
1 @if not defined _echo @echo off
2 setlocal EnableDelayedExpansion
3
4 set NO_DASHES_ARG=%1
5 if not defined NO_DASHES_ARG goto no_help
6 if /I [%NO_DASHES_ARG:-=%] == [?] goto Usage
7 if /I [%NO_DASHES_ARG:-=%] == [h] goto Usage
8
9 :no_help
10 :: Check if VBCSCompiler.exe is running
11 tasklist /fi "imagename eq VBCSCompiler.exe" |find ":" > nul
12 :: Compiler is running if errorlevel == 1
13 if errorlevel 1 (
14         echo Stop VBCSCompiler.exe execution.
15         for /f "tokens=2 delims=," %%F in ('tasklist /nh /fi "imagename eq VBCSCompiler.exe" /fo csv') do taskkill /f /PID %%~F
16 )
17
18 :: Strip all dashes off the argument and use invariant
19 :: compare to match as many versions of "all" that we can
20 :: All other argument validation happens inside Run.exe
21 if not defined NO_DASHES_ARG goto no_args
22 if /I [%NO_DASHES_ARG:-=%] == [all] (
23   echo Cleaning entire working directory ...
24   call git clean -xdf
25   exit /b !ERRORLEVEL!
26 )
27
28 :no_args
29 if [%1]==[] set __args=/t:CleanAllProjects
30 if [%1]==[-b] set __args=/t:CleanAllProjects
31 if [%1]==[-p] set __args=/t:CleanPackages
32 if [%1]==[-c] set __args=/t:CleanPackagesCache
33 call %~dp0dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false /flp:v=normal;LogFile=clean.log %__args%
34 exit /b %ERRORLEVEL%
35
36 :Usage
37 echo.
38 echo Usage: clean [-b] [-p] [-c] [-all]
39 echo Repository cleaning script.
40 echo Options:
41 echo     -b     - Delete the binary output directory.
42 echo     -p     - Delete the repo-local NuGet package directory.
43 echo     -c     - Deletes the user-local NuGet package cache.
44 echo     -all   - Cleans repository and restores it to pristine state.
45 echo.
46 echo ^If no option is specified then "clean -b" is implied.
47 exit /b