diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-08-23 00:11:20 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-08-25 21:53:20 +0900 |
| commit | 84be67a37c6f7b359aa5f55a94a8d87da2efe341 (patch) | |
| tree | d8ace0bbbc996cad5e826fe1ee2d1a544582205a | |
| parent | f1727b5b6776643ca1ca923899056a1e6635cc38 (diff) | |
Win: Fix `--without-baseruby` option
This option in `win32/configure.bat` was completely broken.
Also honor `HAVE_BASERUBY` than `BASERUBY` value, and use
`missing-baseruby.bat` to check the version.
| -rw-r--r-- | win32/Makefile.sub | 9 | ||||
| -rwxr-xr-x | win32/configure.bat | 6 | ||||
| -rw-r--r-- | win32/setup.mak | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 1bdef106b3..3312faa7d6 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -17,7 +17,9 @@ tooldir = $(srcdir)/tool MFLAGS=-l !endif -!if "$(BASERUBY)" == "" +!if "$(HAVE_BASERUBY)" == "no" +BASERUBY = +!else if "$(BASERUBY)" == "" # After `nmake`, just built `ruby.exe` exists in the build directory, # and is searched first prior to $PATH. Assume that no ruby # executable in $(tooldir). @@ -28,7 +30,7 @@ MFLAGS=-l ! endif ! if [del baseruby.mk 2> nul] ! endif -!else if "$(BASERUBY)" == "no" || [($(BASERUBY) -eexit) > nul 2> nul] +!else if [($(BASERUBY) $(tooldir)/missing-baseruby.bat) > nul 2> nul] BASERUBY = !endif !if "$(BASERUBY)" == "" @@ -122,9 +124,6 @@ TOUCH = $(BASERUBY) -run -e touch -- CP = copy > nul MV = move > nul RM1 = del /f /q -!if !defined(BASERUBY) -BASERUBY = ruby -!endif !if !defined(TEST_RUNNABLE) TEST_RUNNABLE = yes !endif diff --git a/win32/configure.bat b/win32/configure.bat index bad09cd3f5..e9e63ac11d 100755 --- a/win32/configure.bat +++ b/win32/configure.bat @@ -51,7 +51,7 @@ if "%1" == "--disable-rubygems" goto :disable-rubygems if "%1" == "--extout" goto :extout
if "%1" == "--path" goto :path
if "%1" == "--with-baseruby" goto :baseruby
-if "%1" == "--without-baseruby" goto :baseruby
+if "%1" == "--without-baseruby" goto :nobaseruby
if "%1" == "--with-ntver" goto :ntver
if "%1" == "--with-libdir" goto :libdir
if "%1" == "--with-git" goto :git
@@ -208,6 +208,7 @@ goto :loop ; shift
goto :loop ;
:baseruby
+ echo>> %config_make% HAVE_BASERUBY =
echo>> %config_make% BASERUBY = %~2
echo>>%confargs% %1=%2 \
shift
@@ -215,7 +216,8 @@ goto :loop ; goto :loop ;
:nobaseruby
echo>> %config_make% HAVE_BASERUBY = no
- echo>>%confargs% %1=%2 \
+ echo>> %config_make% BASERUBY =
+ echo>>%confargs% %1 \
shift
goto :loop ;
:libdir
diff --git a/win32/setup.mak b/win32/setup.mak index 275ccda3bb..15fa41b562 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -46,7 +46,7 @@ prefix = $(prefix:\=/) << @type $(config_make) >>$(MAKEFILE) @del $(config_make) > nul -!if defined(BASERUBY) +!if "$(HAVE_BASERUBY)" != "no" && "$(BASERUBY)" != "" $(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat" !endif !if "$(WITH_GMP)" != "no" |
