Skip to content

Commit 49ca241

Browse files
Show a more verbose message if BASERUBY is too old
1 parent 925d041 commit 49ca241

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ AC_ARG_WITH(baseruby,
8484
AC_PATH_PROG([BASERUBY], [ruby], [false])
8585
])
8686
AS_IF([test "$HAVE_BASERUBY" != no], [
87-
RUBYOPT=- $BASERUBY --disable=gems -rerb -rfileutils -rtempfile "${tooldir}/missing-baseruby.bat" || HAVE_BASERUBY=no
87+
RUBYOPT=- $BASERUBY --disable=gems "${tooldir}/missing-baseruby.bat" --verbose || HAVE_BASERUBY=no
8888
])
8989
AS_IF([test "${HAVE_BASERUBY:=no}" != no], [
9090
AS_CASE(["$build_os"], [mingw*], [

tool/missing-baseruby.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,10 @@ call :warn "executable host ruby is required. use --with-baseruby option."
2121
call :warn "Note that BASERUBY must be Ruby 3.1.0 or later."
2222
call :abort
2323
(goto :eof ^;)
24-
abort unless defined?(RubyVM::InstructionSequence)
25-
abort if RUBY_VERSION < s[%r"warn .*Ruby ([\d.]+)(?:\.0)?",1]
24+
verbose = true if ARGV[0] == "--verbose"
25+
case
26+
when !defined?(RubyVM::InstructionSequence)
27+
abort(*(["BASERUBY must be CRuby"] if verbose))
28+
when RUBY_VERSION < s[%r[warn .*\KBASERUBY .*Ruby ([\d.]+)(?:\.0)?.*(?=\")],1]
29+
abort(*(["#{$&}. Found: #{RUBY_VERSION}"] if verbose))
30+
end

win32/setup.mak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ prefix = $(prefix:\=/)
4747
@type $(config_make) >>$(MAKEFILE)
4848
@del $(config_make) > nul
4949
!if "$(HAVE_BASERUBY)" != "no" && "$(BASERUBY)" != ""
50-
$(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat"
50+
$(BASERUBY:/=\) "$(srcdir)/tool/missing-baseruby.bat" --verbose
5151
!endif
5252
!if "$(WITH_GMP)" != "no"
5353
@($(CC) $(XINCFLAGS) <<conftest.c -link $(XLDFLAGS) gmp.lib > nul && (echo USE_GMP = yes) || exit /b 0) >>$(MAKEFILE)

0 commit comments

Comments
 (0)