From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Subject: Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not "" Date: Tue, 20 Mar 2018 17:34:01 +0000 Message-ID: <20180320173401.GG4530@redhat.com> References: <1521510562-529051-1-git-send-email-mst@redhat.com> <20180320185130-mutt-send-email-mst@kernel.org> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Peter Maydell , Dmitry Fleytman , sheepdog@lists.wpkg.org, Ronnie Sahlberg , Li Zhijian , David Hildenbrand , Zhang Chen , Mark Cave-Ayland , qemu-devel@nongnu.org, Markus Armbruster , Keith Busch , Max Filippov , Greg Kurz , Paolo Bonzini , Gerd Hoffmann , "Edgar E. Iglesias" , Subbaraya Sundeep , Yongbok Kim , Eduardo Habkost , Hannes Reinecke , Stefano Stabellini , zhanghailiang , Ben Warren , To: "Michael S. Tsirkin" Return-path: Content-Disposition: inline In-Reply-To: <20180320185130-mutt-send-email-mst@kernel.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-block-bounces+gceqb-qemu-block=m.gmane.org@nongnu.org Sender: "Qemu-block" List-Id: kvm.vger.kernel.org On Tue, Mar 20, 2018 at 07:10:42PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 20, 2018 at 05:33:42PM +0100, Stefan Weil wrote: > > Using <> for system include files and "" for local include files is a > > convention, and as far as I know most projects adhere to that > > convention. So does QEMU currently. Such conventions are not only > > important for humans, but also for tools. There are more tools than the > > C preprocessor which handle <> and "" differently. For example the GNU > > compiler uses -MD or -MMD to automatically generate dependency rules for > > make. While -MD generates dependencies to all include files, -MMD does > > so only for user include files, but not for system include files. "user" > > and "system" means the different forms how include statements are > > written. QEMU still seems to use -MMD: > > > > rules.mak:QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d > > To my knowledge, and according to my limited testing, > system headers in this context means > the default ones not supplied with -I. GCC's definition of system header is here: https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyLAE-00077x-OT for qemu-devel@nongnu.org; Tue, 20 Mar 2018 13:35:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyLAD-0007z8-Px for qemu-devel@nongnu.org; Tue, 20 Mar 2018 13:35:10 -0400 Date: Tue, 20 Mar 2018 17:34:01 +0000 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Message-ID: <20180320173401.GG4530@redhat.com> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <1521510562-529051-1-git-send-email-mst@redhat.com> <20180320185130-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180320185130-mutt-send-email-mst@kernel.org> Subject: Re: [Qemu-devel] [PATCH] qemu: include generated files with <> and not "" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Stefan Weil , Peter Maydell , Dmitry Fleytman , sheepdog@lists.wpkg.org, Pavel Dovgalyuk , Li Zhijian , David Hildenbrand , Jeff Cody , Mark Cave-Ayland , qemu-devel@nongnu.org, Alexander Graf , Markus Armbruster , Keith Busch , Max Filippov , Hannes Reinecke , Gerd Hoffmann , "Edgar E. Iglesias" , Max Reitz , Yongbok Kim , Josh Durgin , Stefano Stabellini , Alberto Garcia , zhanghailiang , Ben Warren , Stefan Berger , Ronnie Sahlberg , Michael Roth , "Richard W.M. Jones" , Christian Borntraeger , =?utf-8?B?SGVydsOp?= Poussineau , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , Shannon Zhao , Marcel Apfelbaum , Liu Yuan , Richard Henderson , Jason Wang , Artyom Tarasenko , Alistair Francis , Jiri Pirko , Eduardo Habkost , Corey Minyard , Amit Shah , Xie Changlong , Riku Voipio , Peter Lieven , "Dr. David Alan Gilbert" , Fabien Chouteau , Greg Kurz , Anthony Perard , Alex Williamson , qemu-arm@nongnu.org, Peter Chubb , Yuval Shaia , Stefan Hajnoczi , Zhang Chen , xen-devel@lists.xenproject.org, John Snow , Fam Zheng , David Gibson , Kevin Wolf , kvm@vger.kernel.org, qemu-block@nongnu.org, Peter Crosthwaite , Hitoshi Mitake , Wen Congyang , qemu-s390x@nongnu.org, Marcelo Tosatti , Laurent Vivier , Juan Quintela , Subbaraya Sundeep , Michael Walle , Igor Mammedov , qemu-ppc@nongnu.org, Cornelia Huck , Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= , Aurelien Jarno , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= On Tue, Mar 20, 2018 at 07:10:42PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 20, 2018 at 05:33:42PM +0100, Stefan Weil wrote: > > Using <> for system include files and "" for local include files is a > > convention, and as far as I know most projects adhere to that > > convention. So does QEMU currently. Such conventions are not only > > important for humans, but also for tools. There are more tools than the > > C preprocessor which handle <> and "" differently. For example the GNU > > compiler uses -MD or -MMD to automatically generate dependency rules for > > make. While -MD generates dependencies to all include files, -MMD does > > so only for user include files, but not for system include files. "user" > > and "system" means the different forms how include statements are > > written. QEMU still seems to use -MMD: > > > > rules.mak:QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d > > To my knowledge, and according to my limited testing, > system headers in this context means > the default ones not supplied with -I. GCC's definition of system header is here: https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|