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

[Xen-changelog] [xen master] tools: don't require unavailable optional libraries in pkg-config files



commit 3946384089720eacd9d7357d37cd4a99076d074e
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Fri May 12 15:10:51 2017 +0200
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue May 16 12:38:25 2017 +0100

    tools: don't require unavailable optional libraries in pkg-config files
    
    blktap2 is optional, so there should be no pkg-config file requiring
    xenblktapctl if it isn't enabled for the build.
    
    Add a filter mechanism to tools/Rules.mk to filter out optional
    libraries.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Release-acked-by: Julien Grall <julien.grall@xxxxxxx>
---
 tools/Rules.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 7cb28f5..f55fb66 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -175,6 +175,7 @@ CFLAGS_libblktapctl =
 SHDEPS_libblktapctl =
 LDLIBS_libblktapctl =
 SHLIB_libblktapctl  =
+PKG_CONFIG_REMOVE += xenblktapctl
 endif
 
 CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) 
$(CFLAGS_xeninclude)
@@ -250,6 +251,8 @@ endif
 
 PKG_CONFIG_DIR ?= $(XEN_ROOT)/tools/pkg-config
 
+PKG_CONFIG_FILTER = $(foreach l,$(PKG_CONFIG_REMOVE),-e 's!\([ ,]\)$(l),!\1!g' 
-e 's![ ,]$(l)$$!!g')
+
 $(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile
        mkdir -p $(PKG_CONFIG_DIR)
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
@@ -259,7 +262,8 @@ $(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile
             -e 's!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
             -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
             -e 's!@@cflagslocal@@!$(PKG_CONFIG_CFLAGS_LOCAL)!g' \
-            -e 's!@@libsflag@@!-Wl,-rpath-link=!g' < $< > $@
+            -e 's!@@libsflag@@!-Wl,-rpath-link=!g' \
+            $(PKG_CONFIG_FILTER) < $< > $@
 
 %.pc: %.pc.in Makefile
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
@@ -269,4 +273,5 @@ $(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile
             -e 's!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
             -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
             -e 's!@@cflagslocal@@!!g' \
-            -e 's!@@libsflag@@!-L!g' < $< > $@
+            -e 's!@@libsflag@@!-L!g' \
+            $(PKG_CONFIG_FILTER) < $< > $@
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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