@@ -348,36 +348,39 @@ endif
348348# Ruby interface:
349349# RUBY=[Path to Ruby directory] (Set inside Make_cyg.mak or Make_ming.mak)
350350# DYNAMIC_RUBY=yes (to load the Ruby DLL dynamically)
351- # RUBY_VER=[Ruby version, eg 18, 19, 20 ] (default is 18 )
352- # RUBY_VER_LONG =[Ruby version, eg 1.8, 1.9.1, 2.0 .0] (default is 1.8)
353- # You must set RUBY_VER_LONG when changing RUBY_VER.
354- # RUBY_API_VER is derived from RUBY_VER_LONG .
351+ # RUBY_VER=[Ruby version, eg 19, 22 ] (default is 22 )
352+ # RUBY_API_VER_LONG =[Ruby API version, eg 1.8, 1.9.1, 2.2 .0]
353+ # (default is 2.2.0)
354+ # You must set RUBY_API_VER_LONG when changing RUBY_VER .
355355# Note: If you use Ruby 1.9.3, set as follows:
356356# RUBY_VER=19
357- # RUBY_VER_LONG =1.9.1 (not 1.9.3, because the API version is 1.9.1.)
357+ # RUBY_API_VER_LONG =1.9.1 (not 1.9.3, because the API version is 1.9.1.)
358358ifdef RUBY
359359ifndef DYNAMIC_RUBY
360360DYNAMIC_RUBY =yes
361361endif
362362# Set default value
363363ifndef RUBY_VER
364- RUBY_VER = 18
364+ RUBY_VER = 22
365365endif
366366ifndef RUBY_VER_LONG
367- RUBY_VER_LONG = 1.8
367+ RUBY_VER_LONG = 2.2.0
368+ endif
369+ ifndef RUBY_API_VER_LONG
370+ RUBY_API_VER_LONG = $(RUBY_API_VER_LONG )
368371endif
369372ifndef RUBY_API_VER
370- RUBY_API_VER = $(subst .,,$(RUBY_VER_LONG ) )
373+ RUBY_API_VER = $(subst .,,$(RUBY_API_VER_LONG ) )
371374endif
372375
373376ifndef RUBY_PLATFORM
374377ifeq ($(RUBY_VER ) , 16)
375378RUBY_PLATFORM = i586-mswin32
376379else
377- ifneq ($(wildcard $(RUBY ) /lib/ruby/$(RUBY_VER_LONG ) /i386-mingw32) ,)
380+ ifneq ($(wildcard $(RUBY ) /lib/ruby/$(RUBY_API_VER_LONG ) /i386-mingw32) ,)
378381RUBY_PLATFORM = i386-mingw32
379382else
380- ifneq ($(wildcard $(RUBY ) /lib/ruby/$(RUBY_VER_LONG ) /x64-mingw32) ,)
383+ ifneq ($(wildcard $(RUBY ) /lib/ruby/$(RUBY_API_VER_LONG ) /x64-mingw32) ,)
381384RUBY_PLATFORM = x64-mingw32
382385else
383386RUBY_PLATFORM = i386-mswin32
@@ -406,9 +409,9 @@ ifeq (19, $(word 1,$(sort 19 $(RUBY_VER))))
406409RUBY_19_OR_LATER = 1
407410endif
408411
409- RUBYINC = -I $(RUBY ) /lib/ruby/$(RUBY_VER_LONG ) /$(RUBY_PLATFORM )
412+ RUBYINC = -I $(RUBY ) /lib/ruby/$(RUBY_API_VER_LONG ) /$(RUBY_PLATFORM )
410413ifdef RUBY_19_OR_LATER
411- RUBYINC += -I $(RUBY ) /include/ruby-$(RUBY_VER_LONG ) -I $(RUBY ) /include/ruby-$(RUBY_VER_LONG ) /$(RUBY_PLATFORM )
414+ RUBYINC += -I $(RUBY ) /include/ruby-$(RUBY_API_VER_LONG ) -I $(RUBY ) /include/ruby-$(RUBY_API_VER_LONG ) /$(RUBY_PLATFORM )
412415endif
413416ifeq (no, $(DYNAMIC_RUBY ) )
414417RUBYLIB = -L$(RUBY ) /lib -l$(RUBY_INSTALL_NAME )
0 commit comments