]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools: adapt xenlight.pc and xlutil.pc to new pkg-config scheme
authorJuergen Gross <jgross@suse.com>
Tue, 14 Mar 2017 13:31:24 +0000 (14:31 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 14 Mar 2017 14:13:14 +0000 (14:13 +0000)
Instead of generating the *.pc.in files at configure time use the new
pkg-config scheme for those files. Add the dependencies to other Xen
libraries as needed.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
.gitignore
tools/configure
tools/configure.ac
tools/libxl/Makefile
tools/libxl/xenlight.pc.in [new file with mode: 0644]
tools/libxl/xenlight.pc.in.in [deleted file]
tools/libxl/xlutil.pc.in [new file with mode: 0644]
tools/libxl/xlutil.pc.in.in [deleted file]

index 175397577ec9086c3e8253f2f9b0c2731d2f41e5..1378368ac5d9145efa49d68dd49e26d734f7deda 100644 (file)
@@ -193,7 +193,6 @@ tools/libxc/*.pc
 tools/libxl/_libxl.api-for-check
 tools/libxl/*.api-ok
 tools/libxl/*.pc
-tools/libxl/*.pc.in
 tools/libxl/dsdt*
 tools/libxl/libxlu_cfg_y.output
 tools/libxl/mk_dsdt
index 851e0f0b7f86a54b9c2ba34ecf7851943d44dd3b..7a57e6562db3eb74f1b1652b00e7685cef7356b8 100755 (executable)
@@ -2411,7 +2411,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain libxl/xenlight.pc.in libxl/xlutil.pc.in ocaml/xenstored/oxenstored.conf"
+ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain ocaml/xenstored/oxenstored.conf"
 
 ac_config_headers="$ac_config_headers config.h"
 
@@ -10415,8 +10415,6 @@ do
     "hotplug/Linux/xendomains") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/xendomains" ;;
     "hotplug/NetBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/NetBSD/rc.d/xencommons" ;;
     "hotplug/NetBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/NetBSD/rc.d/xendriverdomain" ;;
-    "libxl/xenlight.pc.in") CONFIG_FILES="$CONFIG_FILES libxl/xenlight.pc.in" ;;
-    "libxl/xlutil.pc.in") CONFIG_FILES="$CONFIG_FILES libxl/xlutil.pc.in" ;;
     "ocaml/xenstored/oxenstored.conf") CONFIG_FILES="$CONFIG_FILES ocaml/xenstored/oxenstored.conf" ;;
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "hotplug/Linux/systemd/proc-xen.mount") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/systemd/proc-xen.mount" ;;
index 28a539ce7305a069ee1b23abf5e4592da45452a2..307998d8a5a114e44e836bc425bc38348da905af 100644 (file)
@@ -21,8 +21,6 @@ hotplug/Linux/xen-hotplug-common.sh
 hotplug/Linux/xendomains
 hotplug/NetBSD/rc.d/xencommons
 hotplug/NetBSD/rc.d/xendriverdomain
-libxl/xenlight.pc.in
-libxl/xlutil.pc.in
 ocaml/xenstored/oxenstored.conf
 ])
 AC_CONFIG_HEADERS([config.h])
index cd7ce6b98a48e0ccadb4ab1d457372b9350c53b7..12ab2a1930090eaaf5451dbb92dc4a415f39ad53 100644 (file)
@@ -189,6 +189,25 @@ SAVE_HELPER_OBJS = libxl_save_helper.o _libxl_save_msgs_helper.o
 $(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtchn)
 
 PKG_CONFIG = xenlight.pc xlutil.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+xenlight.pc: PKG_CONFIG_VERSION = $(MAJOR).$(MINOR)
+xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
+$(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix)
+$(PKG_CONFIG_INST): PKG_CONFIG_INCDIR = $(includedir)
+$(PKG_CONFIG_INST): PKG_CONFIG_LIBDIR = $(libdir)
+endif
+
+PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
+
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_VERSION = $(MAJOR).$(MINOR)
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
 
 testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight)
 testidl.c: libxl_types.idl gentest.py libxl.h $(AUTOINCS)
@@ -196,7 +215,7 @@ testidl.c: libxl_types.idl gentest.py libxl.h $(AUTOINCS)
        mv testidl.c.new testidl.c
 
 .PHONY: all
-all: $(CLIENTS) $(TEST_PROGS) $(PKG_CONFIG) \
+all: $(CLIENTS) $(TEST_PROGS) $(PKG_CONFIG) $(PKG_CONFIG_LOCAL) \
                libxenlight.so libxenlight.a libxlutil.so libxlutil.a \
        $(AUTOSRCS) $(AUTOINCS)
 
@@ -290,10 +309,6 @@ libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so
 testidl: testidl.o libxlutil.so libxenlight.so
        $(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) $(APPEND_LDFLAGS)
 
-$(PKG_CONFIG): % : %.in Makefile
-       @sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < $< > $@.new
-       @mv -f $@.new $@
-
 .PHONY: install
 install: all
        $(INSTALL_DIR) $(DESTDIR)$(libdir)
diff --git a/tools/libxl/xenlight.pc.in b/tools/libxl/xenlight.pc.in
new file mode 100644 (file)
index 0000000..71d093a
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+xenfirmwaredir=@@firmwaredir@@
+libexec_bin=@@libexecbin@@
+
+Name: Xenlight
+Description: The Xenlight library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: @@libsflag@@${libdir} -lxenlight
+Requires.private: xentoollog,xenevtchn,xenctrl,xenguest,xenstore,blktapctl
diff --git a/tools/libxl/xenlight.pc.in.in b/tools/libxl/xenlight.pc.in.in
deleted file mode 100644 (file)
index c27872e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-includedir=@includedir@
-libdir=@libdir@
-xenfirmwaredir=@XENFIRMWAREDIR@
-libexec_bin=@LIBEXEC_BIN@
-
-Name: Xenlight
-Description: The Xenlight library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: -L${libdir} -lxenlight
diff --git a/tools/libxl/xlutil.pc.in b/tools/libxl/xlutil.pc.in
new file mode 100644 (file)
index 0000000..cdd98fb
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xlutil
+Description: The xl utility library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: @@libsflag@@${libdir} -lxlutil
+Requires.private: xenlight
diff --git a/tools/libxl/xlutil.pc.in.in b/tools/libxl/xlutil.pc.in.in
deleted file mode 100644 (file)
index e7dc14d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-prefix=@prefix@
-includedir=@includedir@
-libdir=@libdir@
-
-Name: Xlutil
-Description: The xl utility library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: -L${libdir} -lxlutil