perhaps lookup VPATH Sent from my iPhone
> On Nov 26, 2014, at 6:03 PM, Daiki Ueno <u...@gnu.org> wrote: > > Hello, > > Sorry for that this is not really related to Bison (but GCC or LCOV), > but perhaps a common question that anyone might know the solution. > > In gettext we have the following directory structure: > > gettext-runtime/ > intl/ > Makefile > plural.y > plural.c # <-- generated from plural.y > ... > > gettext-tools/ > intl/ > Makefile > > In order for gettext-runtime and gettext-tools to be built separately, > gettext-tools/intl/Makefile refers to the source code in > gettext-runtime/intl/ instead of copying the object files. > > So gettext-tools/intl/Makefile looks like: > > srcdir = ../../gettext-runtime/intl > > plural.lo: $(srcdir)/plural.c > $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile \ > $(COMPILE) $(srcdir)/plural.c > > This works for normal compilation. However, when compiling with the > --coverage option of GCC, the generated .gcno file embeds relative file > name annotated with #line directive in plural.c. That confuses LCOV: > > genhtml: ERROR: cannot read /tmp/...snip.../gettext-tools/intl/plural.c > > http://hydra.nixos.org/build/17564911/log/tail-reload > > Is there any easy way to tell GCC the correct source file location? Or > should we copy all the source files? > > Thanks in advance, > -- > Daiki Ueno > > _______________________________________________ > help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison