On Fri, Jun 08, 2007 at 05:50:06PM +0200, Baurzhan Ismagulov wrote: > 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
This looks correct. > 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. What is the name of the file that is generated in the build directory? > 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? 1.9.6 > Do you have ylwrap in $(top_srcdir)? In my source tree, if I do, find . -name ylwrap nothing is returned. I'm assuming I don't have that. I don't even know what it is. OK, I feel terrible. After looking at my build setup, it appears that the FooGrammar.cxx file IS put into the build directory. However, the FooLexer.cxx file is put in the source directory like I recalled. When I move the FooGrammar.cxx file from the build directory to the src directory, automake still puts the generated file in the build directory. Is this the behavior you are seeing? I'm very sorry for the misinformation. Bob Rossi