diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-12-23 11:33:10 -0800 |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-12-23 11:33:10 -0800 |
commit | 63d943f67b0dc7936a2e9cd9497e3b481393bc29 (patch) | |
tree | d2c2361beaf141e076a554b92e0feec5f35f03c9 /make.bat | |
parent | 06a5096ffd4752538f2889aa86bda6855c383dc9 (diff) | |
download | psutil-63d943f67b0dc7936a2e9cd9497e3b481393bc29.tar.gz |
make.bat: exit on error
Diffstat (limited to 'make.bat')
-rw-r--r-- | make.bat | 25 |
1 files changed, 15 insertions, 10 deletions
@@ -1,6 +1,6 @@ @ECHO OFF -REM =========================================================================== +REM ========================================================================== REM Shortcuts for various tasks, emulating UNIX "make". REM Use this to script for various tasks such as runing tests, install REM psutil, etc. @@ -11,7 +11,7 @@ REM The following assumptions are made: REM - Python is installed in C:\PythonXY\python.exe REM - the right Visual Studio version is installed REM - in case of Python 2.4 and 2.5 use mingw32 compiler -REM =========================================================================== +REM ========================================================================== SET PYTHON=C:\Python27\python.exe @@ -19,7 +19,6 @@ SET PATH=%PYTHON%;%PATH% SET PATH=C:\MinGW\bin;%PATH% - if "%1" == "help" ( :help echo Run `make ^<target^>` where ^<target^> is one of: @@ -50,18 +49,19 @@ if "%1" == "build" ( ) else ( %PYTHON% setup.py build ) + if %errorlevel% neq 0 goto :error goto :eof ) if "%1" == "install" ( - install: + :install call :build %PYTHON% setup.py install - goto :eo + goto :eof ) if "%1" == "uninstall" ( - uninstall: + :uninstall rmdir /S /Q %PYTHON%\Lib\site-packages\psutil del /F /S /Q %PYTHON%\Lib\site-packages\psutil* del /F /S /Q %PYTHON%\Lib\site-packages\_psutil* @@ -69,21 +69,26 @@ if "%1" == "uninstall" ( ) if "%1" == "test" ( - test: + :test call :install %PYTHON% test/test_psutil.py goto :eof ) if "%1" == "create-exes" ( - create-exes: + :create-exes call :clean C:\Python26\python.exe setup.py build bdist_wininst + if %errorlevel% neq 0 goto :error C:\Python27\python.exe setup.py build bdist_wininst + if %errorlevel% neq 0 goto :error C:\Python33\python.exe setup.py build bdist_wininst + if %errorlevel% neq 0 goto :error goto :eof ) -goto :help +:error + echo last command returned an error; exiting + exit /b %errorlevel% -:eof
\ No newline at end of file +goto :help
\ No newline at end of file |