2004-09-12 13:34:30 -04:00
|
|
|
#!ruby -s
|
2017-02-05 02:54:32 -05:00
|
|
|
# frozen_string_literal: true
|
2004-09-12 13:34:30 -04:00
|
|
|
|
|
|
|
require 'mkmf'
|
|
|
|
require 'rbconfig'
|
|
|
|
|
|
|
|
def main
|
2005-09-22 10:40:37 -04:00
|
|
|
unless find_executable('bison')
|
2004-12-15 14:02:42 -05:00
|
|
|
unless File.exist?('ripper.c') or File.exist?("#{$srcdir}/ripper.c")
|
2012-05-18 03:01:54 -04:00
|
|
|
raise 'missing bison; abort'
|
2004-12-15 14:02:42 -05:00
|
|
|
end
|
2004-09-12 13:34:30 -04:00
|
|
|
end
|
|
|
|
$objs = %w(ripper.o)
|
2016-01-19 05:39:42 -05:00
|
|
|
$cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output y.output eventids1.c eventids2table.c .eventids2-check)
|
2007-06-09 23:06:15 -04:00
|
|
|
$defs << '-DRIPPER'
|
|
|
|
$defs << '-DRIPPER_DEBUG' if $debug
|
|
|
|
$VPATH << '$(topdir)' << '$(top_srcdir)'
|
|
|
|
$INCFLAGS << ' -I$(topdir) -I$(top_srcdir)'
|
2004-09-12 13:34:30 -04:00
|
|
|
create_makefile 'ripper'
|
|
|
|
end
|
|
|
|
|
|
|
|
main
|