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)
|
2005-09-23 17:37:38 -04:00
|
|
|
$cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output eventids1.c eventids2table.c)
|
2004-09-12 13:34:30 -04:00
|
|
|
$CPPFLAGS += ' -DRIPPER'
|
|
|
|
$CPPFLAGS += ' -DRIPPER_DEBUG' if $debug
|
|
|
|
create_makefile 'ripper'
|
|
|
|
end
|
|
|
|
|
|
|
|
main
|