ruby-changes:47220
From: nobu <ko1@a...>
Date: Fri, 14 Jul 2017 19:31:14 +0900 (JST)
Subject: [ruby-changes:47220] nobu:r59335 (trunk): VPATH for ripper
nobu 2017-07-14 19:31:05 +0900 (Fri, 14 Jul 2017) New Revision: 59335 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59335 Log: VPATH for ripper * common.mk (ripper.c): pass the build directory path for id.h which may be generated there. * ext/ripper/depend (ripper.y): search the top build directory and the top source directory. Modified files: trunk/common.mk trunk/ext/ripper/depend Index: common.mk =================================================================== --- common.mk (revision 59334) +++ common.mk (revision 59335) @@ -977,10 +977,10 @@ $(REVISION_H): $(srcdir)/version.h $(src https://github.com/ruby/ruby/blob/trunk/common.mk#L977 $(srcdir)/ext/ripper/ripper.c: $(srcdir)/parse.y id.h $(ECHO) generating $@ - $(Q) $(CHDIR) $(@D) && \ + $(Q) VPATH=$${PWD-`pwd`} && $(CHDIR) $(@D) && \ sed /AUTOGENERATED/q depend | \ $(exec) $(MAKE) -f - $(mflags) \ - Q=$(Q) ECHO=$(ECHO) RM="$(RM)" top_srcdir=../.. srcdir=. VPATH=../.. \ + Q=$(Q) ECHO=$(ECHO) RM="$(RM)" top_srcdir=../.. srcdir=. VPATH="$${VPATH}" \ RUBY="$(BASERUBY)" PATH_SEPARATOR="$(PATH_SEPARATOR)" $(srcdir)/ext/json/parser/parser.c: $(srcdir)/ext/json/parser/parser.rl Index: ext/ripper/depend =================================================================== --- ext/ripper/depend (revision 59334) +++ ext/ripper/depend (revision 59335) @@ -20,7 +20,8 @@ static: check https://github.com/ruby/ruby/blob/trunk/ext/ripper/depend#L20 ripper.y: $(srcdir)/tools/preproc.rb $(top_srcdir)/parse.y $(ECHO) extracting $@ from $(top_srcdir)/parse.y - $(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ --vpath=$(VPATH) id.h $(top_srcdir)/parse.y > ripper.tmp.y + $(Q) $(RUBY) $(top_srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ \ + --vpath=$(VPATH)$(PATH_SEPARATOR)$(top_srcdir) id.h $(top_srcdir)/parse.y > ripper.tmp.y $(Q) $(RUBY) $(srcdir)/tools/preproc.rb ripper.tmp.y --output=$@ $(Q) $(RM) ripper.tmp.y -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/