gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 32/219: build-openssl.bat: Move the installation in


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 32/219: build-openssl.bat: Move the installation into a separate function
Date: Wed, 22 May 2019 19:16:11 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 1969958e6bb9839399d0c5cbd0cf253affbd28c9
Author: Steve Holme <address@hidden>
AuthorDate: Sun Mar 31 11:55:55 2019 +0200

    build-openssl.bat: Move the installation into a separate function
---
 projects/build-openssl.bat | 150 ++++++++++++++++++++-------------------------
 1 file changed, 66 insertions(+), 84 deletions(-)

diff --git a/projects/build-openssl.bat b/projects/build-openssl.bat
index 46cbd7eb2..7a646c74d 100644
--- a/projects/build-openssl.bat
+++ b/projects/build-openssl.bat
@@ -242,27 +242,8 @@ rem 
***************************************************************************
   rem Perform the build
   call :build x64
 
-  rem Move the output directories
-  if exist "%OUTDIR%\LIB Debug" (
-    copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul
-    rd out32.dbg /s /q
-  ) else (
-    move out32.dbg "%OUTDIR%\LIB Debug" 1>nul
-  )
-  if exist "%OUTDIR%\DLL Debug" (
-    copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul
-    rd out32dll.dbg /s /q
-  ) else (
-    move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul
-  )
-
-  rem Move the PDB files
-  move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul
-  move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul
-
-  rem Remove the intermediate directories
-  rd tmp32.dbg /s /q
-  rd tmp32dll.dbg /s /q
+  rem Perform the install
+  call :install debug
 
   if "%BUILD_CONFIG%" == "debug" goto success
 
@@ -273,27 +254,8 @@ rem 
***************************************************************************
   rem Perform the build
   call :build x64
 
-  rem Move the output directories
-  if exist "%OUTDIR%\LIB Release" (
-    copy /y out32\* "%OUTDIR%\LIB Release" 1>nul
-    rd out32 /s /q
-  ) else (
-    move out32 "%OUTDIR%\LIB Release" 1>nul
-  )
-  if exist "%OUTDIR%\DLL Release" (
-    copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul
-    rd out32dll /s /q
-  ) else (
-    move out32dll "%OUTDIR%\DLL Release" 1>nul
-  )
-
-  rem Move the PDB files
-  move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul
-  move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul
-
-  rem Remove the intermediate directories
-  rd tmp32 /s /q
-  rd tmp32dll /s /q
+  rem Perform the install
+  call :install release
 
   goto success
 
@@ -311,27 +273,8 @@ rem 
***************************************************************************
   rem Perform the build
   call :build x86
 
-  rem Move the output directories
-  if exist "%OUTDIR%\LIB Debug" (
-    copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul
-    rd out32.dbg /s /q
-  ) else (
-    move out32.dbg "%OUTDIR%\LIB Debug" 1>nul
-  )
-  if exist "%OUTDIR%\DLL Debug" (
-    copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul
-    rd out32dll.dbg /s /q
-  ) else (
-    move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul
-  )
-
-  rem Move the PDB files
-  move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul
-  move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul
-
-  rem Remove the intermediate directories
-  rd tmp32.dbg /s /q
-  rd tmp32dll.dbg /s /q
+  rem Perform the install
+  call :install debug
 
   if "%BUILD_CONFIG%" == "debug" goto success
 
@@ -342,27 +285,8 @@ rem 
***************************************************************************
   rem Perform the build
   call :build x86
 
-  rem Move the output directories
-  if exist "%OUTDIR%\LIB Release" (
-    copy /y out32\* "%OUTDIR%\LIB Release" 1>nul
-    rd out32 /s /q
-  ) else (
-    move out32 "%OUTDIR%\LIB Release" 1>nul
-  )
-  if exist "%OUTDIR%\DLL Release" (
-    copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul
-    rd out32dll /s /q
-  ) else (
-    move out32dll "%OUTDIR%\DLL Release" 1>nul
-  )
-
-  rem Move the PDB files
-  move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul
-  move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul
-
-  rem Remove the intermediate directories
-  rd tmp32 /s /q
-  rd tmp32dll /s /q
+  rem Perform the install
+  call :install release
 
   goto success
 
@@ -428,6 +352,64 @@ rem
 
   exit /B 0
 
+rem Main installation function.
+rem
+rem %1 - Configuration (release or debug)
+rem
+:install
+  setlocal
+
+  if "%1" == "" exit /B 1
+
+  rem Copy the generated files to our directory structure
+  if "%1" == "debug" (
+    rem Move the output directories
+    if exist "%OUTDIR%\LIB Debug" (
+      copy /y out32.dbg\* "%OUTDIR%\LIB Debug" 1>nul
+      rd out32.dbg /s /q
+    ) else (
+      move out32.dbg "%OUTDIR%\LIB Debug" 1>nul
+    )
+    if exist "%OUTDIR%\DLL Debug" (
+      copy /y out32dll.dbg\* "%OUTDIR%\DLL Debug" 1>nul
+      rd out32dll.dbg /s /q
+    ) else (
+      move out32dll.dbg "%OUTDIR%\DLL Debug" 1>nul
+    )
+
+    rem Move the PDB files
+    move tmp32.dbg\lib.pdb "%OUTDIR%\LIB Debug" 1>nul
+    move tmp32dll.dbg\lib.pdb "%OUTDIR%\DLL Debug" 1>nul
+
+    rem Remove the intermediate directories
+    rd tmp32.dbg /s /q
+    rd tmp32dll.dbg /s /q
+  ) else if "%1" == "release" (
+    rem Move the output directories
+    if exist "%OUTDIR%\LIB Release" (
+      copy /y out32\* "%OUTDIR%\LIB Release" 1>nul
+      rd out32 /s /q
+    ) else (
+      move out32 "%OUTDIR%\LIB Release" 1>nul
+    )
+    if exist "%OUTDIR%\DLL Release" (
+      copy /y out32dll\* "%OUTDIR%\DLL Release" 1>nul
+      rd out32dll /s /q
+    ) else (
+      move out32dll "%OUTDIR%\DLL Release" 1>nul
+    )
+
+    rem Move the PDB files
+    move tmp32\lib.pdb "%OUTDIR%\LIB Release" 1>nul
+    move tmp32dll\lib.pdb "%OUTDIR%\DLL Release" 1>nul
+
+    rem Remove the intermediate directories
+    rd tmp32 /s /q
+    rd tmp32dll /s /q
+  )
+
+  exit /B 0
+
 :syntax
   rem Display the help
   echo.

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]