mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
c971589817
* ext/ripper/MANIFEST: new file. * ext/ripper/README: new file. * ext/ripper/depend: new file. * ext/ripper/extconf.rb: new file. * ext/ripper/eventids2.c: new file. * ext/ripper/ripper.rb.in: new file. * ext/ripper/lib/ripper.rb: new file. * ext/ripper/test/check-event-arity.rb: new file. * ext/ripper/test/check-event-coverage.sh: new file. * ext/ripper/test/check-scanner-event-coverage.rb: new file. * ext/ripper/test/list-called-events.rb: new file. * ext/ripper/test/src_rb: new file. * ext/ripper/test/validate.rb: new file. * ext/ripper/tools/generate-eventids1.rb: new file. * ext/ripper/tools/generate-param-macros.rb: new file. * ext/ripper/tools/generate-ripper_rb.rb: new file. * ext/ripper/tools/list-parse-event-ids.rb: new file. * ext/ripper/tools/list-scan-event-ids.rb: new file. * ext/ripper/tools/preproc.rb: new file. * ext/ripper/tools/strip.rb: new file. * test/ripper: ripper tests added. * test/ripper/dummyparser.rb: new file. * test/ripper/test_parser_events.rb: new file. * test/ripper/test_scanner_events.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
37 lines
1.2 KiB
Text
37 lines
1.2 KiB
Text
ripper.o: ripper.c lex.c eventids1.c eventids2.c
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c ripper.c
|
|
|
|
ripper.c: ripper.y
|
|
bison -t -v -o$@ ripper.y
|
|
|
|
ripper.y: $(hdrdir)/parse.y $(srcdir)/tools/preproc.rb
|
|
$(RUBY) $(srcdir)/tools/preproc.rb $(hdrdir)/parse.y > $@
|
|
|
|
eventids1.c: $(hdrdir)/parse.y $(srcdir)/tools/list-parse-event-ids.rb $(srcdir)/tools/generate-eventids1.rb
|
|
$(RUBY) $(srcdir)/tools/list-parse-event-ids.rb $(hdrdir)/parse.y | $(RUBY) $(srcdir)/tools/generate-eventids1.rb > $@
|
|
|
|
lex.c:
|
|
cp $(hdrdir)/lex.c . || cp $(srcdir)/lex.c .
|
|
|
|
#
|
|
# Entries for ripper developpers (no srcdir/objdir support)
|
|
#
|
|
lib/ripper.rb: ripper.rb.in ids1 ids2 tools/generate-ripper_rb.rb
|
|
$(RUBY) tools/generate-ripper_rb.rb ripper.rb.in ids1 ids2 > $@
|
|
|
|
ids1: tools/list-parse-event-ids.rb ../../parse.y
|
|
$(RUBY) tools/list-parse-event-ids.rb -a ../../parse.y > $@
|
|
|
|
ids2: $(srcdir)/tools/list-scan-event-ids.rb eventids2.c
|
|
$(RUBY) tools/list-scan-event-ids.rb -a eventids2.c > $@
|
|
|
|
test: ripper.so test/*.*
|
|
$(RUBY) test/check-event-arity.rb $(hdrdir)/parse.y
|
|
sh test/check-event-coverage.sh
|
|
$(RUBY) test/check-scanner-event-coverage.rb
|
|
$(RUBY) test/validate.rb > /dev/null
|
|
@echo OK
|
|
|
|
preproc: ripper.E
|
|
ripper.E: ripper.c
|
|
$(CC) -E $(CPPFLAGS) ripper.c | ruby tools/strip.rb > $@
|