diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-01 03:45:00 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-01 03:45:00 +0000 |
commit | fe61f14d53c5b18d3c475eee23502ab1e5446291 (patch) | |
tree | 9ee307656d6e59951e43155b75ae375f1dc9df5e /ext | |
parent | dfec1eb3cee833fa4bef6ce027a3e702508261ba (diff) |
Support YACC environment variable for ripper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/ripper/depend | 1 | ||||
-rw-r--r-- | 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 |