I have a project which I'm porting from Solaris/Lex/Yacc to Linux/Flex/Bison + Autotools. I'm running into the following issue, and I wonder if anyone out there knows how to get around it. Given a target like so (only necessary details included):
bin_PROGRAMS=my_prog my_prog_YFLAGS=-d my_prog_SOURCES=\ main.cpp \ parser.ypp \ scanner.lpp
Automake is generating the following source files from the lpp and ypp:
- scanner.lpp -> scanner.cpp (as per Automake manual)
- parser.ypp -> my_prog-parser.cpp and my_prog-parser.h (why?)
Using bison's -b and -o options to alter output file names. The problem with this is that automake appears to assume default output names (parser.tab.c) and move the files with a script. If I alter the output file names with bison, the build fails when automake attempts to rename the files that aren't there.
Is there some option or something I am missing?