Skip to content

Commit 84be67a

Browse files
committed
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.
1 parent f1727b5 commit 84be67a

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

win32/Makefile.sub

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ tooldir = $(srcdir)/tool
1717
MFLAGS=-l
1818
!endif
1919

20-
!if "$(BASERUBY)" == ""
20+
!if "$(HAVE_BASERUBY)" == "no"
21+
BASERUBY =
22+
!else if "$(BASERUBY)" == ""
2123
# After `nmake`, just built `ruby.exe` exists in the build directory,
2224
# and is searched first prior to $PATH. Assume that no ruby
2325
# executable in $(tooldir).
@@ -28,7 +30,7 @@ MFLAGS=-l
2830
! endif
2931
! if [del baseruby.mk 2> nul]
3032
! endif
31-
!else if "$(BASERUBY)" == "no" || [($(BASERUBY) -eexit) > nul 2> nul]
33+
!else if [($(BASERUBY) $(tooldir)/missing-baseruby.bat) > nul 2> nul]
3234
BASERUBY =
3335
!endif
3436
!if "$(BASERUBY)" == ""
@@ -122,9 +124,6 @@ TOUCH = $(BASERUBY) -run -e touch --
122124
CP = copy > nul
123125
MV = move > nul
124126
RM1 = del /f /q
125-
!if !defined(BASERUBY)
126-
BASERUBY = ruby
127-
!endif
128127
!if !defined(TEST_RUNNABLE)
129128
TEST_RUNNABLE = yes
130129
!endif

win32/configure.bat

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ if "%1" == "--disable-rubygems" goto :disable-rubygems
5151
if "%1" == "--extout" goto :extout
5252
if "%1" == "--path" goto :path
5353
if "%1" == "--with-baseruby" goto :baseruby
54-
if "%1" == "--without-baseruby" goto :baseruby
54+
if "%1" == "--without-baseruby" goto :nobaseruby
5555
if "%1" == "--with-ntver" goto :ntver
5656
if "%1" == "--with-libdir" goto :libdir
5757
if "%1" == "--with-git" goto :git
@@ -208,14 +208,16 @@ goto :loop ;
208208
shift
209209
goto :loop ;
210210
:baseruby
211+
echo>> %config_make% HAVE_BASERUBY =
211212
echo>> %config_make% BASERUBY = %~2
212213
echo>>%confargs% %1=%2 \
213214
shift
214215
shift
215216
goto :loop ;
216217
:nobaseruby
217218
echo>> %config_make% HAVE_BASERUBY = no
218-
echo>>%confargs% %1=%2 \
219+
echo>> %config_make% BASERUBY =
220+
echo>>%confargs% %1 \
219221
shift
220222
goto :loop ;
221223
:libdir

win32/setup.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ prefix = $(prefix:\=/)
4646
<<
4747
@type $(config_make) >>$(MAKEFILE)
4848
@del $(config_make) > nul
49-
!if defined(BASERUBY)
49+
!if "$(HAVE_BASERUBY)" != "no" && "$(BASERUBY)" != ""
5050
$(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat"
5151
!endif
5252
!if "$(WITH_GMP)" != "no"

0 commit comments

Comments
 (0)