зеркало из https://github.com/github/ruby.git
42 строки
1.2 KiB
Plaintext
42 строки
1.2 KiB
Plaintext
GEN = $(srcdir)/tools/generate.rb
|
|
SRC1 = $(top_srcdir)/parse.y
|
|
SRC2 = $(srcdir)/eventids2.c
|
|
BISON = bison
|
|
|
|
.SUFFIXES: .y
|
|
|
|
src: ripper.c eventids1.c eventids2table.c
|
|
|
|
ripper.o: ripper.c lex.c eventids1.c eventids2.c eventids2table.c \
|
|
$(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \
|
|
$(hdrdir)/ruby/defines.h $(hdrdir)/ruby/intern.h \
|
|
$(hdrdir)/ruby/encoding.h $(hdrdir)/missing.h \
|
|
$(hdrdir)/../node.h $(hdrdir)/oniguruma.h \
|
|
$(hdrdir)/regex.h $(hdrdir)/st.h $(hdrdir)/util.h
|
|
|
|
.y.c:
|
|
$(BISON) -t -v -oy.tab.c $<
|
|
sed -f $(top_srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@
|
|
@$(RM) y.tab.c
|
|
|
|
all: check
|
|
static: check
|
|
|
|
ripper.y: $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y
|
|
$(RUBY) $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y --output=$@
|
|
|
|
check: $(GEN) $(SRC1) $(SRC2)
|
|
$(RUBY) $(GEN) --mode=check --ids1src=$(SRC1) --ids2src=$(SRC2)
|
|
|
|
eventids1.c: $(srcdir)/tools/generate.rb $(SRC1)
|
|
$(RUBY) $(GEN) --mode=eventids1 --ids1src=$(SRC1) --output=$@
|
|
|
|
eventids2table.c: $(srcdir)/tools/generate.rb $(SRC2)
|
|
$(RUBY) $(GEN) --mode=eventids2table --ids2src=$(SRC2) --output=$@
|
|
|
|
# Entries for Ripper maintainer
|
|
|
|
preproc: ripper.E
|
|
ripper.E: ripper.c
|
|
$(CC) -E $(CPPFLAGS) ripper.c | $(RUBY) $(srcdir)/tools/strip.rb > $@
|