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

[Xen-changelog] [xen master] tools: add support for additional items in .pc files for local builds



commit 514cd1f15ad3bfa3a84493c83b9ac12dbca7c640
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Tue Mar 14 14:31:12 2017 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Mar 14 14:13:14 2017 +0000

    tools: add support for additional items in .pc files for local builds
    
    Some libraries require different compiler-flags when being used in a
    local build compared to a build using installed libraries.
    
    Reflect that by supporting local cflags variables in generated
    pkg-config files. The local variants will be empty in the installed
    pkg-config files.
    
    The flags for the linker in the local variants will have to specify
    the search patch for the library with "-Wl,-rpath-link=", while the
    flags for the installed library will be "-L".
    
    Add needed directory patterns.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/Rules.mk               | 12 ++++++++++--
 tools/libxc/xencontrol.pc.in |  2 +-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 392fb03..8b8c48e 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -254,10 +254,18 @@ $(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
             -e 's!@@prefix@@!$(PKG_CONFIG_PREFIX)!g' \
             -e 's!@@incdir@@!$(PKG_CONFIG_INCDIR)!g' \
-            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' < $< > $@
+            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' \
+            -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' < $< > $@
 
 %.pc: %.pc.in Makefile
        @sed -e 's!@@version@@!$(PKG_CONFIG_VERSION)!g' \
             -e 's!@@prefix@@!$(PKG_CONFIG_PREFIX)!g' \
             -e 's!@@incdir@@!$(PKG_CONFIG_INCDIR)!g' \
-            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' < $< > $@
+            -e 's!@@libdir@@!$(PKG_CONFIG_LIBDIR)!g' \
+            -e 's!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
+            -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
+            -e 's!@@cflagslocal@@!!g' \
+            -e 's!@@libsflag@@!-L!g' < $< > $@
diff --git a/tools/libxc/xencontrol.pc.in b/tools/libxc/xencontrol.pc.in
index 213206f..8651bca 100644
--- a/tools/libxc/xencontrol.pc.in
+++ b/tools/libxc/xencontrol.pc.in
@@ -6,4 +6,4 @@ Name: Xencontrol
 Description: The Xencontrol library for Xen hypervisor
 Version: @@version@@
 Cflags: -I${includedir}
-Libs: -L${libdir} -lxenctrl
+Libs: @@libsflag@@${libdir} -lxenctrl
--
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®.