qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC v2 1/5] Use #include "..." exactly for our o


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH RFC v2 1/5] Use #include "..." exactly for our own headers
Date: Mon, 27 Jun 2016 10:50:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 06/24/2016 08:19 AM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <address@hidden>
>> Reviewed-by: Peter Maydell <address@hidden>
>
> Worth mentioning how you found the culprits in the commit message, so
> that someone could repeat the task when backporting this patch or
> dealing with future cruft that inevitably creeps back in without an
> automated checkin validation tool?

With an ugly Perl script, of course %-/

If our use of -I was sane, the mapping from #include's file to the
actual file would be straightforward.  It isn't, because we add
different -I for different parts of the code.  To spice up things, we
also name a few of our headers just like system headers we use
elsewhere, e.g. "util.h" in net/ vs. <util.h> in util/qemu-openpty.c.

My Perl script tries to match #include directives against source files,
and prints its findings.  The headers it can't map to source files must
either be generated headers or system headers.  The headers it can map
might be system headers anyway.

I'm afraid my script and its usage is too brittle to be of much use
later on.  I attach it anyway.

[...]


Attachment: map-include-to-header.pl~
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]