Hi Stefano, * Stefano Lattarini wrote on Sat, May 01, 2010 at 06:40:41PM CEST: > OK, I must admit to be stuck here. How can I know what objects files > are expected to be compiled from, say, a bar.c file, in turn generated > from a bar.l file? > > Or (e.g.) how can I distinguish the following situation: > > foo_SOURCES = bar.l > > (where bar.c is generated from bar.l, bar.o is generated from bar.c, > and no explicit dependency rule is generated), from the following > situation: > > foo_SOURCES = bar.l > foo_CFLAGS = $(AM_CFLAGS) > > (where bar.c is generated from bar.l, and foo-bar.o is generated from > bar.c, with an explicit dependency rule of foo-bar.o from bar.c)?
The logic for this happens in handle_single_transform, the variable is $have_per_exec_flags, and is passed to lang_*_rewrite. The logic applies equally to the lex language (with foo_LFLAGS) as well as C (with foo_CFLAGS). The *target_hook functions can infer this information from the $aggregate argument passed to them (again, see handle_single_transform). Hope that helps. Cheers, Ralf