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

[Xen-devel] [PATCH 8/9] tools/libxc: provide variable paths to libxc



In preparation to removal of hardcoded /var/run/xen paths, provide
XEN_RUN_DIR and related directories to xc_private.h. Similar code exists
already for libxl, stubdom and other parts.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 tools/libxc/Makefile     | 13 ++++++++++++-
 tools/libxc/xc_private.h |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index a74b19e..1bb6825 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -118,11 +118,21 @@ ifneq ($(stubdom),y)
 LIB += xenctrl_osdep_ENOSYS.so
 endif
 
+genpath-target = $(call buildmakevars2file,_paths.h.tmp)
+$(eval $(genpath-target))
+
+_paths.h: genpath
+       sed -e "s/\([^=]*\)=\(.*\)/#define \1 \2/g" $@.tmp >$@.2.tmp
+       rm -f $@.tmp
+       $(call move-if-changed,$@.2.tmp,$@)
+
+xc_private.h: _paths.h
+
 .PHONY: all
 all: build
 
 .PHONY: build
-build:
+build: xc_private.h
        $(MAKE) libs
 
 .PHONY: libs
@@ -150,6 +160,7 @@ TAGS:
 .PHONY: clean
 clean:
        rm -rf *.rpm $(LIB) *~ $(DEPS) \
+           _paths.h \
             $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
             $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS) \
             $(OSDEP_LIB_OBJS) $(OSDEP_PIC_OBJS)
diff --git a/tools/libxc/xc_private.h b/tools/libxc/xc_private.h
index 670a82d..786dc61 100644
--- a/tools/libxc/xc_private.h
+++ b/tools/libxc/xc_private.h
@@ -29,6 +29,7 @@
 #include <stdlib.h>
 #include <sys/ioctl.h>
 
+#include "_paths.h"
 #include "xenctrl.h"
 #include "xenctrlosdep.h"
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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