Re: [Spice-devel] [PATCH 3/2] marshaller: Use #include for headers in $srcdir/common

2014-04-06 Thread Alon Levy
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 04/02/2014 12:27 PM, Christophe Fergeau wrote:
 Ping ?

If this doesn't break (i.e. we have a -I directive for every required
directory) then ack.

 
 On Tue, Mar 25, 2014 at 04:40:14PM +0100, Christophe Fergeau
 wrote:
 Since the (de)marshallers are now generated in $builddir and not
 in $srcdir, when these generated files include a file located in 
 $srcdir/common, the compiler will find them thanks to a -I
 directive, so it makes more sense to use  rather than  when
 including them. --- Hey,
 
 I finally got what you meant in this review comment, and this
 should be addessed by this additional patch
 
 Christophe
 
 python_modules/demarshal.py | 2 +- spice_codegen.py|
 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/python_modules/demarshal.py
 b/python_modules/demarshal.py index 794cd25..b7e51dc 100644 ---
 a/python_modules/demarshal.py +++ b/python_modules/demarshal.py 
 @@ -1250,7 +1250,7 @@ def write_includes(writer): 
 writer.writeln(#include stdio.h) writer.writeln(#include
 spice/protocol.h) writer.writeln(#include spice/macros.h) 
 -writer.writeln('#include common/mem.h') +
 writer.writeln('#include common/mem.h') writer.newline() 
 writer.writeln(#ifdef _MSC_VER) writer.writeln(#pragma
 warning(disable:4101)) diff --git a/spice_codegen.py
 b/spice_codegen.py index d35d949..c8376cc 100755 ---
 a/spice_codegen.py +++ b/spice_codegen.py @@ -209,8 +209,8 @@ if
 options.print_error:
 
 if options.includes: for i in options.includes: -
 writer.header.writeln('#include %s' % i) -
 writer.writeln('#include %s' % i) +
 writer.header.writeln('#include %s' % i) +
 writer.writeln('#include %s' % i)
 
 if options.generate_enums or options.generate_dissector: 
 write_enums(writer, options.generate_dissector) -- 1.8.5.3
 
 ___ Spice-devel
 mailing list Spice-devel@lists.freedesktop.org 
 http://lists.freedesktop.org/mailman/listinfo/spice-devel
 
 
 ___ Spice-devel
 mailing list Spice-devel@lists.freedesktop.org 
 http://lists.freedesktop.org/mailman/listinfo/spice-devel

-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTQYk2AAoJEGSFt2Lm6PXuTvIH/Rl6cDrPGzt2qIml4OXDPCAe
HKaZKwK0iIcdEKF+E/6y8pvSLLsysj0aLbs0KwmkHjOGBgVXJmWJhK/+ADtq7pUb
ZMgS18Pb91QEcmqJm6v5kOGWjt3LIQx6quK9EpOu273vbyoqEG9zk/zZhprm7phJ
snIsrn9x9bB2ARTHOjgN4a6M+HAlVoMSXZRpE/UC4x0qyTNqXjZaJUpzzKKbAnKC
9M+nSPl4sIa3OFdHyrBQXmfYuJ08kH4r+gfBXD5Mbz1HgVIoie/em+Gf+Fktb6oO
I+J+9frDohVg/AcRxtmXHJpGOmrAEv7miTyGsf+Od4emxHYFtn9NGprAmCfnAvE=
=i/3d
-END PGP SIGNATURE-
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


Re: [Spice-devel] [PATCH 3/2] marshaller: Use #include for headers in $srcdir/common

2014-04-02 Thread Christophe Fergeau
Ping ?

On Tue, Mar 25, 2014 at 04:40:14PM +0100, Christophe Fergeau wrote:
 Since the (de)marshallers are now generated in $builddir and not in
 $srcdir, when these generated files include a file located in
 $srcdir/common, the compiler will find them thanks to a -I directive, so it
 makes more sense to use  rather than  when including them.
 ---
 Hey,
 
 I finally got what you meant in this review comment, and this should be
 addessed by this additional patch
 
 Christophe
 
  python_modules/demarshal.py | 2 +-
  spice_codegen.py| 4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
 index 794cd25..b7e51dc 100644
 --- a/python_modules/demarshal.py
 +++ b/python_modules/demarshal.py
 @@ -1250,7 +1250,7 @@ def write_includes(writer):
  writer.writeln(#include stdio.h)
  writer.writeln(#include spice/protocol.h)
  writer.writeln(#include spice/macros.h)
 -writer.writeln('#include common/mem.h')
 +writer.writeln('#include common/mem.h')
  writer.newline()
  writer.writeln(#ifdef _MSC_VER)
  writer.writeln(#pragma warning(disable:4101))
 diff --git a/spice_codegen.py b/spice_codegen.py
 index d35d949..c8376cc 100755
 --- a/spice_codegen.py
 +++ b/spice_codegen.py
 @@ -209,8 +209,8 @@ if options.print_error:
  
  if options.includes:
  for i in options.includes:
 -writer.header.writeln('#include %s' % i)
 -writer.writeln('#include %s' % i)
 +writer.header.writeln('#include %s' % i)
 +writer.writeln('#include %s' % i)
  
  if options.generate_enums or options.generate_dissector:
  write_enums(writer, options.generate_dissector)
 -- 
 1.8.5.3
 
 ___
 Spice-devel mailing list
 Spice-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/spice-devel


pgpU2sJMBwb9l.pgp
Description: PGP signature
___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Spice-devel] [PATCH 3/2] marshaller: Use #include for headers in $srcdir/common

2014-03-25 Thread Christophe Fergeau
Since the (de)marshallers are now generated in $builddir and not in
$srcdir, when these generated files include a file located in
$srcdir/common, the compiler will find them thanks to a -I directive, so it
makes more sense to use  rather than  when including them.
---
Hey,

I finally got what you meant in this review comment, and this should be
addessed by this additional patch

Christophe

 python_modules/demarshal.py | 2 +-
 spice_codegen.py| 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
index 794cd25..b7e51dc 100644
--- a/python_modules/demarshal.py
+++ b/python_modules/demarshal.py
@@ -1250,7 +1250,7 @@ def write_includes(writer):
 writer.writeln(#include stdio.h)
 writer.writeln(#include spice/protocol.h)
 writer.writeln(#include spice/macros.h)
-writer.writeln('#include common/mem.h')
+writer.writeln('#include common/mem.h')
 writer.newline()
 writer.writeln(#ifdef _MSC_VER)
 writer.writeln(#pragma warning(disable:4101))
diff --git a/spice_codegen.py b/spice_codegen.py
index d35d949..c8376cc 100755
--- a/spice_codegen.py
+++ b/spice_codegen.py
@@ -209,8 +209,8 @@ if options.print_error:
 
 if options.includes:
 for i in options.includes:
-writer.header.writeln('#include %s' % i)
-writer.writeln('#include %s' % i)
+writer.header.writeln('#include %s' % i)
+writer.writeln('#include %s' % i)
 
 if options.generate_enums or options.generate_dissector:
 write_enums(writer, options.generate_dissector)
-- 
1.8.5.3

___
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel