diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile.sub | 17 | ||||
-rw-r--r-- | win32/setup.mak | 12 |
2 files changed, 17 insertions, 12 deletions
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 |