Skip to content

Commit

Permalink
Avoid using rm in build batch file
Browse files Browse the repository at this point in the history
  • Loading branch information
mhammond committed Nov 5, 2019
1 parent 96901b1 commit 30fd67c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions make_all.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@if "%1"=="quick" goto quick
@if "%1"=="already_built" goto already_built
if exist build\. rm -rf build
if exist build\. rd /s/q build
if exist build\. goto couldnt_rm
:quick
call build_all.bat
Expand All @@ -13,16 +13,16 @@ cd ..
rem Now the binaries.

rem Yuck - 2to3 hackery - must nuke bdist dirs as it may hold py3x syntax.
if exist build/bdist.win32/. rm -rf build/bdist.win32
if exist build/bdist.win-amd64/. rm -rf build/bdist.win-amd64
if exist build/bdist.win32/. rd /s/q build\bdist.win32
if exist build/bdist.win-amd64/. rd /s/q build\bdist.win-amd64
py -2.7-32 setup.py -q bdist_wininst --target-version=2.7 --skip-build
py -2.7-32 setup.py -q bdist_wheel --skip-build
py -2.7 setup.py -q bdist_wininst --target-version=2.7 --skip-build
py -2.7 setup.py -q bdist_wheel --skip-build

rem Just incase - re-nuke bdist dirs so 2to3 always runs.
if exist build/bdist.win32/. rm -rf build/bdist.win32
if exist build/bdist.win-amd64/. rm -rf build/bdist.win-amd64
if exist build/bdist.win32/. rd /s/q build\bdist.win32
if exist build/bdist.win-amd64/. rd /s/q build\bdist.win-amd64

rem *sob* - for some reason 3.5 and later are failing to remove the bdist temp dir
rem due to the mfc DLLs - but the dir can be removed manually.
Expand Down Expand Up @@ -66,8 +66,8 @@ py -3.9 setup.py -q bdist_wininst --skip-build --target-version=3.9
py -3.9 setup.py -q bdist_wheel --skip-build

rem And nuke the dirs one more time :)
if exist build/bdist.win32/. rm -rf build/bdist.win32
if exist build/bdist.win-amd64/. rm -rf build/bdist.win-amd64
if exist build/bdist.win32/. rd /s/q build\bdist.win32
if exist build/bdist.win-amd64/. rd /s/q build\bdist.win-amd64

@goto xit
:couldnt_rm
Expand Down

0 comments on commit 30fd67c

Please sign in to comment.