From fc8d22f89124d2b7f1df5de87274e86ccefadbd2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 10 Dec 2022 04:24:01 +0900 Subject: Win32: Move fallback BASERUBY definition --- win32/Makefile.sub | 17 +++++++++++++++++ win32/setup.mak | 12 ------------ 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'win32') diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 0f4dd62ac0..814681e8d8 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -16,6 +16,23 @@ empty = MFLAGS=-l !endif +!if "$(BASERUBY)" == "" +! if [for %I in (ruby.exe) do @echo BASERUBY = %~s$$PATH:I > baseruby.mk] +! else +! include baseruby.mk +! endif +! if [del baseruby.mk] +! endif +!else if "$(BASERUBY)" == "no" || [($(BASERUBY) -eexit) > nul 2> nul] +BASERUBY = +!endif +!if "$(BASERUBY)" == "" +BASERUBY = echo executable host ruby is required. use --with-baseruby option.^& exit 1 +HAVE_BASERUBY = no +!else +HAVE_BASERUBY = yes +!endif + !ifndef REVISION_FORCE !if "$(HAVE_BASERUBY)" == "yes" REVISION_FORCE = PHONY diff --git a/win32/setup.mak b/win32/setup.mak index ddad061442..2ae4e1cfd5 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -67,19 +67,7 @@ MJIT_SUPPORT = $(MJIT_SUPPORT) << !if defined(BASERUBY) @echo BASERUBY = $(BASERUBY:/=\)>> $(MAKEFILE) -!else - @for %I in (ruby.exe) do @echo BASERUBY = %~s$$PATH:I --disable=gems>> $(MAKEFILE) !endif - @type << >> $(MAKEFILE) -$(BANG)if "$$(BASERUBY)" == "" -BASERUBY = echo executable host ruby is required. use --with-baseruby option.^& exit 1 -HAVE_BASERUBY = no -$(BANG)elseif [($$(BASERUBY) -eexit) > nul 2> nul] == 0 -HAVE_BASERUBY = yes -$(BANG)else -HAVE_BASERUBY = no -$(BANG)endif -<< !if "$(RUBY_DEVEL)" == "yes" RUBY_DEVEL = yes !endif -- cgit v1.2.3