summaryrefslogtreecommitdiff
path: root/buildconf.bat
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-08-05 17:59:38 +0100
committerSteve Holme <steve_holme@hotmail.com>2015-08-05 18:52:50 +0100
commitf08e30d7bcaa8c846101e44565dd4b0970fdcf24 (patch)
treed16caf258b91e29a1484b01b9f9f61d8b567c733 /buildconf.bat
parent6428b8de424bfea92c8c559f77aef4c5c3f507b8 (diff)
downloadcurl-f08e30d7bcaa8c846101e44565dd4b0970fdcf24.tar.gz
buildconf.bat: Added support for file clean-up via -clean
Diffstat (limited to 'buildconf.bat')
-rw-r--r--buildconf.bat60
1 files changed, 58 insertions, 2 deletions
diff --git a/buildconf.bat b/buildconf.bat
index d20f3c28f..876d4d618 100644
--- a/buildconf.bat
+++ b/buildconf.bat
@@ -37,7 +37,33 @@ rem snapshot archives.
if not exist GIT-INFO goto nogitinfo
+ rem Set our variables
+ setlocal
+ set MODE=GENERATE
+
+:parseArgs
+ if "%~1" == "" goto start
+
+ if /i "%~1" == "-clean" (
+ set MODE=CLEAN
+ ) else (
+ goto unknown
+ )
+
+ shift & goto parseArgs
+
:start
+ if "%MODE%" == "GENERATE" (
+ call :generate
+ ) else (
+ call :clean
+ )
+
+ goto success
+
+rem Main generate function.
+rem
+:generate
echo.
echo Generating prerequisite files
@@ -68,12 +94,42 @@ rem snapshot archives.
cd ..
)
- goto success
+ exit /B
+
+rem Main clean function.
+rem
+:clean
+ echo.
+ echo Removing prerequisite files
+
+ echo * %CD%\Makefile
+ if exist Makefile (
+ del Makefile
+ )
+
+ echo * %CD%\src\tool_hugehelp.c
+ if exist src\tool_hugehelp.c (
+ del src\tool_hugehelp.c
+ )
+
+ echo * %CD%\include\curl\curlbuild.h
+ if exist include\curl\curlbuild.h (
+ del include\curl\curlbuild.h
+ )
+
+ exit /B
:syntax
rem Display the help
echo.
- echo Usage: buildconf
+ echo Usage: buildconf [-clean]
+ echo.
+ echo -clean - Removes the files
+ goto error
+
+:unknown
+ echo.
+ echo Error: Unknown argument '%1'
goto error
:nogitinfo