2004-09-12 13:34:30 -04:00
|
|
|
#!ruby -s
|
|
|
|
|
|
|
|
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")
|
2005-09-23 07:10:59 -04:00
|
|
|
Logging.message 'missing bison; abort'
|
|
|
|
return
|
2004-12-15 14:02:42 -05:00
|
|
|
end
|
2004-09-12 13:34:30 -04:00
|
|
|
end
|
|
|
|
$objs = %w(ripper.o)
|
2008-12-29 00:51:31 -05:00
|
|
|
$cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output y.output eventids1.c eventids2table.c)
|
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
|