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