]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build-openssl.bat: Move the build step into a separate function
authorSteve Holme <steve_holme@hotmail.com>
Thu, 8 Feb 2018 22:05:31 +0000 (22:05 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Mon, 8 Apr 2019 21:36:22 +0000 (22:36 +0100)
projects/build-openssl.bat

index b976507a7dacf108e9bfd98ecf487616d318f9e2..46cbd7eb2d9c1ae713f8a2bb33a4747021716cc5 100644 (file)
@@ -240,9 +240,7 @@ rem ***************************************************************************
   call :configure x64 debug
 
   rem Perform the build
-  call ms\do_win64a
-  nmake -f ms\nt.mak
-  nmake -f ms\ntdll.mak
+  call :build x64
 
   rem Move the output directories
   if exist "%OUTDIR%\LIB Debug" (
@@ -273,9 +271,7 @@ rem ***************************************************************************
   call :configure x64 release
 
   rem Perform the build
-  call ms\do_win64a
-  nmake -f ms\nt.mak
-  nmake -f ms\ntdll.mak
+  call :build x64
 
   rem Move the output directories
   if exist "%OUTDIR%\LIB Release" (
@@ -313,9 +309,7 @@ rem ***************************************************************************
   call :configure x86 debug
 
   rem Perform the build
-  call ms\do_ms
-  nmake -f ms\nt.mak
-  nmake -f ms\ntdll.mak
+  call :build x86
 
   rem Move the output directories
   if exist "%OUTDIR%\LIB Debug" (
@@ -346,9 +340,7 @@ rem ***************************************************************************
   call :configure x86 release
 
   rem Perform the build
-  call ms\do_ms
-  nmake -f ms\nt.mak
-  nmake -f ms\ntdll.mak
+  call :build x86
 
   rem Move the output directories
   if exist "%OUTDIR%\LIB Release" (
@@ -414,6 +406,28 @@ rem
 
   exit /B %ERRORLEVEL
 
+rem Main build function.
+rem
+rem %1 - Platform (x86 or x64)
+rem
+:build
+  setlocal
+
+  if "%1" == "" exit /B 1
+
+  if "%1" == "x86" (
+    call ms\do_ms.bat
+  ) else if "%1" == "x64" (
+    call ms\do_win64a.bat
+  ) else (
+    exit /B 1
+  )
+
+  nmake -f ms\nt.mak
+  nmake -f ms\ntdll.mak
+
+  exit /B 0
+
 :syntax
   rem Display the help
   echo.