On 06/06/2012 01:12 PM, Paolo Bonzini wrote:
Il 06/06/2012 01:40, Anthony Liguori ha scritto:
The only way I can think of getting around this is to do nasty things
like adding an
#include "qapi-generated/mc146818rtc-qapi-visit.c";
in hw/mc146818rtc.c.
It doesn't look that ugly, though perhaps I'm biased because that's
again exactly what GCC does.
A cleaner way to do this this to have mc146818rtc-qapi-visit.c have:
#include "mc146818rtc.c"
As the first line of the file. Then don't build mc146818rtc.c directly
and instead only build the qapi-visit.o variant.
This could all be done through make magic too.
Sounds like we have very different definitions of clean. :)
Fair enough :-)
Either approach is fine by me FWIW.
Regards,
Anthony Liguori
Paolo