On Sun, 2006-01-01 at 15:41 -0700, Tom Tromey wrote: > >>>>> "Braden" == Braden McDaniel <[EMAIL PROTECTED]> writes: > > Braden> Forget about BUILT_SOURCES and *_DEPENDENCIES. The sources I'm > building > Braden> get #include'd by browser.cpp. As such, checking of browser.cpp's > Braden> dependencies should cause them to get (re)generated, right? > > Braden> But it doesn't. If I remove BUILT_SOURCES, the files don't get > Braden> generated before browser.cpp gets compiled. Why not? > > Automake dependency tracking information is computed as a side effect > of compilation. So, the first time things are compiled, it has no way > of knowing about dependencies on generated files.
Yeah... I did some more thorough looking into how automake does its thing and discovered this. > BUILT_SOURCES is a hack to get around this. It basically inserts a > 'make $(BUILT_SOURCES)' before targets like 'all'. (It would be nice > to have per-{executable,library} BUILT_SOURCES...) > > I didn't look into this too deeply but I would guess that it is more > make-related than automake-related. You can add rules to the > Makefile.am to help with debugging, eg: > > hack: > $(MAKE) $(BUILT_SOURCES) > > Then in theory 'make hack' should reproduce the problem you're seeing. And it does. > If that doesn't happen then something weird and perhaps > automake-related is going on. If it does happen, you can try plain > old Makefile debugging with 'make -d'. <banging head against desk> The problem is that antlr doesn't seem to modify the timestamp when it regenerates files. Solved by touching the generated files immediately after antlr runs. <sigh> Thanks for your help, gentlemen. -- Braden McDaniel e-mail: <[EMAIL PROTECTED]> <http://endoframe.com> Jabber: <[EMAIL PROTECTED]>