From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Jackson <ian.jackson@citrix.com>,
Christoph Egger <Christoph.Egger@amd.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v2 3/4] python: set absolute path to libxl.h on _pyxl_types.c
Date: Thu, 17 May 2012 13:16:29 +0100 [thread overview]
Message-ID: <1337256990-51913-3-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1337256990-51913-1-git-send-email-roger.pau@citrix.com>
genwrap.py generates _pyxl_types.c, which includes libxl.h, but if
libxl.h is already present in the include search path, the old one was
included instead of the new one, giving compilation errors. Since
_pyxl_types.c is generated at compilation time, we can safely set
the path to libxl.h include.
I've only experienced this problem when compiling Xen on NetBSD with
old header files in the include path, Linux seems to not have this
problem.
Cc: Ian Jackson <ian.jackson@citrix.com>
Cc: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Roger Pau Monne <roger.pau@citrix.com>
---
tools/python/genwrap.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/python/genwrap.py b/tools/python/genwrap.py
index af8a5e9..0d7cc98 100644
--- a/tools/python/genwrap.py
+++ b/tools/python/genwrap.py
@@ -309,10 +309,12 @@ _hidden int genwrap__defbool_set(PyObject *v, libxl_defbool *db);
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
-#include "libxl.h" /* gah */
+#include "%s" /* gah */
#include "%s"
-""" % tuple((' '.join(sys.argv),) + (os.path.split(decls)[-1:]),))
+""" % tuple((' '.join(sys.argv),) +
+ (os.path.dirname(sys.argv[1]) + "/libxl.h",) +
+ (os.path.split(decls)[-1:]),))
for ty in types:
if ty.private:
continue
--
1.7.7.5 (Apple Git-26)
next prev parent reply other threads:[~2012-05-17 12:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 12:16 [PATCH v2 1/4] build/tools: disable libvchan build on NetBSD Roger Pau Monne
2012-05-17 12:16 ` [PATCH v2 2/4] autoconf: correctly parse *_INCLUDES and *_LIB env vars Roger Pau Monne
2012-05-17 12:16 ` Roger Pau Monne [this message]
2012-05-17 13:25 ` [PATCH v2 3/4] python: set absolute path to libxl.h on _pyxl_types.c Ian Campbell
2012-05-17 14:02 ` Roger Pau Monne
2012-05-17 14:38 ` Ian Campbell
2012-05-17 15:10 ` Roger Pau Monne
2012-05-17 15:14 ` Ian Campbell
2012-05-18 8:37 ` Christoph Egger
2012-05-18 8:41 ` Ian Campbell
2012-05-18 8:44 ` Roger Pau Monne
2012-05-18 8:41 ` Roger Pau Monne
2012-05-18 8:52 ` Ian Campbell
2012-05-18 9:14 ` Roger Pau Monne
2012-05-18 9:25 ` Ian Campbell
2012-05-18 11:13 ` Ian Jackson
2012-05-18 11:17 ` Roger Pau Monne
2012-05-17 12:16 ` [PATCH v2 4/4] tools/build: change order of config/Tools.mk inclusion Roger Pau Monne
2012-05-18 11:17 ` Ian Jackson
2012-05-18 11:29 ` Roger Pau Monne
2012-05-18 11:46 ` Ian Jackson
2012-05-18 11:52 ` Christoph Egger
2012-05-18 11:59 ` Roger Pau Monne
2012-05-18 13:30 ` Ian Jackson
2012-05-18 14:08 ` Christoph Egger
2012-05-22 14:48 ` Roger Pau Monne
2012-05-17 13:22 ` [PATCH v2 1/4] build/tools: disable libvchan build on NetBSD Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337256990-51913-3-git-send-email-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=Christoph.Egger@amd.com \
--cc=ian.jackson@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).