xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, wei.liu2@citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH 5/5] tools: Do not add top-level tools dir to include path
Date: Tue, 7 Jul 2015 16:40:32 +0100	[thread overview]
Message-ID: <1436283632-6370-5-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1436283618.25646.253.camel@citrix.com>

Instead switch to an explicit -include $(XEN_ROOT)/tools/config.h to
pickup config.h.

Most places already do this, fixup the rest.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libfsimage/ext2fs-lib/Makefile     | 4 ++--
 tools/libfsimage/ext2fs-lib/ext2fs-lib.c | 3 ---
 tools/misc/Makefile                      | 4 +++-
 tools/misc/gtraceview.c                  | 3 ---
 tools/ocaml/xenstored/Makefile           | 3 ++-
 tools/ocaml/xenstored/systemd_stubs.c    | 1 -
 tools/xenstat/xentop/Makefile            | 4 ++--
 tools/xenstat/xentop/xentop.c            | 3 ---
 tools/xenstore/Makefile                  | 3 ++-
 tools/xenstore/xenstored_core.c          | 1 -
 10 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/tools/libfsimage/ext2fs-lib/Makefile b/tools/libfsimage/ext2fs-lib/Makefile
index 671fbff..0e00fde 100644
--- a/tools/libfsimage/ext2fs-lib/Makefile
+++ b/tools/libfsimage/ext2fs-lib/Makefile
@@ -6,8 +6,8 @@ FS = ext2fs-lib
 
 FS_LIBDEPS = $(EXTFS_LIBS)
 
-# Include configure output (config.h) to headers search path
-CFLAGS += -I$(XEN_ROOT)/tools
+# Include configure output (config.h)
+CFLAGS += -include $(XEN_ROOT)/tools/config.h
 
 .PHONY: all
 all: fs-all
diff --git a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
index ed47146..84b6d1e 100644
--- a/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
+++ b/tools/libfsimage/ext2fs-lib/ext2fs-lib.c
@@ -21,9 +21,6 @@
  * Use is subject to license terms.
  */
 
-/* Include output from configure */
-#include <config.h>
-
 #include <fsimage_plugin.h>
 #include INCLUDE_EXTFS_H
 #include <errno.h>
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 82c361f..c4490f3 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -1,7 +1,9 @@
 XEN_ROOT=$(CURDIR)/../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS += -Werror -I$(XEN_ROOT)/tools
+CFLAGS += -Werror
+# Include configure output (config.h)
+CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS += $(CFLAGS_libxenctrl)
 CFLAGS += $(CFLAGS_xeninclude)
 CFLAGS += $(CFLAGS_libxenstore)
diff --git a/tools/misc/gtraceview.c b/tools/misc/gtraceview.c
index 501f86a..d9f1185 100644
--- a/tools/misc/gtraceview.c
+++ b/tools/misc/gtraceview.c
@@ -16,9 +16,6 @@
  * Place - Suite 330, Boston, MA 02111-1307 USA.
  */
 
-/* Include output from configure */
-#include <config.h>
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile
index bcf09d4..d861f11 100644
--- a/tools/ocaml/xenstored/Makefile
+++ b/tools/ocaml/xenstored/Makefile
@@ -2,7 +2,8 @@ XEN_ROOT = $(CURDIR)/../../..
 OCAML_TOPLEVEL = $(CURDIR)/..
 include $(OCAML_TOPLEVEL)/common.make
 
-CFLAGS += -I$(XEN_ROOT)/tools/
+# Include configure output (config.h)
+CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS-$(CONFIG_SYSTEMD)  += $(SYSTEMD_CFLAGS)
 LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS)
 
diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c
index 623592c..d924ff1 100644
--- a/tools/ocaml/xenstored/systemd_stubs.c
+++ b/tools/ocaml/xenstored/systemd_stubs.c
@@ -22,7 +22,6 @@
 #include <caml/custom.h>
 #include <caml/signals.h>
 #include <caml/fail.h>
-#include <config.h>
 
 #if defined(HAVE_SYSTEMD)
 
diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile
index 97950b9..e67c9ab 100644
--- a/tools/xenstat/xentop/Makefile
+++ b/tools/xenstat/xentop/Makefile
@@ -22,8 +22,8 @@ CFLAGS += -DGCC_PRINTF -Werror $(CFLAGS_libxenstat)
 LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(TINFO_LIBS) $(SOCKET_LIBS) -lm -lyajl
 CFLAGS += -DHOST_$(XEN_OS)
 
-# Include configure output (config.h) to headers search path
-CFLAGS += -I$(XEN_ROOT)/tools
+# Include configure output (config.h)
+CFLAGS += -include $(XEN_ROOT)/tools/config.h
 LDFLAGS += $(APPEND_LDFLAGS)
 
 .PHONY: all
diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c
index 23b57f1..8173886 100644
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -19,9 +19,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* Include output from configure */
-#include <config.h>
-
 /* get curses header from configure */
 #include INCLUDE_CURSES_H
 
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 30f3b46..1b4a494 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -6,7 +6,8 @@ MINOR = 3
 
 CFLAGS += -Werror
 CFLAGS += -I.
-CFLAGS += -I$(XEN_ROOT)/tools/
+# Include configure output (config.h)
+CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS += -I./include
 CFLAGS += $(CFLAGS_libxenctrl)
 CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\""
diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 3fd9a20..b18000d 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -40,7 +40,6 @@
 #include <signal.h>
 #include <assert.h>
 #include <setjmp.h>
-#include <config.h>
 
 #include "utils.h"
 #include "list.h"
-- 
2.1.4

  parent reply	other threads:[~2015-07-07 15:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 15:40 [PATCH 0/5] tools: 3 misc fixes/cleanups Ian Campbell
2015-07-07 15:40 ` [PATCH 1/5] tools: libxc: fix "alocated" typo in comment Ian Campbell
2015-07-07 16:02   ` Ian Jackson
2015-07-07 15:40 ` [PATCH 2/5] libxc: Correct log message in xc_map_foreign_bulk Ian Campbell
2015-07-07 16:02   ` Ian Jackson
2015-07-07 15:40 ` [PATCH 3/5] tools: libxl: Log on more error paths on domain create failure Ian Campbell
2015-07-07 16:02   ` Ian Jackson
2015-07-07 15:40 ` [PATCH 4/5] tools: Link in-tree libvchan and libblktapctl users against lib....so Ian Campbell
2015-07-07 16:03   ` Ian Jackson
2015-07-07 15:40 ` Ian Campbell [this message]
2015-07-07 16:03   ` [PATCH 5/5] tools: Do not add top-level tools dir to include path Ian Jackson
2015-07-07 15:50 ` [PATCH 0/5] tools: 3 misc fixes/cleanups Wei Liu
2015-07-07 16:05   ` Ian Campbell
2015-07-08 12:44   ` 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=1436283632-6370-5-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@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).