G. Branden Robinson wrote:
> > So, how does your Makefile rule for src/preproc/pic/pic.cpp look like?
> 
> I don't have one.  I'm relying on Automake.
> 
> Here's what it puts in groff's build/Makefile.
> 
> .ypp.cpp:
>       $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h 
> `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)

The Automake generated .y.c rule is known to be broken in multiple ways:
When executed in a VPATH build,
  - The .c file gets generated in the build directory. But since it requires
    special tools to rebuild it, we need to distribute it in the tarballs,
    and by the GNU Coding Standards
    <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>
    the file should be generated in the source directory.
  - The #line directives in the .c file refer to a nonexistent file once it
    has been moved from the build directory to the source directory. This
    leads to error if 'lcov' is used later.

You may want to report it as an Automake bug. (Many packages don't use
ylwrap any more; they invoke 'bison' directly. GNU groff is one of the
few packages that does not make use of GNU Bison features.)

Bruno




Reply via email to