From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHSFK-000380-Up for qemu-devel@nongnu.org; Mon, 27 Jun 2016 04:50:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHSFH-00034K-PC for qemu-devel@nongnu.org; Mon, 27 Jun 2016 04:50:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHSFH-000346-J5 for qemu-devel@nongnu.org; Mon, 27 Jun 2016 04:50:19 -0400 From: Markus Armbruster References: <1466777957-5126-1-git-send-email-armbru@redhat.com> <1466777957-5126-2-git-send-email-armbru@redhat.com> <576D49AA.30906@redhat.com> Date: Mon, 27 Jun 2016 10:50:16 +0200 In-Reply-To: <576D49AA.30906@redhat.com> (Eric Blake's message of "Fri, 24 Jun 2016 08:54:34 -0600") Message-ID: <87oa6nhv7b.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Subject: Re: [Qemu-devel] [PATCH RFC v2 1/5] Use #include "..." exactly for our own headers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, pbonzini@redhat.com --=-=-= Content-Type: text/plain Eric Blake writes: > On 06/24/2016 08:19 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> Reviewed-by: Peter Maydell > > 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. 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. [...] --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=map-include-to-header.pl~ --=-=-=--