On Fri, Jun 08, 2007 at 11:06:30AM -0400, Bob Rossi wrote: > Well, all I can tell you is what works for me. I have both the .yxx and > .ll files in $(top_srcdir)/foo. I put the generated .cpp files at the same > level, in $(top_srcdir)/foo. My Makefile.am has, > > libfoo_a_SOURCES= \ > FooGrammar.yxx \ > FooLexer.ll \ > Foo.cpp \ > > After I modify the .yxx file, and then type 'make', automake ensures > that the generated file in my source tree is updated. > > Maybe you should start from scratch, remove the generated file from the > build tree, and try again.
Hmm, this is pretty much what I did. I have foo_SOURCES = foo/foo.c foo/foo_parse.y foo/foo_scan.l foo/foo_state.c in $(top_srcdir)/Makefile.am. I moved foo_parse.[ch], foo_scan.c from $(top_builddir) to $(top_srcdir)/foo. When I type "make", the files are generated in $(top_builddir); the files in $(top_srcdir)/foo are not updated. Moreover, "make distclean" in $(top_builddir) doesn't delete the generated files. I've also tried: * Copying ylwrap to $(top_srcdir). * Creating foo/Makefile.am, updating AC_CONFIG_FILES and rebuilding. Neither one helped. I assume the difference shouldn't be the fact that you generate C++ source. What else could affect the behavior? Which version of automake do you have? Do you have ylwrap in $(top_srcdir)? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.com/