All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Cc: Juergen Gross <jgross@suse.com>,
	wei.liu2@citrix.com, ian.jackson@eu.citrix.com
Subject: [PATCH v2 05/17] tools: add support for additional items in .pc files for local builds
Date: Tue, 14 Mar 2017 14:31:12 +0100	[thread overview]
Message-ID: <20170314133124.942-6-jgross@suse.com> (raw)
In-Reply-To: <20170314133124.942-1-jgross@suse.com>

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@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 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
-- 
2.10.2


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

  parent reply	other threads:[~2017-03-14 13:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
2017-03-14 13:31 ` [PATCH v2 01/17] tools: fix typo in tools/Rules.mk Juergen Gross
2017-03-14 13:31 ` [PATCH v2 02/17] tools: add missing library flag definitions Juergen Gross
2017-03-14 13:31 ` [PATCH v2 03/17] tools, stubdom: set PKG_CONFIG_DIR in main Makefiles Juergen Gross
2017-03-14 13:31 ` [PATCH v2 04/17] tools: install PKG_INSTALLDIR in tools/Makefile Juergen Gross
2017-03-14 14:11   ` Wei Liu
2017-03-14 13:31 ` Juergen Gross [this message]
2017-03-14 13:31 ` [PATCH v2 06/17] tools: provide pkg-config file for libxentoollog Juergen Gross
2017-03-14 13:31 ` [PATCH v2 07/17] tools: provide pkg-config file for libxenevtchn Juergen Gross
2017-03-14 13:31 ` [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab Juergen Gross
2017-03-14 20:06   ` Andrew Cooper
2017-03-15  6:07     ` Juergen Gross
2017-03-15 10:33       ` Andrew Cooper
2017-03-15 10:17     ` Wei Liu
2017-03-15 10:26       ` Juergen Gross
2017-03-15 10:29         ` Wei Liu
2017-03-15 10:32         ` Andrew Cooper
2017-03-14 13:31 ` [PATCH v2 09/17] tools: provide pkg-config file for libxencall Juergen Gross
2017-03-14 13:31 ` [PATCH v2 10/17] tools: provide pkg-config file for libxenforeignmemory Juergen Gross
2017-03-14 13:31 ` [PATCH v2 11/17] tools: provide pkg-config file for libxendevicemodel Juergen Gross
2017-03-14 13:31 ` [PATCH v2 12/17] tools: provide pkg-config file for libxenguest, update the one for libxenctrl Juergen Gross
2017-03-14 13:31 ` [PATCH v2 13/17] tools: provide pkg-config file for libxenstore Juergen Gross
2017-03-14 13:31 ` [PATCH v2 14/17] tools: provide pkg-config file for libxenstat Juergen Gross
2017-03-14 13:31 ` [PATCH v2 15/17] tools: provide pkg-config file for libxenvchan Juergen Gross
2017-03-14 13:31 ` [PATCH v2 16/17] tools: provide pkg-config file for libxenblktapctl Juergen Gross
2017-03-14 13:31 ` [PATCH v2 17/17] tools: adapt xenlight.pc and xlutil.pc to new pkg-config scheme Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170314133124.942-6-jgross@suse.com \
    --to=jgross@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.