[前][次][番号順一覧][スレッド一覧]

ruby-changes:54944

From: hsbt <ko1@a...>
Date: Fri, 1 Mar 2019 12:45:05 +0900 (JST)
Subject: [ruby-changes:54944] hsbt:r67149 (trunk): Support YACC environment variable for ripper.

hsbt	2019-03-01 12:45:00 +0900 (Fri, 01 Mar 2019)

  New Revision: 67149

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67149

  Log:
    Support YACC environment variable for ripper.

  Modified files:
    trunk/ext/ripper/depend
    trunk/ext/ripper/extconf.rb
Index: ext/ripper/depend
===================================================================
--- ext/ripper/depend	(revision 67148)
+++ ext/ripper/depend	(revision 67149)
@@ -1,7 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ext/ripper/depend#L1
 GEN  = $(srcdir)/tools/generate.rb
 SRC1 = $(top_srcdir)/parse.y
 SRC2 = $(srcdir)/eventids2.c
-BISON = bison
 
 .SUFFIXES: .y
 
Index: ext/ripper/extconf.rb
===================================================================
--- ext/ripper/extconf.rb	(revision 67148)
+++ ext/ripper/extconf.rb	(revision 67149)
@@ -5,7 +5,7 @@ require 'mkmf' https://github.com/ruby/ruby/blob/trunk/ext/ripper/extconf.rb#L5
 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 https://github.com/ruby/ruby/blob/trunk/ext/ripper/extconf.rb#L16
   $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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]