Skip to contentSkip to conversation

libxl: two pkg-config patches

PATCH In review Wei Liu 2 participants 4 messages Jan 20, 2015 – Jan 27, 2015

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

v2 cover libxl: two pkg-config patches

Wei Liu (2):
libxl: delete xenlight.pc.in in distclean
libxl: provide xlutil.pc

 .gitignore                  |    4 ++--
 tools/configure.ac          |    1 +
 tools/libxl/Makefile        |   11 +++++++----
 tools/libxl/xlutil.pc.in.in |    9 +++++++++
 4 files changed, 19 insertions(+), 6 deletions(-)
 create mode 100644 tools/libxl/xlutil.pc.in.in
Signature · 1 line
1.7.10.4
author
#1 lore raw

PATCH v2 1/2 libxl: delete xenlight.pc.in in distclean

That file is generated by configure. Deleting it in "make clean" leads to rerun configure. Move it under distclean target.

---
 tools/libxl/Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/libxl/Makefile +2 -1
index 08fe814..bb19802 100644
@@ -282,9 +282,10 @@ clean:
 	$(RM) -f _*.h *.o *.so* *.a $(CLIENTS) $(DEPS)
 	$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
 	$(RM) -f testidl.c.new testidl.c *.api-ok
-	$(RM) -f xenlight.pc xenlight.pc.in
+	$(RM) -f xenlight.pc
 
 distclean: clean
+	$(RM) -f xenlight.pc.in
 
 realclean: distclean
 	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
Signature · 1 line
1.7.10.4
author
#2 lore raw

PATCH v2 2/2 libxl: provide xlutil.pc

In reply to Wei Liu

Please rerun autogen.sh after applying this patch.

---
 .gitignore                  |    4 ++--
 tools/configure.ac          |    1 +
 tools/libxl/Makefile        |   10 ++++++----
 tools/libxl/xlutil.pc.in.in |    9 +++++++++
 4 files changed, 18 insertions(+), 6 deletions(-)
 create mode 100644 tools/libxl/xlutil.pc.in.in
.gitignore +2 -2
index 33c2ca0..13ee05b 100644
@@ -153,8 +153,8 @@ tools/include/xen/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
 tools/libxl/libxlu_cfg_y.output
-tools/libxl/xenlight.pc
-tools/libxl/xenlight.pc.in
+tools/libxl/*.pc
+tools/libxl/*.pc.in
 tools/libxl/xl
 tools/libxl/testenum
 tools/libxl/testenum.c
tools/configure.ac +1 -0
index 113285d..1ecc216 100644
@@ -28,6 +28,7 @@ hotplug/Linux/xen-hotplug-common.sh
 hotplug/Linux/xendomains
 hotplug/NetBSD/rc.d/xencommons
 libxl/xenlight.pc.in
+libxl/xlutil.pc.in
 ])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([../])
tools/libxl/Makefile +6 -4
index bb19802..5df4970 100644
@@ -143,7 +143,7 @@ $(XEN_INIT_DOM0_OBJS): CFLAGS += $(CFLAGS_libxenstore)
 SAVE_HELPER_OBJS = libxl_save_helper.o _libxl_save_msgs_helper.o
 $(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl)
 
-PKG_CONFIG = xenlight.pc
+PKG_CONFIG = xenlight.pc xlutil.pc
 
 testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight)
 testidl.c: libxl_types.idl gentest.py libxl.h $(AUTOINCS)
@@ -250,8 +250,8 @@ 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_libxenctrl) $(APPEND_LDFLAGS)
 
-xenlight.pc: xenlight.pc.in Makefile
-	@sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < xenlight.pc.in > [email protected]
+$(PKG_CONFIG): %.in : Makefile
+	@sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < [email protected] > [email protected]
 	@mv -f [email protected] $@
 
 .PHONY: install
@@ -276,6 +276,7 @@ install: all
 	$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(INCLUDEDIR)
 	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
 	$(INSTALL_DATA) xenlight.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
+	$(INSTALL_DATA) xlutil.pc $(DESTDIR)$(SHAREDIR)/pkgconfig/
 
 .PHONY: clean
 clean:
@@ -283,9 +284,10 @@ clean:
 	$(RM) -f _*.c *.pyc _paths.*.tmp _*.api-for-check
 	$(RM) -f testidl.c.new testidl.c *.api-ok
 	$(RM) -f xenlight.pc
+	$(RM) -f xlutil.pc
 
 distclean: clean
-	$(RM) -f xenlight.pc.in
+	$(RM) -f xenlight.pc.in xlutil.pc.in
 
 realclean: distclean
 	$(RM) -f $(AUTOSRCS) $(AUTOINCS)
tools/libxl/xlutil.pc.in.in new file +9 -0
new file mode 100644
index 0000000..e7dc14d
@@ -0,0 +1,9 @@
+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
Signature · 1 line
1.7.10.4