Mercurial > jwe > octave
changeset 22108:783d5fb46892
build: fix bison generated source files to list correct file name
* libinterp/module.mk (%.cc %.h : %.yy): Postprocess the temporary bison
generated source file with $(SED) to embed the correct file name in #line
directives.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Thu, 14 Jul 2016 08:02:24 -0700 |
parents | 35c0ad43c7a5 |
children | 57ca47db75ec |
files | libinterp/module.mk |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/module.mk Thu Jul 14 17:11:42 2016 +0200 +++ b/libinterp/module.mk Thu Jul 14 08:02:24 2016 -0700 @@ -220,9 +220,14 @@ .yy.cc: ## The ylwrap script always updates the parser source file so we use a temporary file -## name and our own move-if-change rule for that file. +## name and our own move-if-change rule for that file. Additionally fix up the file +## name comments that bison writes into the source file. %.cc %.h : %.yy - $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $*.cc-t y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) && $(call move_if_change_rule,$*.cc-t,$*.cc) + $(AM_V_YACC)$(am__skipyacc) rm -f $*.cc-t $*.cc-tt && \ + $(SHELL) $(YLWRAP) $< y.tab.c $*.cc-t y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) && \ + $(SED) 's|"$*\.cc-t"|"$*.cc"|g' $*.cc-t > $*.cc-tt && \ + mv $*.cc-tt $*.cc-t && \ + $(call move_if_change_rule,$*.cc-t,$*.cc) ## Special rules: ## Mostly for sources which must be built before rest of compilation.