1#!ruby -s 2# frozen_string_literal: true 3 4require 'mkmf' 5require 'rbconfig' 6 7def main 8 unless find_executable('bison') 9 unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c") 10 raise 'missing bison; abort' 11 end 12 end 13 $objs = %w(ripper.o) 14 $cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output y.output eventids1.c eventids2table.c .eventids2-check) 15 $defs << '-DRIPPER' 16 $defs << '-DRIPPER_DEBUG' if $debug 17 $VPATH << '$(topdir)' << '$(top_srcdir)' 18 $INCFLAGS << ' -I$(topdir) -I$(top_srcdir)' 19 create_makefile 'ripper' 20end 21 22main 23