Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:54:37PM +0100, Max Reitz wrote: > But I guess the main advantage with using this rule I see is that it's > better for people reading the code. It's just nice to know whether a > file belongs to qemu or not by just looking at the #include statement. > (Note that this

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 11:12:00AM -0500, Eric Blake wrote: > > Why can't we fix Makefile to include BOTH the build and the source > directories (to pick up generated files first, and then version-controlled > files), and possibly include logic to simplify to a single -I instead of two > when

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 11:12:00AM -0500, Eric Blake wrote: > On 03/19/2018 08:54 PM, Michael S. Tsirkin wrote: > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > [I'm replying without having read the rest of the thread, so bear

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Eric Blake
On 03/19/2018 08:54 PM, Michael S. Tsirkin wrote: QEMU coding style at the moment asks for all non-system include files to be used with #include "foo.h". [I'm replying without having read the rest of the thread, so bear with me if I repeat some of the other comments that have already been

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 01:58:32PM +, Daniel P. Berrangé wrote: > > That's the C language for you though. For better or worse, these are > > the rules that K came up with. > > No one seriously tries to keep compliance with original K C these days, > things have moved on massively since then.

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 03:50:02PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 20, 2018 at 01:41:17PM +, Daniel P. Berrangé wrote: > > On Tue, Mar 20, 2018 at 02:32:16PM +0100, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > So for these, we should use "". None of these are generated

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Max Reitz
On 2018-03-20 14:41, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:32:16PM +0100, Gerd Hoffmann wrote: >> Hi, >> So for these, we should use "". None of these are generated files though. >>> >>> That leads to crazy inconsistent message for developers where 50% of QEMU >>> header

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 02:46:46PM +0100, Thomas Huth wrote: > On 20.03.2018 14:32, Gerd Hoffmann wrote: > > Hi, > > > >>> So for these, we should use "". None of these are generated files though. > >> > >> That leads to crazy inconsistent message for developers where 50% of QEMU > >> header

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Thomas Huth
On 20.03.2018 14:32, Gerd Hoffmann wrote: > Hi, > >>> So for these, we should use "". None of these are generated files though. >> >> That leads to crazy inconsistent message for developers where 50% of QEMU >> header files must use <> and the other 50% of header files must use "". > > The

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 02:32:16PM +0100, Gerd Hoffmann wrote: > Hi, > > > > So for these, we should use "". None of these are generated files though. > > > > That leads to crazy inconsistent message for developers where 50% of QEMU > > header files must use <> and the other 50% of header

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 03:54:36AM +0200, Michael S. Tsirkin wrote: > QEMU coding style at the moment asks for all non-system > include files to be used with #include "foo.h". > However this rule actually does not make sense and > creates issues for when the included file is generated. > > In C,

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 12:39:00PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:28:42PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > > > > On

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 02:28:42PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > > > On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > > > > On

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 12:18:41PM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > > > Le

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 02:12:24PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > > > QEMU coding style at the

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 09:44:06AM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > > QEMU coding style at the moment asks for all non-system > > > include files to be used with #include

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > However this rule actually does not make sense and > > creates

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Michael S. Tsirkin
On Tue, Mar 20, 2018 at 10:27:19AM +, Daniel P. Berrangé wrote: > On Tue, Mar 20, 2018 at 10:01:24AM +, Peter Maydell wrote: > > On 20 March 2018 at 09:44, Daniel P. Berrangé wrote: > > > We can follow what autoconf does, and add a check to configure to see if > > >

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 10:01:24AM +, Peter Maydell wrote: > On 20 March 2018 at 09:44, Daniel P. Berrangé wrote: > > We can follow what autoconf does, and add a check to configure to see if > > there are generated files left in the source dir, when configuring with > >

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Peter Maydell
On 20 March 2018 at 09:44, Daniel P. Berrangé wrote: > We can follow what autoconf does, and add a check to configure to see if > there are generated files left in the source dir, when configuring with > builddir != srcdir, and exit with error, telling user to clean their >

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Daniel P . Berrangé
On Tue, Mar 20, 2018 at 09:58:23AM +0100, Laurent Vivier wrote: > Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > > QEMU coding style at the moment asks for all non-system > > include files to be used with #include "foo.h". > > However this rule actually does not make sense and > > creates

Re: [Xen-devel] [PATCH] qemu: include generated files with <> and not ""

2018-03-20 Thread Laurent Vivier
Le 20/03/2018 à 02:54, Michael S. Tsirkin a écrit : > QEMU coding style at the moment asks for all non-system > include files to be used with #include "foo.h". > However this rule actually does not make sense and > creates issues for when the included file is generated. If you change that, we can