From fe61f14d53c5b18d3c475eee23502ab1e5446291 Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 1 Mar 2019 03:45:00 +0000 Subject: Support YACC environment variable for ripper. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/ripper/depend | 1 - ext/ripper/extconf.rb | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ext/ripper/depend b/ext/ripper/depend index 1bd3e6532c..8b7eab0217 100644 --- a/ext/ripper/depend +++ b/ext/ripper/depend @@ -1,7 +1,6 @@ GEN = $(srcdir)/tools/generate.rb SRC1 = $(top_srcdir)/parse.y SRC2 = $(srcdir)/eventids2.c -BISON = bison .SUFFIXES: .y diff --git a/ext/ripper/extconf.rb b/ext/ripper/extconf.rb index 89b46abcfd..6a793b8699 100644 --- a/ext/ripper/extconf.rb +++ b/ext/ripper/extconf.rb @@ -5,7 +5,7 @@ require 'mkmf' require 'rbconfig' def main - unless find_executable('bison') + unless find_executable(ENV["YACC"] || 'bison') unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c") raise 'missing bison; abort' end @@ -16,7 +16,9 @@ def main $defs << '-DRIPPER_DEBUG' if $debug $VPATH << '$(topdir)' << '$(top_srcdir)' $INCFLAGS << ' -I$(topdir) -I$(top_srcdir)' - create_makefile 'ripper' + create_makefile 'ripper' do |conf| + conf << "BISON = #{ENV['YACC'] || 'bison'}" + end end main -- cgit v1.2.3