From d370b8a9bf37d567a89392b86a668da1ba61a1a1 Mon Sep 17 00:00:00 2001 From: Steve Wills Date: Sun, 13 Apr 2014 02:44:45 +0000 Subject: [PATCH] - Fix issues with specifying ${RUBY} variable PR: ports/170916 Reported by: Hiroto Kagotani --- Mk/bsd.ruby.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk index 36faf724d7d3..d042eca1a7fd 100644 --- a/Mk/bsd.ruby.mk +++ b/Mk/bsd.ruby.mk @@ -152,14 +152,14 @@ RUBY_VER?= ${RUBY_DEFAULT_VER} IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it does not seem to exist. Please specify an already installed ruby executable. .endif -_RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; rescue LoadError; puts "error"; end' -.if !empty(_RUBY_TEST) +_RUBY_TEST!= ${RUBY} -e 'begin; require "rbconfig"; puts "ok" ; rescue LoadError; puts "error"; end' +.if !empty(_RUBY_TEST) && ${_RUBY_TEST} != "ok" IGNORE= cannot install: you set the variable RUBY to "${RUBY}", but it failed to include rbconfig. Please specify a properly installed ruby executable. .endif -_RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = Config::CONFIG' -e +_RUBY_CONFIG= ${RUBY} -r rbconfig -e 'C = RbConfig::CONFIG' -e -RUBY_VERSION!= ${_RUBY_CONFIG} 'puts VERSION' +RUBY_VERSION!= ${_RUBY_CONFIG} 'puts C["ruby_version"]' RUBY_SUFFIX?= # empty RUBY_ARCH!= ${_RUBY_CONFIG} 'puts C["target"]'