* ext/ripper/extconf.rb (have_command): replaced with find_executable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-09-22 14:40:37 +00:00
Родитель 4857e1d300
Коммит 6fb86f740b
2 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -1,8 +1,10 @@
Thu Sep 22 23:36:24 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu Sep 22 23:40:19 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (find_executable0): default path if environment is not * lib/mkmf.rb (find_executable0): default path if environment is not
set. [ruby-dev:27281] set. [ruby-dev:27281]
* ext/ripper/extconf.rb (have_command): replaced with find_executable.
Thu Sep 22 17:31:48 2005 Shugo Maeda <shugo@ruby-lang.org> Thu Sep 22 17:31:48 2005 Shugo Maeda <shugo@ruby-lang.org>
* test/readline/test_readline.rb (TestReadline::replace_stdio): * test/readline/test_readline.rb (TestReadline::replace_stdio):

Просмотреть файл

@ -4,7 +4,7 @@ require 'mkmf'
require 'rbconfig' require 'rbconfig'
def main def main
unless have_command('bison') unless find_executable('bison')
unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c") unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c")
$stderr.puts 'missing bison; abort' $stderr.puts 'missing bison; abort'
exit 1 exit 1
@ -17,12 +17,4 @@ def main
create_makefile 'ripper' create_makefile 'ripper'
end end
def have_command(cmd)
checking_for(cmd) {
ENV['PATH'].split(File::PATH_SEPARATOR).any? {|path|
File.executable?("#{path}/#{cmd}#{Config::CONFIG['EXEEXT']}")
}
}
end
main main