aboutsummaryrefslogtreecommitdiffstats
path: root/common.mk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-18 15:06:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-18 15:06:47 +0000
commitdd62eea07f2cb9f8401e267c7979d281045401c9 (patch)
treea072f6dc9eb81c502c65a0488e1879e0aade4d62 /common.mk
parentfe8bc6485e6646d24a5b19460b7366250c9287c0 (diff)
downloadruby-dd62eea07f2cb9f8401e267c7979d281045401c9.tar.gz
common.mk: path in parse.c
* common.mk (parse.c): replace source file name in #line pragmas with the path in the source directory, so that binary utilities, e.g. gcov, can find it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index ead6e23b92..befe98fddc 100644
--- a/common.mk
+++ b/common.mk
@@ -764,7 +764,7 @@ PHONY:
$(Q)$(BASERUBY) $(srcdir)/tool/id2token.rb --path-separator=.$(PATH_SEPARATOR)./ --vpath=$(VPATH) id.h $(SRC_FILE) > parse.tmp.y
$(Q)$(YACC) -d $(YFLAGS) -o y.tab.c parse.tmp.y
$(Q)$(RM) parse.tmp.y
- $(Q)sed -f $(srcdir)/tool/ytab.sed -e "/^#/s!parse\.tmp\.[iy]!parse.y!" -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
+ $(Q)sed -f $(srcdir)/tool/ytab.sed -e "/^#/s|parse\.tmp\.[iy]|$(SRC_FILE)|" -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
$(Q)$(MV) $@.new $@
$(Q)sed -e "/^#line.*y\.tab\.h/d;/^#line.*parse.*\.y/d" y.tab.h > $(@:.c=.h)
$(Q)$(RM) y.tab.c y.tab.h