Windows: update dobuild.cmd to run the configure/make
authorRebecca Cran <rebecca@bsdio.com>
Tue, 3 Nov 2020 02:47:41 +0000 (02:47 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 4 Nov 2020 23:43:14 +0000 (16:43 -0700)
Add a new shell script, _domake.sh which runs under Cygwin. This
is invoked via dobuild.cmd to run the configure and make steps of
the build. In this way, a single command, run from a Developer Command
Prompt, can be used to go from a clean workspace to a final installer
binary.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
os/windows/_domake.sh [new file with mode: 0755]
os/windows/dobuild.cmd

diff --git a/os/windows/_domake.sh b/os/windows/_domake.sh
new file mode 100755 (executable)
index 0000000..05625ff
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+set -e
+
+cd "$2"
+cd ../..
+if [ -e "fio.exe" ]; then
+  make clean
+fi
+
+if [ "$1" = "x86" ]; then
+  ./configure --disable-native --build-32bit-win
+else
+  ./configure --disable-native
+fi
+
+make -j
index 08df3e876da6d3f761ba5ca5d335428bbbd2be71..ea79dd03b4eb62ae04834641c0465f78ce5f1d62 100644 (file)
@@ -1,5 +1,18 @@
 @echo off\r
 setlocal enabledelayedexpansion\r
+\r
+if "%1"=="x86" set FIO_ARCH=x86\r
+if "%1"=="x64" set FIO_ARCH=x64\r
+\r
+if not defined FIO_ARCH (\r
+  echo Error: must specify the architecture.\r
+  echo Usage: dobuild x86\r
+  echo Usage: dobuild x64\r
+  goto end\r
+)\r
+\r
+C:\Cygwin64\bin\bash -l %cd%/_domake.sh %FIO_ARCH% %cd%\r
+\r
 set /a counter=1\r
 for /f "tokens=3" %%i in (..\..\FIO-VERSION-FILE) do (\r
  if "!counter!"=="1" set FIO_VERSION=%%i\r
@@ -16,16 +29,6 @@ if not defined FIO_VERSION_NUMBERS (
   goto end\r
 )\r
 \r
-if "%1"=="x86" set FIO_ARCH=x86\r
-if "%1"=="x64" set FIO_ARCH=x64\r
-\r
-if not defined FIO_ARCH (\r
-  echo Error: must specify the architecture.\r
-  echo Usage: dobuild x86\r
-  echo Usage: dobuild x64\r
-  goto end\r
-)\r
-\r
 if defined SIGN_FIO (\r
   signtool sign /n "%SIGNING_CN%" /t http://timestamp.digicert.com ..\..\fio.exe\r
   signtool sign /as /n "%SIGNING_CN%" /tr http://timestamp.digicert.com /td sha256 /fd sha256 ..\..\fio.exe\r