mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
d3bce8cb5a
* ext/ripper/eventids2.c: ditto. * ext/ripper/lib/ripper.rb: ditto. * ext/ripper/depend (ripper.o): No action is needed. [ruby-dev:24260] * ext/ripper/depend: Borland make does not accept pipes in Makefile rules. [ruby-dev:24589] * ext/ripper/depend: separate rules for developpers. * ext/ripper/Makefile.dev: new file. * ext/ripper/MANIFEST: add Makefile.dev. * ext/ripper/tools/generate-eventids1.rb: read from file, not stdin. * ext/ripper/extconf.rb: clean ripper.E. * ext/ripper/tools/generate-ripper_rb.rb: #include ids1/ids2 function was lost. * ext/ripper/tools/generate-ripper_rb.rb: SCANNER_EVENTS wrongly contained parser events. * ext/ripper/lib/ripper.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
26 lines
553 B
Ruby
26 lines
553 B
Ruby
#!ruby -s
|
|
|
|
require 'mkmf'
|
|
require 'rbconfig'
|
|
|
|
def main
|
|
unless have_command('bison')
|
|
$stderr.puts 'Ripper requires bison; abort'
|
|
exit 1
|
|
end
|
|
$objs = %w(ripper.o)
|
|
$cleanfiles.concat %w(ripper.y ripper.c ripper.E ripper.output eventids1.c ids1 ids2)
|
|
$CPPFLAGS += ' -DRIPPER'
|
|
$CPPFLAGS += ' -DRIPPER_DEBUG' if $debug
|
|
create_makefile 'ripper'
|
|
end
|
|
|
|
def have_command(cmd)
|
|
checking_for(cmd) {
|
|
ENV['PATH'].split(File::PATH_SEPARATOR).any? {|path|
|
|
File.executable?("#{path}/#{cmd}#{Config::CONFIG['EXEEXT']}")
|
|
}
|
|
}
|
|
end
|
|
|
|
main
|