On Tue, Oct 16, 2012 at 09:21:05AM +0200, Paolo Bonzini wrote: > Il 15/10/2012 18:37, Michael Roth ha scritto: > > There is another way to do this (still using a "dummy" target) that is a > > bit less cryptic: > > > > QIDL-PP-%: %.c qidl.h ... > > <grep and create %.qidl.c> > > > > %.o: QIDL-PP-% > > <build normal or qidl CC> > > > > But make detects that QIDL-PP-% is an intermediate target and removes > > the *.qidl.c files after the build > > How so? Make does not even _know_ that %.qidl.c exists.
Sorry, wasn't remembering things correctly. That's how I had things working *before* I'd switched to using qidl-generated subdirs, and it was actually this: %.qidl.c: %.c qidl.h ... <grep and create %.qidl.c> %.o: %.c %.qidl.c <build normal or qidl CC> which isn't doing anything special. This is actually what I ended up going back to in v5 due to some issues I noticed after fixing the bogus rm -f %.qidl.* call you caught. Using .SECONDARY: addresses the issue I had with it deleting intermediate (*.qidl.c) files. > > Paolo >