All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/17] tools: provide pkg-config files for all libs
@ 2017-03-14 13:31 Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 01/17] tools: fix typo in tools/Rules.mk Juergen Gross
                   ` (16 more replies)
  0 siblings, 17 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

To help consumers of the Xen libraries (e.g. qemu) to use correct
flags when building provide pkg-config files for all libraries of
Xen.

The first 2 patches correct some flags used by the Xen internal build
system. The build process wasn't producing wrong results, but this was
just pure luck as no flags were missing when building some libraries,
but they came partially from other variables then they were meant to.

Patches 3 and 4 set the stage for generating the pkg-config files.

The rest of the patches are one for each directory where at least
one library is being built. Especially patch 16 is modifying the way
the already existing pkg-config files for libxenlight and libxlutil
are being built to fit into the new scheme.

Even if not necessary right now I have added stubdom support for all
libraries, not only the ones which are really used in stubdom
environment.

Changes in V2:
- added patch 4 (Wei Liu)
- patch 14 (was 13): correct position of .gitignore entry (Wei Liu)

Juergen Gross (17):
  tools: fix typo in tools/Rules.mk
  tools: add missing library flag definitions
  tools,stubdom: set PKG_CONFIG_DIR in main Makefiles
  tools: install PKG_INSTALLDIR in tools/Makefile
  tools: add support for additional items in .pc files for local builds
  tools: provide pkg-config file for libxentoollog
  tools: provide pkg-config file for libxenevtchn
  tools: provide pkg-config file for libxengnttab
  tools: provide pkg-config file for libxencall
  tools: provide pkg-config file for libxenforeignmemory
  tools: provide pkg-config file for libxendevicemodel
  tools: provide pkg-config file for libxenguest, update the one for
    libxenctrl
  tools: provide pkg-config file for libxenstore
  tools: provide pkg-config file for libxenstat
  tools: provide pkg-config file for libxenvchan
  tools: provide pkg-config file for libxenblktapctl
  tools: adapt xenlight.pc and xlutil.pc to new pkg-config scheme

 .gitignore                                      | 12 ++++++-
 stubdom/Makefile                                |  1 +
 tools/Makefile                                  |  8 ++++-
 tools/Rules.mk                                  | 43 ++++++++++++++++---------
 tools/blktap2/control/Makefile                  | 23 +++++++++++--
 tools/blktap2/control/xenblktapctl.pc.in        |  9 ++++++
 tools/configure                                 |  4 +--
 tools/configure.ac                              |  2 --
 tools/libs/call/Makefile                        | 21 +++++++++++-
 tools/libs/call/xencall.pc.in                   | 10 ++++++
 tools/libs/devicemodel/Makefile                 | 21 +++++++++++-
 tools/libs/devicemodel/xendevicemodel.pc.in     | 10 ++++++
 tools/libs/evtchn/Makefile                      | 20 +++++++++++-
 tools/libs/evtchn/xenevtchn.pc.in               | 10 ++++++
 tools/libs/foreignmemory/Makefile               | 21 +++++++++++-
 tools/libs/foreignmemory/xenforeignmemory.pc.in | 10 ++++++
 tools/libs/gnttab/Makefile                      | 22 ++++++++++++-
 tools/libs/gnttab/xengntshr.pc.in               |  8 +++++
 tools/libs/gnttab/xengnttab.pc.in               | 10 ++++++
 tools/libs/toollog/Makefile                     | 20 +++++++++++-
 tools/libs/toollog/xentoollog.pc.in             |  9 ++++++
 tools/libvchan/Makefile                         | 21 +++++++++++-
 tools/libvchan/xenvchan.pc.in                   | 10 ++++++
 tools/libxc/Makefile                            |  8 ++---
 tools/libxc/xencontrol.pc.in                    |  5 +--
 tools/libxc/xenguest.pc.in                      | 10 ++++++
 tools/libxl/Makefile                            | 26 +++++++++++----
 tools/libxl/xenlight.pc.in                      | 12 +++++++
 tools/libxl/xenlight.pc.in.in                   | 11 -------
 tools/libxl/xlutil.pc.in                        | 10 ++++++
 tools/libxl/xlutil.pc.in.in                     |  9 ------
 tools/xenstat/libxenstat/Makefile               | 20 +++++++++++-
 tools/xenstat/libxenstat/xenstat.pc.in          | 10 ++++++
 tools/xenstore/Makefile                         | 21 ++++++++++++
 tools/xenstore/xenstore.pc.in                   | 10 ++++++
 35 files changed, 412 insertions(+), 65 deletions(-)
 create mode 100644 tools/blktap2/control/xenblktapctl.pc.in
 create mode 100644 tools/libs/call/xencall.pc.in
 create mode 100644 tools/libs/devicemodel/xendevicemodel.pc.in
 create mode 100644 tools/libs/evtchn/xenevtchn.pc.in
 create mode 100644 tools/libs/foreignmemory/xenforeignmemory.pc.in
 create mode 100644 tools/libs/gnttab/xengntshr.pc.in
 create mode 100644 tools/libs/gnttab/xengnttab.pc.in
 create mode 100644 tools/libs/toollog/xentoollog.pc.in
 create mode 100644 tools/libvchan/xenvchan.pc.in
 create mode 100644 tools/libxc/xenguest.pc.in
 create mode 100644 tools/libxl/xenlight.pc.in
 delete mode 100644 tools/libxl/xenlight.pc.in.in
 create mode 100644 tools/libxl/xlutil.pc.in
 delete mode 100644 tools/libxl/xlutil.pc.in.in
 create mode 100644 tools/xenstat/libxenstat/xenstat.pc.in
 create mode 100644 tools/xenstore/xenstore.pc.in

-- 
2.10.2


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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH v2 01/17] tools: fix typo in tools/Rules.mk
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 02/17] tools: add missing library flag definitions Juergen Gross
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

Commit 78fb69ad9 ("tools/Rules.mk: Properly handle libraries with
recursive dependencies.") introduced a copy and paste error in
tools/Rules.mk:

LDLIBS_libxenstore and SHLIB_libxenstore don't use SHDEPS_libxenstore
but SHDEPS_libxenguest. This will add a superfluous dependency of
libxenstore on libxenevtchn.

Correct this bug.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/Rules.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 3e49370..3db59b0 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -139,8 +139,8 @@ SHLIB_libxenguest  = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_LIBXC)
 
 CFLAGS_libxenstore = -I$(XEN_XENSTORE)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenstore =
-LDLIBS_libxenstore = $(SHDEPS_libxenguest) $(XEN_XENSTORE)/libxenstore$(libextension)
-SHLIB_libxenstore  = $(SHDEPS_libxenguest) -Wl,-rpath-link=$(XEN_XENSTORE)
+LDLIBS_libxenstore = $(SHDEPS_libxenstore) $(XEN_XENSTORE)/libxenstore$(libextension)
+SHLIB_libxenstore  = $(SHDEPS_libxenstore) -Wl,-rpath-link=$(XEN_XENSTORE)
 
 CFLAGS_libxenstat  = -I$(XEN_LIBXENSTAT)
 SHDEPS_libxenstat  = $(SHLIB_libxenctrl) $(SHLIB_libxenstore)
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 02/17] tools: add missing library flag definitions
  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 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 03/17] tools, stubdom: set PKG_CONFIG_DIR in main Makefiles Juergen Gross
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

LDLIBS_* and SHLIB_* settings in tools/Rules.mk are sometimes missing
some SHDEPS_* added to them.

Add the missing flags, even if sometimes being empty.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/Rules.mk | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 3db59b0..392fb03 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -94,13 +94,13 @@ endif
 
 CFLAGS_libxentoollog = -I$(XEN_LIBXENTOOLLOG)/include $(CFLAGS_xeninclude)
 SHDEPS_libxentoollog =
-LDLIBS_libxentoollog = $(XEN_LIBXENTOOLLOG)/libxentoollog$(libextension)
-SHLIB_libxentoollog  = -Wl,-rpath-link=$(XEN_LIBXENTOOLLOG)
+LDLIBS_libxentoollog = $(SHDEPS_libxentoollog) $(XEN_LIBXENTOOLLOG)/libxentoollog$(libextension)
+SHLIB_libxentoollog  = $(SHDEPS_libxentoollog) -Wl,-rpath-link=$(XEN_LIBXENTOOLLOG)
 
 CFLAGS_libxenevtchn = -I$(XEN_LIBXENEVTCHN)/include $(CFLAGS_xeninclude)
 SHDEPS_libxenevtchn =
-LDLIBS_libxenevtchn = $(XEN_LIBXENEVTCHN)/libxenevtchn$(libextension)
-SHLIB_libxenevtchn  = -Wl,-rpath-link=$(XEN_LIBXENEVTCHN)
+LDLIBS_libxenevtchn = $(SHDEPS_libxenevtchn) $(XEN_LIBXENEVTCHN)/libxenevtchn$(libextension)
+SHLIB_libxenevtchn  = $(SHDEPS_libxenevtchn) -Wl,-rpath-link=$(XEN_LIBXENEVTCHN)
 
 CFLAGS_libxengnttab = -I$(XEN_LIBXENGNTTAB)/include $(CFLAGS_xeninclude)
 SHDEPS_libxengnttab = $(SHLIB_libxentoollog)
@@ -109,21 +109,24 @@ SHLIB_libxengnttab  = $(SHDEPS_libxengnttab) -Wl,-rpath-link=$(XEN_LIBXENGNTTAB)
 
 # xengntshr_* interfaces are actually part of libxengnttab.so
 CFLAGS_libxengntshr = -I$(XEN_LIBXENGNTTAB)/include $(CFLAGS_xeninclude)
-LDLIBS_libxengntshr = $(XEN_LIBXENGNTTAB)/libxengnttab$(libextension)
-SHLIB_libxengntshr  = -Wl,-rpath-link=$(XEN_LIBXENGNTTAB)
+SHDEPS_libxengntshr = $(SHDEPS_libxengnttab)
+LDLIBS_libxengntshr = $(SHDEPS_libxengntshr) $(XEN_LIBXENGNTTAB)/libxengnttab$(libextension)
+SHLIB_libxengntshr  = $(SHDEPS_libxengntshr) -Wl,-rpath-link=$(XEN_LIBXENGNTTAB)
 
 CFLAGS_libxencall = -I$(XEN_LIBXENCALL)/include $(CFLAGS_xeninclude)
-LDLIBS_libxencall = $(XEN_LIBXENCALL)/libxencall$(libextension)
-SHLIB_libxencall  = -Wl,-rpath-link=$(XEN_LIBXENCALL)
+SHDEPS_libxencall =
+LDLIBS_libxencall = $(SHDEPS_libxencall) $(XEN_LIBXENCALL)/libxencall$(libextension)
+SHLIB_libxencall  = $(SHDEPS_libxencall) -Wl,-rpath-link=$(XEN_LIBXENCALL)
 
 CFLAGS_libxenforeignmemory = -I$(XEN_LIBXENFOREIGNMEMORY)/include $(CFLAGS_xeninclude)
-LDLIBS_libxenforeignmemory = $(XEN_LIBXENFOREIGNMEMORY)/libxenforeignmemory$(libextension)
-SHLIB_libxenforeignmemory  = -Wl,-rpath-link=$(XEN_LIBXENFOREIGNMEMORY)
+SHDEPS_libxenforeignmemory =
+LDLIBS_libxenforeignmemory = $(SHDEPS_libxenforeignmemory) $(XEN_LIBXENFOREIGNMEMORY)/libxenforeignmemory$(libextension)
+SHLIB_libxenforeignmemory  = $(SHDEPS_libxenforeignmemory) -Wl,-rpath-link=$(XEN_LIBXENFOREIGNMEMORY)
 
 CFLAGS_libxendevicemodel = -I$(XEN_LIBXENDEVICEMODEL)/include $(CFLAGS_xeninclude)
 SHDEPS_libxendevicemodel = $(SHLIB_libxentoollog) $(SHLIB_xencall)
-LDLIBS_libxendevicemodel = $(XEN_LIBXENDEVICEMODEL)/libxendevicemodel$(libextension)
-SHLIB_libxendevicemodel  = -Wl,-rpath-link=$(XEN_LIBXENDEVICEMODEL)
+LDLIBS_libxendevicemodel = $(SHDEPS_libxendevicemodel) $(XEN_LIBXENDEVICEMODEL)/libxendevicemodel$(libextension)
+SHLIB_libxendevicemodel  = $(SHDEPS_libxendevicemodel) -Wl,-rpath-link=$(XEN_LIBXENDEVICEMODEL)
 
 # code which compiles against libxenctrl get __XEN_TOOLS__ and
 # therefore sees the unstable hypercall interfaces.
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 03/17] tools, stubdom: set PKG_CONFIG_DIR in main Makefiles
  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 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 04/17] tools: install PKG_INSTALLDIR in tools/Makefile Juergen Gross
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

Instead of setting the PKG_CONFIG_DIR make variable in each library
Makefile do it in tools/Makefile and stubdom/Makefile globally.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 stubdom/Makefile     | 1 +
 tools/Makefile       | 3 +++
 tools/libxc/Makefile | 1 -
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index c6458e8..54a2bdd 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -3,6 +3,7 @@ MINI_OS = $(XEN_ROOT)/extras/mini-os
 
 export XEN_ROOT
 export XEN_OS=MiniOS
+export PKG_CONFIG_DIR = $(CURDIR)/pkg-config
 
 # Remove flags which are meant for tools, e.g. "-m64"
 export EXTRA_CFLAGS_XEN_TOOLS=
diff --git a/tools/Makefile b/tools/Makefile
index 85e5ce9..828ee34 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,4 +1,7 @@
 XEN_ROOT = $(CURDIR)/..
+
+export PKG_CONFIG_DIR = $(CURDIR)/pkg-config
+
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y :=
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index a161ba7..b15736c 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -1,5 +1,4 @@
 XEN_ROOT = $(CURDIR)/../..
-PKG_CONFIG_DIR = ../pkg-config
 include $(XEN_ROOT)/tools/Rules.mk
 
 MAJOR    = 4.9
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 04/17] tools: install PKG_INSTALLDIR in tools/Makefile
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (2 preceding siblings ...)
  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 ` Juergen Gross
  2017-03-14 14:11   ` Wei Liu
  2017-03-14 13:31 ` [PATCH v2 05/17] tools: add support for additional items in .pc files for local builds Juergen Gross
                   ` (12 subsequent siblings)
  16 siblings, 1 reply; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

Instead of installing $(PKG_INSTALLDIR) in multiple Makefiles below
tools, do so in tools/Makefile.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
 tools/Makefile       | 5 ++++-
 tools/libxc/Makefile | 1 -
 tools/libxl/Makefile | 1 -
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 828ee34..b40bd73 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -64,12 +64,14 @@ endif
 build all: subdirs-all
 
 .PHONY: install
-install: subdirs-install
+install:
 	$(INSTALL_DIR) -m 700 $(DESTDIR)$(XEN_DUMP_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(XEN_LOG_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(XEN_RUN_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_DIR)
 	$(INSTALL_DIR) $(DESTDIR)$(XEN_RUN_STORED)
+	$(INSTALL_DIR) $(DESTDIR)$(PKG_INSTALLDIR)
+	$(MAKE) subdirs-install
 
 .PHONY: uninstall
 uninstall: D=$(DESTDIR)
@@ -85,6 +87,7 @@ uninstall:
 	rm -rf $(D)$(XEN_LIB_DIR)
 	rm -rf $(D)$(XEN_LIB_STORED)
 	rm -rf $(D)$(XEN_RUN_STORED)
+	rm -rf $(D)$(PKG_INSTALLDIR)
 	rm -rf $(D)$(bindir)/cpuperf-perfcntr $(D)$(bindir)/cpuperf-xen
 	rm -rf $(D)$(bindir)/xc_shadow
 	rm -rf $(D)$(bindir)/pygrub
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index b15736c..0653ca3 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -189,7 +189,6 @@ libs: $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 install: build
 	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
-	$(INSTALL_DIR) $(DESTDIR)$(PKG_INSTALLDIR)
 	$(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
 	$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(libdir)
 	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR)
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index f00d9ef..cd7ce6b 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -299,7 +299,6 @@ install: all
 	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-	$(INSTALL_DIR) $(DESTDIR)$(PKG_INSTALLDIR)
 	$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
 	$(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
 	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenlight.so.$(MAJOR)
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 05/17] tools: add support for additional items in .pc files for local builds
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (3 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 04/17] tools: install PKG_INSTALLDIR in tools/Makefile Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 06/17] tools: provide pkg-config file for libxentoollog Juergen Gross
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 06/17] tools: provide pkg-config file for libxentoollog
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (4 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 05/17] tools: add support for additional items in .pc files for local builds Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 07/17] tools: provide pkg-config file for libxenevtchn Juergen Gross
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xentoollog.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                          |  1 +
 tools/libs/toollog/Makefile         | 20 +++++++++++++++++++-
 tools/libs/toollog/xentoollog.pc.in |  9 +++++++++
 3 files changed, 29 insertions(+), 1 deletion(-)
 create mode 100644 tools/libs/toollog/xentoollog.pc.in

diff --git a/.gitignore b/.gitignore
index 4567de7..d017254 100644
--- a/.gitignore
+++ b/.gitignore
@@ -96,6 +96,7 @@ config/Tools.mk
 config/Stubdom.mk
 config/Docs.mk
 tools/libs/toollog/headers.chk
+tools/libs/toollog/xentoollog.pc
 tools/libs/evtchn/headers.chk
 tools/libs/gnttab/headers.chk
 tools/libs/call/headers.chk
diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile
index fb701be..7361194 100644
--- a/tools/libs/toollog/Makefile
+++ b/tools/libs/toollog/Makefile
@@ -19,6 +19,22 @@ ifneq ($(nosharedlibs),y)
 LIB += libxentoollog.so
 endif
 
+PKG_CONFIG := xentoollog.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENTOOLLOG)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+
 .PHONY: all
 all: build
 
@@ -27,7 +43,7 @@ build:
 	$(MAKE) libs
 
 .PHONY: libs
-libs: headers.chk $(LIB)
+libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 headers.chk: $(wildcard include/*.h)
 
@@ -51,6 +67,7 @@ install: build
 	$(SYMLINK_SHLIB) libxentoollog.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxentoollog.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxentoollog.so.$(MAJOR) $(DESTDIR)$(libdir)/libxentoollog.so
 	$(INSTALL_DATA) include/xentoollog.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) xentoollog.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -61,6 +78,7 @@ clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f libxentoollog.so.$(MAJOR).$(MINOR) libxentoollog.so.$(MAJOR)
 	rm -f headers.chk
+	rm -f xentoollog.pc
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/libs/toollog/xentoollog.pc.in b/tools/libs/toollog/xentoollog.pc.in
new file mode 100644
index 0000000..554e4d5
--- /dev/null
+++ b/tools/libs/toollog/xentoollog.pc.in
@@ -0,0 +1,9 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xentoollog
+Description: The Xentoollog library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: @@libsflag@@${libdir} -lxentoollog
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 07/17] tools: provide pkg-config file for libxenevtchn
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (5 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 06/17] tools: provide pkg-config file for libxentoollog Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab Juergen Gross
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenevtchn.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                        |  1 +
 tools/libs/evtchn/Makefile        | 21 ++++++++++++++++++++-
 tools/libs/evtchn/xenevtchn.pc.in | 10 ++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 tools/libs/evtchn/xenevtchn.pc.in

diff --git a/.gitignore b/.gitignore
index d017254..ecc6cb7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -98,6 +98,7 @@ config/Docs.mk
 tools/libs/toollog/headers.chk
 tools/libs/toollog/xentoollog.pc
 tools/libs/evtchn/headers.chk
+tools/libs/evtchn/xenevtchn.pc
 tools/libs/gnttab/headers.chk
 tools/libs/call/headers.chk
 tools/libs/foreignmemory/headers.chk
diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile
index 9917864..5da2693 100644
--- a/tools/libs/evtchn/Makefile
+++ b/tools/libs/evtchn/Makefile
@@ -24,6 +24,23 @@ ifneq ($(nosharedlibs),y)
 LIB += libxenevtchn.so
 endif
 
+PKG_CONFIG := xenevtchn.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENEVTCHN)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
 .PHONY: all
 all: build
 
@@ -32,7 +49,7 @@ build:
 	$(MAKE) libs
 
 .PHONY: libs
-libs: headers.chk $(LIB)
+libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 headers.chk: $(wildcard include/*.h)
 
@@ -56,6 +73,7 @@ install: build
 	$(SYMLINK_SHLIB) libxenevtchn.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenevtchn.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxenevtchn.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenevtchn.so
 	$(INSTALL_DATA) include/xenevtchn.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) xenevtchn.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -66,6 +84,7 @@ clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f libxenevtchn.so.$(MAJOR).$(MINOR) libxenevtchn.so.$(MAJOR)
 	rm -f headers.chk
+	rm -f xenevtchn.pc
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/libs/evtchn/xenevtchn.pc.in b/tools/libs/evtchn/xenevtchn.pc.in
new file mode 100644
index 0000000..da8bf16
--- /dev/null
+++ b/tools/libs/evtchn/xenevtchn.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenevtchn
+Description: The Xenevtchn library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxenevtchn
+Requires.private: xentoollog
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (6 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 07/17] tools: provide pkg-config file for libxenevtchn Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 20:06   ` Andrew Cooper
  2017-03-14 13:31 ` [PATCH v2 09/17] tools: provide pkg-config file for libxencall Juergen Gross
                   ` (8 subsequent siblings)
  16 siblings, 1 reply; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xengnttab.pc and a xengntshr.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                        |  2 ++
 tools/libs/gnttab/Makefile        | 22 +++++++++++++++++++++-
 tools/libs/gnttab/xengntshr.pc.in |  8 ++++++++
 tools/libs/gnttab/xengnttab.pc.in | 10 ++++++++++
 4 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 tools/libs/gnttab/xengntshr.pc.in
 create mode 100644 tools/libs/gnttab/xengnttab.pc.in

diff --git a/.gitignore b/.gitignore
index ecc6cb7..6acac68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,6 +100,8 @@ tools/libs/toollog/xentoollog.pc
 tools/libs/evtchn/headers.chk
 tools/libs/evtchn/xenevtchn.pc
 tools/libs/gnttab/headers.chk
+tools/libs/gnttab/xengntshr.pc
+tools/libs/gnttab/xengnttab.pc
 tools/libs/call/headers.chk
 tools/libs/foreignmemory/headers.chk
 tools/libs/devicemodel/headers.chk
diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile
index 6a77f21..d4841c2 100644
--- a/tools/libs/gnttab/Makefile
+++ b/tools/libs/gnttab/Makefile
@@ -26,6 +26,23 @@ ifneq ($(nosharedlibs),y)
 LIB += libxengnttab.so
 endif
 
+PKG_CONFIG := xengnttab.pc xengntshr.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENGNTTAB)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
 .PHONY: all
 all: build
 
@@ -34,7 +51,7 @@ build:
 	$(MAKE) libs
 
 .PHONY: libs
-libs: headers.chk $(LIB)
+libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 headers.chk: $(wildcard include/*.h)
 
@@ -58,6 +75,8 @@ install: build
 	$(SYMLINK_SHLIB) libxengnttab.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxengnttab.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxengnttab.so.$(MAJOR) $(DESTDIR)$(libdir)/libxengnttab.so
 	$(INSTALL_DATA) include/xengnttab.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) xengnttab.pc $(DESTDIR)$(PKG_INSTALLDIR)
+	$(INSTALL_DATA) xengntshr.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -68,6 +87,7 @@ clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f libxengnttab.so.$(MAJOR).$(MINOR) libxengnttab.so.$(MAJOR)
 	rm -f headers.chk
+	rm -f xengnttab.pc xengntshr.pc
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/libs/gnttab/xengntshr.pc.in b/tools/libs/gnttab/xengntshr.pc.in
new file mode 100644
index 0000000..1eb58c2
--- /dev/null
+++ b/tools/libs/gnttab/xengntshr.pc.in
@@ -0,0 +1,8 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xengntshr
+Description: The Xengntshr library for Xen hypervisor
+Version: @@version@@
+Requires: xengnttab
diff --git a/tools/libs/gnttab/xengnttab.pc.in b/tools/libs/gnttab/xengnttab.pc.in
new file mode 100644
index 0000000..51aad22
--- /dev/null
+++ b/tools/libs/gnttab/xengnttab.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xengnttab
+Description: The Xengnttab library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxengnttab
+Requires.private: xentoollog
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 09/17] tools: provide pkg-config file for libxencall
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (7 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 10/17] tools: provide pkg-config file for libxenforeignmemory Juergen Gross
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xencall.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                        |  1 +
 tools/libs/call/Makefile          | 21 ++++++++++++++++++++-
 tools/libs/call/xencall.pc.in     | 10 ++++++++++
 tools/libs/evtchn/Makefile        |  1 -
 tools/libs/evtchn/xenevtchn.pc.in |  2 +-
 5 files changed, 32 insertions(+), 3 deletions(-)
 create mode 100644 tools/libs/call/xencall.pc.in

diff --git a/.gitignore b/.gitignore
index 6acac68..cb51479 100644
--- a/.gitignore
+++ b/.gitignore
@@ -103,6 +103,7 @@ tools/libs/gnttab/headers.chk
 tools/libs/gnttab/xengntshr.pc
 tools/libs/gnttab/xengnttab.pc
 tools/libs/call/headers.chk
+tools/libs/call/xencall.pc
 tools/libs/foreignmemory/headers.chk
 tools/libs/devicemodel/headers.chk
 tools/blktap2/daemon/blktapctrl
diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile
index 9402ea5..30f8437 100644
--- a/tools/libs/call/Makefile
+++ b/tools/libs/call/Makefile
@@ -24,6 +24,23 @@ ifneq ($(nosharedlibs),y)
 LIB += libxencall.so
 endif
 
+PKG_CONFIG := xencall.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENCALL)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
 .PHONY: all
 all: build
 
@@ -32,7 +49,7 @@ build:
 	$(MAKE) libs
 
 .PHONY: libs
-libs: headers.chk $(LIB)
+libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 headers.chk: $(wildcard include/*.h)
 
@@ -56,6 +73,7 @@ install: build
 	$(SYMLINK_SHLIB) libxencall.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxencall.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxencall.so.$(MAJOR) $(DESTDIR)$(libdir)/libxencall.so
 	$(INSTALL_DATA) include/xencall.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) xencall.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -66,6 +84,7 @@ clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f libxencall.so.$(MAJOR).$(MINOR) libxencall.so.$(MAJOR)
 	rm -f headers.chk
+	rm -f xencall.pc
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/libs/call/xencall.pc.in b/tools/libs/call/xencall.pc.in
new file mode 100644
index 0000000..475c133
--- /dev/null
+++ b/tools/libs/call/xencall.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xencall
+Description: The Xencall library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxencall
+Requires.private: xentoollog
diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile
index 5da2693..cbd4219 100644
--- a/tools/libs/evtchn/Makefile
+++ b/tools/libs/evtchn/Makefile
@@ -39,7 +39,6 @@ PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENEVTCHN)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
-$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
 
 .PHONY: all
 all: build
diff --git a/tools/libs/evtchn/xenevtchn.pc.in b/tools/libs/evtchn/xenevtchn.pc.in
index da8bf16..c74af1e 100644
--- a/tools/libs/evtchn/xenevtchn.pc.in
+++ b/tools/libs/evtchn/xenevtchn.pc.in
@@ -5,6 +5,6 @@ libdir=@@libdir@@
 Name: Xenevtchn
 Description: The Xenevtchn library for Xen hypervisor
 Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
+Cflags: -I${includedir}
 Libs: @@libsflag@@${libdir} -lxenevtchn
 Requires.private: xentoollog
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 10/17] tools: provide pkg-config file for libxenforeignmemory
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (8 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 09/17] tools: provide pkg-config file for libxencall Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 11/17] tools: provide pkg-config file for libxendevicemodel Juergen Gross
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenforeignmemory.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                                      |  1 +
 tools/libs/foreignmemory/Makefile               | 21 ++++++++++++++++++++-
 tools/libs/foreignmemory/xenforeignmemory.pc.in | 10 ++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 tools/libs/foreignmemory/xenforeignmemory.pc.in

diff --git a/.gitignore b/.gitignore
index cb51479..af41e7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -105,6 +105,7 @@ tools/libs/gnttab/xengnttab.pc
 tools/libs/call/headers.chk
 tools/libs/call/xencall.pc
 tools/libs/foreignmemory/headers.chk
+tools/libs/foreignmemory/xenforeignmemory.pc
 tools/libs/devicemodel/headers.chk
 tools/blktap2/daemon/blktapctrl
 tools/blktap2/drivers/img2qcow
diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile
index f062f45..55677e8 100644
--- a/tools/libs/foreignmemory/Makefile
+++ b/tools/libs/foreignmemory/Makefile
@@ -24,6 +24,23 @@ ifneq ($(nosharedlibs),y)
 LIB += libxenforeignmemory.so
 endif
 
+PKG_CONFIG := xenforeignmemory.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENFOREIGNMEMORY)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
 .PHONY: all
 all: build
 
@@ -32,7 +49,7 @@ build:
 	$(MAKE) libs
 
 .PHONY: libs
-libs: headers.chk $(LIB)
+libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 headers.chk: $(wildcard include/*.h)
 
@@ -56,6 +73,7 @@ install: build
 	$(SYMLINK_SHLIB) libxenforeignmemory.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenforeignmemory.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxenforeignmemory.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenforeignmemory.so
 	$(INSTALL_DATA) include/xenforeignmemory.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) xenforeignmemory.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -66,6 +84,7 @@ clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f libxenforeignmemory.so.$(MAJOR).$(MINOR) libxenforeignmemory.so.$(MAJOR)
 	rm -f headers.chk
+	rm -f xenforeignmemory.pc
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/libs/foreignmemory/xenforeignmemory.pc.in b/tools/libs/foreignmemory/xenforeignmemory.pc.in
new file mode 100644
index 0000000..63432dc
--- /dev/null
+++ b/tools/libs/foreignmemory/xenforeignmemory.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenforeignmemory
+Description: The Xenforeignmemory library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxenforeignmemory
+Requires.private: xentoollog
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 11/17] tools: provide pkg-config file for libxendevicemodel
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (9 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 10/17] tools: provide pkg-config file for libxenforeignmemory Juergen Gross
@ 2017-03-14 13:31 ` 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
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xendevicemodel.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                                  |  1 +
 tools/libs/devicemodel/Makefile             | 21 ++++++++++++++++++++-
 tools/libs/devicemodel/xendevicemodel.pc.in | 10 ++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 tools/libs/devicemodel/xendevicemodel.pc.in

diff --git a/.gitignore b/.gitignore
index af41e7a..ba0f2e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -107,6 +107,7 @@ tools/libs/call/xencall.pc
 tools/libs/foreignmemory/headers.chk
 tools/libs/foreignmemory/xenforeignmemory.pc
 tools/libs/devicemodel/headers.chk
+tools/libs/devicemodel/xendevicemodel.pc
 tools/blktap2/daemon/blktapctrl
 tools/blktap2/drivers/img2qcow
 tools/blktap2/drivers/lock-util
diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile
index 1803942..55626a5 100644
--- a/tools/libs/devicemodel/Makefile
+++ b/tools/libs/devicemodel/Makefile
@@ -25,6 +25,23 @@ ifneq ($(nosharedlibs),y)
 LIB += libxendevicemodel.so
 endif
 
+PKG_CONFIG := xendevicemodel.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENDEVICEMODEL)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
 .PHONY: all
 all: build
 
@@ -33,7 +50,7 @@ build:
 	$(MAKE) libs
 
 .PHONY: libs
-libs: headers.chk $(LIB)
+libs: headers.chk $(LIB) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 headers.chk: $(wildcard include/*.h)
 
@@ -57,6 +74,7 @@ install: build
 	$(SYMLINK_SHLIB) libxendevicemodel.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxendevicemodel.so.$(MAJOR)
 	$(SYMLINK_SHLIB) libxendevicemodel.so.$(MAJOR) $(DESTDIR)$(libdir)/libxendevicemodel.so
 	$(INSTALL_DATA) include/xendevicemodel.h $(DESTDIR)$(includedir)
+	$(INSTALL_DATA) xendevicemodel.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -67,6 +85,7 @@ clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS) $(LIB_OBJS) $(PIC_OBJS)
 	rm -f libxendevicemodel.so.$(MAJOR).$(MINOR) libxendevicemodel.so.$(MAJOR)
 	rm -f headers.chk
+	rm -f xendevicemodel.pc
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/libs/devicemodel/xendevicemodel.pc.in b/tools/libs/devicemodel/xendevicemodel.pc.in
new file mode 100644
index 0000000..ed08f83
--- /dev/null
+++ b/tools/libs/devicemodel/xendevicemodel.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xendevicemodel
+Description: The Xendevicemodel library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxendevicemodel
+Requires.private: xentoollog,xencall
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 12/17] tools: provide pkg-config file for libxenguest, update the one for libxenctrl
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (10 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 11/17] tools: provide pkg-config file for libxendevicemodel Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 13/17] tools: provide pkg-config file for libxenstore Juergen Gross
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenguest.pc file.

Update the xencontrol.pc file to reflect the dependencies of libxenctrl.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxc/Makefile         |  6 ++++--
 tools/libxc/xencontrol.pc.in |  3 ++-
 tools/libxc/xenguest.pc.in   | 10 ++++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)
 create mode 100644 tools/libxc/xenguest.pc.in

diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index 0653ca3..d6fa1eb 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -159,7 +159,7 @@ endif
 $(CTRL_LIB_OBJS) $(GUEST_LIB_OBJS) \
 $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS): xc_private.h
 
-PKG_CONFIG := xencontrol.pc
+PKG_CONFIG := xencontrol.pc xenguest.pc
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
@@ -174,6 +174,7 @@ PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXC)/include
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
 
 .PHONY: all
 all: build
@@ -200,6 +201,7 @@ install: build
 	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenguest.so
 	$(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) xencontrol.pc $(DESTDIR)$(PKG_INSTALLDIR)
+	$(INSTALL_DATA) xenguest.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: TAGS
 TAGS:
@@ -209,7 +211,7 @@ TAGS:
 clean:
 	rm -rf *.rpm $(LIB) *~ $(DEPS) \
             _paths.h \
-	    xencontrol.pc \
+	    xencontrol.pc xenguest.pc \
             $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
             $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS)
 
diff --git a/tools/libxc/xencontrol.pc.in b/tools/libxc/xencontrol.pc.in
index 8651bca..fdc2530 100644
--- a/tools/libxc/xencontrol.pc.in
+++ b/tools/libxc/xencontrol.pc.in
@@ -5,5 +5,6 @@ libdir=@@libdir@@
 Name: Xencontrol
 Description: The Xencontrol library for Xen hypervisor
 Version: @@version@@
-Cflags: -I${includedir}
+Cflags: -I${includedir} @@cflagslocal@@
 Libs: @@libsflag@@${libdir} -lxenctrl
+Requires.private: xenevtchn,xengnttab,xengntshr,xencall,xenforeignmemory,xendevicemodel,xentoollog
diff --git a/tools/libxc/xenguest.pc.in b/tools/libxc/xenguest.pc.in
new file mode 100644
index 0000000..225ac0b
--- /dev/null
+++ b/tools/libxc/xenguest.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenguest
+Description: The Xenguest library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: @@libsflag@@${libdir} -lxenguest
+Requires.private: xentoollog,xencall,xenforeignmemory,xenevtchn
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 13/17] tools: provide pkg-config file for libxenstore
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (11 preceding siblings ...)
  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 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 14/17] tools: provide pkg-config file for libxenstat Juergen Gross
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenstore.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                    |  1 +
 tools/xenstore/Makefile       | 21 +++++++++++++++++++++
 tools/xenstore/xenstore.pc.in | 10 ++++++++++
 3 files changed, 32 insertions(+)
 create mode 100644 tools/xenstore/xenstore.pc.in

diff --git a/.gitignore b/.gitignore
index ba0f2e4..4caa3d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -255,6 +255,7 @@ tools/xenstore/xenstore-control
 tools/xenstore/xenstore-ls
 tools/xenstore/xenstored
 tools/xenstore/xenstored_test
+tools/xenstore/xenstore.pc
 tools/xenstore/xs_tdb_dump
 tools/xentrace/xentrace_setsize
 tools/xentrace/tbctl
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index bdca108..c4f9cde 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -105,12 +105,32 @@ libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
 libxenstore.a: xs.o xs_lib.o
 	$(AR) rcs $@ $^
 
+PKG_CONFIG := xenstore.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_XENSTORE)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
+$(LIBXENSTORE): $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
+
 .PHONY: clean
 clean:
 	rm -f *.a *.o *.opic *.so* xenstored_probes.h
 	rm -f xenstored xs_random xs_stress xs_crashme
 	rm -f xs_tdb_dump xenstore-control init-xenstore-domain
 	rm -f xenstore $(CLIENTS)
+	rm -f xenstore.pc
 	$(RM) $(DEPS)
 
 .PHONY: distclean
@@ -150,6 +170,7 @@ endif
 	$(INSTALL_DATA) include/compat/xs_lib.h $(DESTDIR)$(includedir)/xenstore-compat/xs_lib.h
 	ln -sf xenstore-compat/xs.h  $(DESTDIR)$(includedir)/xs.h
 	ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(includedir)/xs_lib.h
+	$(INSTALL_DATA) xenstore.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: clients-install
 clients-install: clients
diff --git a/tools/xenstore/xenstore.pc.in b/tools/xenstore/xenstore.pc.in
new file mode 100644
index 0000000..45dc6b0
--- /dev/null
+++ b/tools/xenstore/xenstore.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenstore
+Description: The Xenstore library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxenstore
+Requires.private: xenevtchn,xencontrol,xengnttab
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 14/17] tools: provide pkg-config file for libxenstat
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (12 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 13/17] tools: provide pkg-config file for libxenstore Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  2017-03-14 13:31 ` [PATCH v2 15/17] tools: provide pkg-config file for libxenvchan Juergen Gross
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenstat.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                             |  1 +
 tools/xenstat/libxenstat/Makefile      | 20 +++++++++++++++++++-
 tools/xenstat/libxenstat/xenstat.pc.in | 10 ++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 tools/xenstat/libxenstat/xenstat.pc.in

diff --git a/.gitignore b/.gitignore
index 4caa3d9..778bc3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -243,6 +243,7 @@ tools/xenmon/xenbaked
 tools/xenpaging/xenpaging
 tools/xenpmd/xenpmd
 tools/xenstat/libxenstat/src/_paths.h
+tools/xenstat/libxenstat/xenstat.pc
 tools/xenstat/xentop/xentop
 tools/xenstore/xenstore
 tools/xenstore/xenstore-chmod
diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile
index 213d998..85cec63 100644
--- a/tools/xenstat/libxenstat/Makefile
+++ b/tools/xenstat/libxenstat/Makefile
@@ -37,8 +37,24 @@ CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) -i
 LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl)
 LDLIBS-$(CONFIG_SunOS) += -lkstat
 
+PKG_CONFIG := xenstat.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBXENSTAT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+
 .PHONY: all
-all: $(LIB) $(SHLIB) $(SHLIB_LINKS)
+all: $(LIB) $(SHLIB) $(SHLIB_LINKS) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 $(OBJECTS-y): src/_paths.h
 
@@ -63,6 +79,7 @@ install: all
 	$(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
 	ln -sf libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR)
 	ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenstat.so
+	$(INSTALL_DATA) xenstat.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 PYLIB=bindings/swig/python/_xenstat.so
 PYMOD=bindings/swig/python/xenstat.py
@@ -138,6 +155,7 @@ endif
 clean:
 	rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS-y) \
 	      $(BINDINGS) $(BINDINGSRC) $(DEPS) src/_paths.h
+	rm -f xenstat.pc
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/xenstat/libxenstat/xenstat.pc.in b/tools/xenstat/libxenstat/xenstat.pc.in
new file mode 100644
index 0000000..ad00577
--- /dev/null
+++ b/tools/xenstat/libxenstat/xenstat.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenstat
+Description: The Xenstat library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir}
+Libs: @@libsflag@@${libdir} -lxenstat
+Requires.private: xencontrol,xenstore
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 15/17] tools: provide pkg-config file for libxenvchan
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (13 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 14/17] tools: provide pkg-config file for libxenstat Juergen Gross
@ 2017-03-14 13:31 ` 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
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenvchan.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                    |  1 +
 tools/libvchan/Makefile       | 21 ++++++++++++++++++++-
 tools/libvchan/xenvchan.pc.in | 10 ++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 tools/libvchan/xenvchan.pc.in

diff --git a/.gitignore b/.gitignore
index 778bc3f..0f3f8a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -187,6 +187,7 @@ tools/include/xen/*
 tools/include/xen-xsm/*
 tools/include/xen-foreign/*.(c|h|size)
 tools/include/xen-foreign/checker
+tools/libvchan/xenvchan.pc
 tools/libxc/*.pc
 tools/libxl/_libxl.api-for-check
 tools/libxl/*.api-ok
diff --git a/tools/libvchan/Makefile b/tools/libvchan/Makefile
index df70cf2..b816eb7 100644
--- a/tools/libvchan/Makefile
+++ b/tools/libvchan/Makefile
@@ -21,8 +21,25 @@ CFLAGS += -I../include -I.
 
 io.o io.opic: CFLAGS += $(CFLAGS_libxenctrl) # for xen_mb et al
 
+PKG_CONFIG := xenvchan.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_LIBVCHAN)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude)
+
 .PHONY: all
-all: libxenvchan.so vchan-node1 vchan-node2 libxenvchan.a
+all: libxenvchan.so vchan-node1 vchan-node2 libxenvchan.a $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 libxenvchan.so: libxenvchan.so.$(MAJOR)
 	ln -sf $< $@
@@ -51,10 +68,12 @@ install: all
 	ln -sf libxenvchan.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenvchan.so
 	$(INSTALL_DATA) libxenvchan.h $(DESTDIR)$(includedir)
 	$(INSTALL_DATA) libxenvchan.a $(DESTDIR)$(libdir)
+	$(INSTALL_DATA) xenvchan.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: clean
 clean:
 	$(RM) -f *.o *.opic *.so* *.a vchan-node1 vchan-node2 $(DEPS)
+	$(RM) -f xenvchan.pc
 
 distclean: clean
 
diff --git a/tools/libvchan/xenvchan.pc.in b/tools/libvchan/xenvchan.pc.in
new file mode 100644
index 0000000..605e42b
--- /dev/null
+++ b/tools/libvchan/xenvchan.pc.in
@@ -0,0 +1,10 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenvchan
+Description: The Xenvchan library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxenvchan
+Requires.private: xentoollog,xenstore,xengntshr,xenevtchn,xengnttab
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 16/17] tools: provide pkg-config file for libxenblktapctl
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (14 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 15/17] tools: provide pkg-config file for libxenvchan Juergen Gross
@ 2017-03-14 13:31 ` 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
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

In order to be able to use pkg-config for obtaining linker- and
compiler-flags provide a xenblktapctl.pc file.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore                               |  1 +
 tools/blktap2/control/Makefile           | 23 +++++++++++++++++++++--
 tools/blktap2/control/xenblktapctl.pc.in |  9 +++++++++
 3 files changed, 31 insertions(+), 2 deletions(-)
 create mode 100644 tools/blktap2/control/xenblktapctl.pc.in

diff --git a/.gitignore b/.gitignore
index 0f3f8a5..1753975 100644
--- a/.gitignore
+++ b/.gitignore
@@ -108,6 +108,7 @@ tools/libs/foreignmemory/headers.chk
 tools/libs/foreignmemory/xenforeignmemory.pc
 tools/libs/devicemodel/headers.chk
 tools/libs/devicemodel/xendevicemodel.pc
+tools/blktap2/control/xenblktapctl.pc
 tools/blktap2/daemon/blktapctrl
 tools/blktap2/drivers/img2qcow
 tools/blktap2/drivers/lock-util
diff --git a/tools/blktap2/control/Makefile b/tools/blktap2/control/Makefile
index 767f52a..0d731f7 100644
--- a/tools/blktap2/control/Makefile
+++ b/tools/blktap2/control/Makefile
@@ -41,9 +41,26 @@ LIB_STATIC = $(LIBNAME).a
 LIB_SHARED = $(LIBSONAME).$(MINOR)
 IBIN = tap-ctl
 
+PKG_CONFIG := xenblktapctl.pc
+PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+
+ifneq ($(CONFIG_LIBXC_MINIOS),y)
+PKG_CONFIG_INST := $(PKG_CONFIG)
+$(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_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_BLKTAP2)/include
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
+$(PKG_CONFIG_LOCAL): PKG_CONFIG_CFLAGS_LOCAL = $(CFLAGS_xeninclude) $(CFLAGS_libxenctrl)
+
 all: build
 
-build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
+build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED) $(PKG_CONFIG_INST) $(PKG_CONFIG_LOCAL)
 
 $(LIBNAME).so: $(LIBSONAME)
 	ln -sf $< $@
@@ -60,18 +77,20 @@ $(LIB_STATIC): $(CTL_OBJS)
 $(LIB_SHARED): $(CTL_PICS)
 	$(CC) $(LDFLAGS) -fPIC  -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@  $(APPEND_LDFLAGS)
 
-install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
+install: build
 	$(INSTALL_DIR) -p $(DESTDIR)$(sbindir)
 	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(sbindir)
 	$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(libdir)
 	$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(libdir)
 	ln -sf $(LIBSONAME) $(DESTDIR)$(libdir)/$(LIBNAME).so
 	ln -sf $(LIB_SHARED) $(DESTDIR)$(libdir)/$(LIBSONAME)
+	$(INSTALL_DATA) xenblktapctl.pc $(DESTDIR)$(PKG_INSTALLDIR)
 
 clean:
 	rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
 	rm -f $(LIBNAME).so $(LIBSONAME)
 	rm -f *~
+	rm -f xenblktapctl.pc
 
 distclean: clean
 
diff --git a/tools/blktap2/control/xenblktapctl.pc.in b/tools/blktap2/control/xenblktapctl.pc.in
new file mode 100644
index 0000000..81d2747
--- /dev/null
+++ b/tools/blktap2/control/xenblktapctl.pc.in
@@ -0,0 +1,9 @@
+prefix=@@prefix@@
+includedir=@@incdir@@
+libdir=@@libdir@@
+
+Name: Xenblktapctl
+Description: The Xenblktapctl library for Xen hypervisor
+Version: @@version@@
+Cflags: -I${includedir} @@cflagslocal@@
+Libs: @@libsflag@@${libdir} -lxenblktapctl
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH v2 17/17] tools: adapt xenlight.pc and xlutil.pc to new pkg-config scheme
  2017-03-14 13:31 [PATCH v2 00/17] tools: provide pkg-config files for all libs Juergen Gross
                   ` (15 preceding siblings ...)
  2017-03-14 13:31 ` [PATCH v2 16/17] tools: provide pkg-config file for libxenblktapctl Juergen Gross
@ 2017-03-14 13:31 ` Juergen Gross
  16 siblings, 0 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-14 13:31 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson

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                    |  1 -
 tools/configure               |  4 +---
 tools/configure.ac            |  2 --
 tools/libxl/Makefile          | 25 ++++++++++++++++++++-----
 tools/libxl/xenlight.pc.in    | 12 ++++++++++++
 tools/libxl/xenlight.pc.in.in | 11 -----------
 tools/libxl/xlutil.pc.in      | 10 ++++++++++
 tools/libxl/xlutil.pc.in.in   |  9 ---------
 8 files changed, 43 insertions(+), 31 deletions(-)
 create mode 100644 tools/libxl/xenlight.pc.in
 delete mode 100644 tools/libxl/xenlight.pc.in.in
 create mode 100644 tools/libxl/xlutil.pc.in
 delete mode 100644 tools/libxl/xlutil.pc.in.in

diff --git a/.gitignore b/.gitignore
index 1753975..1378368 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/tools/configure b/tools/configure
index 851e0f0..7a57e65 100755
--- a/tools/configure
+++ b/tools/configure
@@ -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" ;;
diff --git a/tools/configure.ac b/tools/configure.ac
index 28a539c..307998d 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -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])
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index cd7ce6b..12ab2a1 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -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
index 0000000..71d093a
--- /dev/null
+++ b/tools/libxl/xenlight.pc.in
@@ -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
index c27872e..0000000
--- a/tools/libxl/xenlight.pc.in.in
+++ /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
index 0000000..cdd98fb
--- /dev/null
+++ b/tools/libxl/xlutil.pc.in
@@ -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
index e7dc14d..0000000
--- a/tools/libxl/xlutil.pc.in.in
+++ /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
-- 
2.10.2


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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 04/17] tools: install PKG_INSTALLDIR in tools/Makefile
  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
  0 siblings, 0 replies; 26+ messages in thread
From: Wei Liu @ 2017-03-14 14:11 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, ian.jackson, wei.liu2

On Tue, Mar 14, 2017 at 02:31:11PM +0100, Juergen Gross wrote:
> Instead of installing $(PKG_INSTALLDIR) in multiple Makefiles below
> tools, do so in tools/Makefile.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  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:17     ` Wei Liu
  0 siblings, 2 replies; 26+ messages in thread
From: Andrew Cooper @ 2017-03-14 20:06 UTC (permalink / raw)
  To: Juergen Gross, xen-devel; +Cc: ian.jackson, wei.liu2

On 14/03/17 13:31, Juergen Gross wrote:
> In order to be able to use pkg-config for obtaining linker- and
> compiler-flags provide a xengnttab.pc and a xengntshr.pc file.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> Acked-by: Wei Liu <wei.liu2@citrix.com>

What is xengntshr.pc actually for?

(I am forward porting the XenServer patch queue, and rpm informs me that
there is no real libxengntshr)

All gntshr functionality is inside gnttab, and only a single shared
object exists.

In fact, I can't see why we have any *_libxengntshr infrastructure at
all (c/s a71ad0feada which introduced it originally doesn't help; they
weren't two libraries before either...).

The two uses of *_libxengntshr infrastructure are libxc and libvchan,
both of which reference *_libxengnttab immediately before.

~Andrew

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  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
  1 sibling, 1 reply; 26+ messages in thread
From: Juergen Gross @ 2017-03-15  6:07 UTC (permalink / raw)
  To: Andrew Cooper, xen-devel; +Cc: ian.jackson, wei.liu2

On 14/03/17 21:06, Andrew Cooper wrote:
> On 14/03/17 13:31, Juergen Gross wrote:
>> In order to be able to use pkg-config for obtaining linker- and
>> compiler-flags provide a xengnttab.pc and a xengntshr.pc file.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> What is xengntshr.pc actually for?

I just followed the existing coding. In tools/Rules.mk there are gntshr
specific flags, so I provided the related pkg-config file.

I have no problems with eliminating all gntshr references.

> (I am forward porting the XenServer patch queue, and rpm informs me that
> there is no real libxengntshr)
> 
> All gntshr functionality is inside gnttab, and only a single shared
> object exists.
> 
> In fact, I can't see why we have any *_libxengntshr infrastructure at
> all (c/s a71ad0feada which introduced it originally doesn't help; they
> weren't two libraries before either...).
> 
> The two uses of *_libxengntshr infrastructure are libxc and libvchan,
> both of which reference *_libxengnttab immediately before.

In other words: You'd like gntshr to be removed, right?

I think I'll just post a patch. This will be either accepted or not.


Juergen


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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  2017-03-14 20:06   ` Andrew Cooper
  2017-03-15  6:07     ` Juergen Gross
@ 2017-03-15 10:17     ` Wei Liu
  2017-03-15 10:26       ` Juergen Gross
  1 sibling, 1 reply; 26+ messages in thread
From: Wei Liu @ 2017-03-15 10:17 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Juergen Gross, xen-devel, wei.liu2, ian.jackson

On Tue, Mar 14, 2017 at 08:06:51PM +0000, Andrew Cooper wrote:
> On 14/03/17 13:31, Juergen Gross wrote:
> > In order to be able to use pkg-config for obtaining linker- and
> > compiler-flags provide a xengnttab.pc and a xengntshr.pc file.
> >
> > Signed-off-by: Juergen Gross <jgross@suse.com>
> > Acked-by: Wei Liu <wei.liu2@citrix.com>
> 
> What is xengntshr.pc actually for?
> 
> (I am forward porting the XenServer patch queue, and rpm informs me that
> there is no real libxengntshr)
> 
> All gntshr functionality is inside gnttab, and only a single shared
> object exists.
> 
> In fact, I can't see why we have any *_libxengntshr infrastructure at
> all (c/s a71ad0feada which introduced it originally doesn't help; they
> weren't two libraries before either...).
> 
> The two uses of *_libxengntshr infrastructure are libxc and libvchan,
> both of which reference *_libxengnttab immediately before.
> 

I don't know why they are arranged like that.

But I suppose we should keep the distinction so that people who link
against gntshr won't need to change their build rune.

Wei.

> ~Andrew

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  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
  0 siblings, 2 replies; 26+ messages in thread
From: Juergen Gross @ 2017-03-15 10:26 UTC (permalink / raw)
  To: Wei Liu, Andrew Cooper; +Cc: xen-devel, ian.jackson

On 15/03/17 11:17, Wei Liu wrote:
> On Tue, Mar 14, 2017 at 08:06:51PM +0000, Andrew Cooper wrote:
>> On 14/03/17 13:31, Juergen Gross wrote:
>>> In order to be able to use pkg-config for obtaining linker- and
>>> compiler-flags provide a xengnttab.pc and a xengntshr.pc file.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> Acked-by: Wei Liu <wei.liu2@citrix.com>
>>
>> What is xengntshr.pc actually for?
>>
>> (I am forward porting the XenServer patch queue, and rpm informs me that
>> there is no real libxengntshr)
>>
>> All gntshr functionality is inside gnttab, and only a single shared
>> object exists.
>>
>> In fact, I can't see why we have any *_libxengntshr infrastructure at
>> all (c/s a71ad0feada which introduced it originally doesn't help; they
>> weren't two libraries before either...).
>>
>> The two uses of *_libxengntshr infrastructure are libxc and libvchan,
>> both of which reference *_libxengnttab immediately before.
>>
> 
> I don't know why they are arranged like that.
> 
> But I suppose we should keep the distinction so that people who link
> against gntshr won't need to change their build rune.

As there is no libgntshr there can't be any user linking against gntshr.


Juergen


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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  2017-03-15 10:26       ` Juergen Gross
@ 2017-03-15 10:29         ` Wei Liu
  2017-03-15 10:32         ` Andrew Cooper
  1 sibling, 0 replies; 26+ messages in thread
From: Wei Liu @ 2017-03-15 10:29 UTC (permalink / raw)
  To: Juergen Gross; +Cc: Andrew Cooper, Wei Liu, ian.jackson, xen-devel

On Wed, Mar 15, 2017 at 11:26:55AM +0100, Juergen Gross wrote:
> On 15/03/17 11:17, Wei Liu wrote:
> > On Tue, Mar 14, 2017 at 08:06:51PM +0000, Andrew Cooper wrote:
> >> On 14/03/17 13:31, Juergen Gross wrote:
> >>> In order to be able to use pkg-config for obtaining linker- and
> >>> compiler-flags provide a xengnttab.pc and a xengntshr.pc file.
> >>>
> >>> Signed-off-by: Juergen Gross <jgross@suse.com>
> >>> Acked-by: Wei Liu <wei.liu2@citrix.com>
> >>
> >> What is xengntshr.pc actually for?
> >>
> >> (I am forward porting the XenServer patch queue, and rpm informs me that
> >> there is no real libxengntshr)
> >>
> >> All gntshr functionality is inside gnttab, and only a single shared
> >> object exists.
> >>
> >> In fact, I can't see why we have any *_libxengntshr infrastructure at
> >> all (c/s a71ad0feada which introduced it originally doesn't help; they
> >> weren't two libraries before either...).
> >>
> >> The two uses of *_libxengntshr infrastructure are libxc and libvchan,
> >> both of which reference *_libxengnttab immediately before.
> >>
> > 
> > I don't know why they are arranged like that.
> > 
> > But I suppose we should keep the distinction so that people who link
> > against gntshr won't need to change their build rune.
> 
> As there is no libgntshr there can't be any user linking against gntshr.
> 

I think removing it is fine then.

> 
> Juergen
> 

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  2017-03-15 10:26       ` Juergen Gross
  2017-03-15 10:29         ` Wei Liu
@ 2017-03-15 10:32         ` Andrew Cooper
  1 sibling, 0 replies; 26+ messages in thread
From: Andrew Cooper @ 2017-03-15 10:32 UTC (permalink / raw)
  To: Juergen Gross, Wei Liu; +Cc: xen-devel, ian.jackson

On 15/03/17 10:26, Juergen Gross wrote:
> On 15/03/17 11:17, Wei Liu wrote:
>> On Tue, Mar 14, 2017 at 08:06:51PM +0000, Andrew Cooper wrote:
>>> On 14/03/17 13:31, Juergen Gross wrote:
>>>> In order to be able to use pkg-config for obtaining linker- and
>>>> compiler-flags provide a xengnttab.pc and a xengntshr.pc file.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> Acked-by: Wei Liu <wei.liu2@citrix.com>
>>> What is xengntshr.pc actually for?
>>>
>>> (I am forward porting the XenServer patch queue, and rpm informs me that
>>> there is no real libxengntshr)
>>>
>>> All gntshr functionality is inside gnttab, and only a single shared
>>> object exists.
>>>
>>> In fact, I can't see why we have any *_libxengntshr infrastructure at
>>> all (c/s a71ad0feada which introduced it originally doesn't help; they
>>> weren't two libraries before either...).
>>>
>>> The two uses of *_libxengntshr infrastructure are libxc and libvchan,
>>> both of which reference *_libxengnttab immediately before.
>>>
>> I don't know why they are arranged like that.
>>
>> But I suppose we should keep the distinction so that people who link
>> against gntshr won't need to change their build rune.
> As there is no libgntshr there can't be any user linking against gntshr.

After thinking about it overnight, I seem to recall that IanC's first
patch did split it out into two libraries, because there were two kernel
devices.

I suspect its remnants here is a refactoring oversite.

~Andrew

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v2 08/17] tools: provide pkg-config file for libxengnttab
  2017-03-15  6:07     ` Juergen Gross
@ 2017-03-15 10:33       ` Andrew Cooper
  0 siblings, 0 replies; 26+ messages in thread
From: Andrew Cooper @ 2017-03-15 10:33 UTC (permalink / raw)
  To: Juergen Gross, xen-devel; +Cc: ian.jackson, wei.liu2

On 15/03/17 06:07, Juergen Gross wrote:
> On 14/03/17 21:06, Andrew Cooper wrote:
>> On 14/03/17 13:31, Juergen Gross wrote:
>>> In order to be able to use pkg-config for obtaining linker- and
>>> compiler-flags provide a xengnttab.pc and a xengntshr.pc file.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> Acked-by: Wei Liu <wei.liu2@citrix.com>
>> What is xengntshr.pc actually for?
> I just followed the existing coding. In tools/Rules.mk there are gntshr
> specific flags, so I provided the related pkg-config file.
>
> I have no problems with eliminating all gntshr references.
>
>> (I am forward porting the XenServer patch queue, and rpm informs me that
>> there is no real libxengntshr)
>>
>> All gntshr functionality is inside gnttab, and only a single shared
>> object exists.
>>
>> In fact, I can't see why we have any *_libxengntshr infrastructure at
>> all (c/s a71ad0feada which introduced it originally doesn't help; they
>> weren't two libraries before either...).
>>
>> The two uses of *_libxengntshr infrastructure are libxc and libvchan,
>> both of which reference *_libxengnttab immediately before.
> In other words: You'd like gntshr to be removed, right?

Well ;) that is where I was going, but I was also wanting to check that
I wasn't missing something subtle.

~Andrew

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-03-15 10:33 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2 05/17] tools: add support for additional items in .pc files for local builds Juergen Gross
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

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.