patch 7.4.2340
Problem: MS-Windows: Building with Ruby uses old version.
Solution: Update to 2.2.X. Use clearer name for the API version. (Ken
Takata)
diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak
index fe4c5fc..28fa9b0 100644
--- a/src/Make_cyg_ming.mak
+++ b/src/Make_cyg_ming.mak
@@ -348,36 +348,39 @@
# Ruby interface:
# RUBY=[Path to Ruby directory] (Set inside Make_cyg.mak or Make_ming.mak)
# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
-# RUBY_VER=[Ruby version, eg 18, 19, 20] (default is 18)
-# RUBY_VER_LONG=[Ruby version, eg 1.8, 1.9.1, 2.0.0] (default is 1.8)
-# You must set RUBY_VER_LONG when changing RUBY_VER.
-# RUBY_API_VER is derived from RUBY_VER_LONG.
+# RUBY_VER=[Ruby version, eg 19, 22] (default is 22)
+# RUBY_API_VER_LONG=[Ruby API version, eg 1.8, 1.9.1, 2.2.0]
+# (default is 2.2.0)
+# You must set RUBY_API_VER_LONG when changing RUBY_VER.
# Note: If you use Ruby 1.9.3, set as follows:
# RUBY_VER=19
-# RUBY_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
+# RUBY_API_VER_LONG=1.9.1 (not 1.9.3, because the API version is 1.9.1.)
ifdef RUBY
ifndef DYNAMIC_RUBY
DYNAMIC_RUBY=yes
endif
# Set default value
ifndef RUBY_VER
-RUBY_VER = 18
+RUBY_VER = 22
endif
ifndef RUBY_VER_LONG
-RUBY_VER_LONG = 1.8
+RUBY_VER_LONG = 2.2.0
+endif
+ifndef RUBY_API_VER_LONG
+RUBY_API_VER_LONG = $(RUBY_API_VER_LONG)
endif
ifndef RUBY_API_VER
-RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG))
+RUBY_API_VER = $(subst .,,$(RUBY_API_VER_LONG))
endif
ifndef RUBY_PLATFORM
ifeq ($(RUBY_VER), 16)
RUBY_PLATFORM = i586-mswin32
else
-ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/i386-mingw32),)
+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/i386-mingw32),)
RUBY_PLATFORM = i386-mingw32
else
-ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/x64-mingw32),)
+ifneq ($(wildcard $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/x64-mingw32),)
RUBY_PLATFORM = x64-mingw32
else
RUBY_PLATFORM = i386-mswin32
@@ -406,9 +409,9 @@
RUBY_19_OR_LATER = 1
endif
-RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
+RUBYINC = -I $(RUBY)/lib/ruby/$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
ifdef RUBY_19_OR_LATER
-RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_VER_LONG)/$(RUBY_PLATFORM)
+RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG) -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG)/$(RUBY_PLATFORM)
endif
ifeq (no, $(DYNAMIC_RUBY))
RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)