Simplify and fix incremental/clean in build cmds
Refining this pattern before spreading more widely.
Rob Mensching committed
Aug 8, 2022 at 18:40 UTC
8e1cbe8d7b468553d76c20452561e89726de5c47
3 files changed
+12
-9
src/api/api.cmd
+4
-3
@@ -6,14 +6,15 @@
6
7
:parse_args
8
@if /i "%1"=="release" set _C=Release
9
-@if /i "%1"=="inc" set _INCREMENTAL=1
10
-@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1
9
+@if /i "%1"=="inc" set _INC=1
10
+@if /i "%1"=="clean" set _CLEAN=1
11
@if not "%1"=="" shift & goto parse_args
12
13
@set _B=%~dp0..\..\build\api\%_C%
14
15
:: Clean
16
-@if NOT "%_INCREMENTAL%"=="" call :clean
16
+
17
+@if "%_INC%"=="" call :clean
18
@if NOT "%_CLEAN%"=="" goto :end
19
20
@echo Building api %_C%
src/setup/setup.cmd
+4
-3
@@ -6,12 +6,13 @@
6
7
:parse_args
8
@if /i "%1"=="release" set _C=Release
9
-@if /i "%1"=="inc" set _INCREMENTAL=1
10
-@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1
9
+@if /i "%1"=="inc" set _INC=1
10
+@if /i "%1"=="clean" set _CLEAN=1
11
@if not "%1"=="" shift & goto parse_args
12
13
:: Clean
14
-@if NOT "%_INCREMENTAL%"=="" call :clean
14
+
15
+@if "%_INC%"=="" call :clean
16
@if NOT "%_CLEAN%"=="" goto :end
17
18
@echo Building setup %_C%
src/tools/tools.cmd
+4
-3
@@ -6,12 +6,13 @@
6
7
:parse_args
8
@if /i "%1"=="release" set _C=Release
9
-@if /i "%1"=="inc" set _INCREMENTAL=1
10
-@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1
9
+@if /i "%1"=="inc" set _INC=1
10
+@if /i "%1"=="clean" set _CLEAN=1
11
@if not "%1"=="" shift & goto parse_args
12
13
:: Clean
14
-@if NOT "%_INCREMENTAL%"=="" call :clean
14
+
15
+@if "%_INC%"=="" call :clean
16
@if NOT "%_CLEAN%"=="" goto :end
17
18
@echo Building tools %_C%