[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v4.1 18/19] tools/config: add XEN_RUN_STORED to config.h



Instead of adding the definition of XEN_RUN_STORED to CFLAGS in
multiple Makefiles, let configure add it to tools/config.h instead.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
V4:
- new patch
V4.1:
- drop XEN_RUN_STORED from config/Paths.mk.in (Anthony PERARD)
---
 config/Paths.mk.in             | 1 -
 configure                      | 5 +++++
 m4/paths.m4                    | 1 +
 tools/config.h.in              | 3 +++
 tools/configure                | 5 +++++
 tools/libs/store/Makefile      | 1 -
 tools/xenstore/Makefile.common | 1 -
 7 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/config/Paths.mk.in b/config/Paths.mk.in
index 44bab1d748..38b1bb6b1f 100644
--- a/config/Paths.mk.in
+++ b/config/Paths.mk.in
@@ -41,7 +41,6 @@ MAN8DIR                  := $(mandir)/man8
 XEN_RUN_DIR              := @XEN_RUN_DIR@
 XEN_LOG_DIR              := @XEN_LOG_DIR@
 XEN_LIB_DIR              := @XEN_LIB_DIR@
-XEN_RUN_STORED           := @XEN_RUN_STORED@
 
 CONFIG_DIR               := @CONFIG_DIR@
 INITD_DIR                := @INITD_DIR@
diff --git a/configure b/configure
index 99f8434cbf..dd05f314f6 100755
--- a/configure
+++ b/configure
@@ -2079,6 +2079,11 @@ _ACEOF
 XEN_RUN_STORED=$rundir_path/xenstored
 
 
+cat >>confdefs.h <<_ACEOF
+#define XEN_RUN_STORED "$XEN_RUN_STORED"
+_ACEOF
+
+
 XEN_LIB_DIR=$localstatedir/lib/xen
 
 
diff --git a/m4/paths.m4 b/m4/paths.m4
index e4104bcce0..3f94c62efb 100644
--- a/m4/paths.m4
+++ b/m4/paths.m4
@@ -138,6 +138,7 @@ AC_DEFINE_UNQUOTED([XEN_LOG_DIR], ["$XEN_LOG_DIR"], [Xen's 
log dir])
 
 XEN_RUN_STORED=$rundir_path/xenstored
 AC_SUBST(XEN_RUN_STORED)
+AC_DEFINE_UNQUOTED([XEN_RUN_STORED], ["$XEN_RUN_STORED"], [Xenstore's runstate 
path])
 
 XEN_LIB_DIR=$localstatedir/lib/xen
 AC_SUBST(XEN_LIB_DIR)
diff --git a/tools/config.h.in b/tools/config.h.in
index 3071cb3998..41014a65ed 100644
--- a/tools/config.h.in
+++ b/tools/config.h.in
@@ -153,6 +153,9 @@
 /* Xen's script dir */
 #undef XEN_SCRIPT_DIR
 
+/* Xenstore's runstate path */
+#undef XEN_RUN_STORED
+
 /* Enable large inode numbers on Mac OS X 10.5.  */
 #ifndef _DARWIN_USE_64_BIT_INODE
 # define _DARWIN_USE_64_BIT_INODE 1
diff --git a/tools/configure b/tools/configure
index 52b4717d01..5c05fa5ea1 100755
--- a/tools/configure
+++ b/tools/configure
@@ -4060,6 +4060,11 @@ _ACEOF
 XEN_RUN_STORED=$rundir_path/xenstored
 
 
+cat >>confdefs.h <<_ACEOF
+#define XEN_RUN_STORED "$XEN_RUN_STORED"
+_ACEOF
+
+
 XEN_LIB_DIR=$localstatedir/lib/xen
 
 
diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile
index c1a1508713..0649cf8307 100644
--- a/tools/libs/store/Makefile
+++ b/tools/libs/store/Makefile
@@ -18,7 +18,6 @@ include ../libs.mk
 # Include configure output (config.h)
 CFLAGS += -include $(XEN_ROOT)/tools/config.h
 CFLAGS += $(CFLAGS_libxentoolcore)
-CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\""
 
 xs.opic: CFLAGS += -DUSE_PTHREAD
 ifeq ($(CONFIG_Linux),y)
diff --git a/tools/xenstore/Makefile.common b/tools/xenstore/Makefile.common
index 3259ab51e6..41973a8a5e 100644
--- a/tools/xenstore/Makefile.common
+++ b/tools/xenstore/Makefile.common
@@ -16,7 +16,6 @@ CFLAGS += $(CFLAGS_libxenevtchn)
 CFLAGS += $(CFLAGS_libxenctrl)
 CFLAGS += $(CFLAGS_libxenguest)
 CFLAGS += $(CFLAGS_libxentoolcore)
-CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\""
 
 ifdef CONFIG_STUBDOM
 CFLAGS += -DNO_SOCKETS=1
-- 
2.35.3




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.