]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
tools: generate pkg-config files from make variables
authorJuergen Gross <jgross@suse.com>
Fri, 28 Aug 2020 15:07:17 +0000 (17:07 +0200)
committerWei Liu <wl@xen.org>
Wed, 9 Sep 2020 10:57:16 +0000 (10:57 +0000)
For each library built two variants of pkg-config files are created
from a per-library template: an "official" one for installation on
the user's system, and one used for building internal tools, like e.g.
qemu.

Instead of the template which is looking very similar for all libraries
generate the pkg-config files directly from make variables.

This will reduce the need to specify some pkg-config file entries in
the templates, as the contents can easily be generated from available
data (e.g. "Version:" and "Requires.private:" entries).

Especially the variant used for building internal tools needs to gain
additional runtime link parameters for the internally used libraries,
as otherwise those won't be found by the users (e.g. qemu).

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wl@xen.org>
24 files changed:
stubdom/Makefile
tools/Rules.mk
tools/libs/call/xencall.pc.in [deleted file]
tools/libs/devicemodel/xendevicemodel.pc.in [deleted file]
tools/libs/evtchn/xenevtchn.pc.in [deleted file]
tools/libs/foreignmemory/xenforeignmemory.pc.in [deleted file]
tools/libs/gnttab/xengnttab.pc.in [deleted file]
tools/libs/hypfs/xenhypfs.pc.in [deleted file]
tools/libs/libs.mk
tools/libs/toolcore/Makefile
tools/libs/toolcore/xentoolcore.pc.in [deleted file]
tools/libs/toollog/xentoollog.pc.in [deleted file]
tools/libvchan/Makefile
tools/libvchan/xenvchan.pc.in [deleted file]
tools/libxc/Makefile
tools/libxc/xencontrol.pc.in [deleted file]
tools/libxc/xenguest.pc.in [deleted file]
tools/libxl/Makefile
tools/libxl/xenlight.pc.in [deleted file]
tools/libxl/xlutil.pc.in [deleted file]
tools/xenstat/libxenstat/Makefile
tools/xenstat/libxenstat/xenstat.pc.in [deleted file]
tools/xenstore/Makefile
tools/xenstore/xenstore.pc.in [deleted file]

index 98eba8efe3bfd2f57fa94d2bdec7e0122b58ee41..f000f56e688525685417ecac3b3727024c9ecd1d 100644 (file)
@@ -342,7 +342,6 @@ define do_links
   cd $(dir $@); \
   ln -sf $(dir $<)include/*.h include/; \
   ln -sf $(dir $<)*.[ch] .; \
-  ln -sf $(dir $<)*.pc.in .; \
   ln -sf $(dir $<)Makefile .
   touch $@
 endef
index 385807a71cd9b975c0afb47a2045e468ff027d0c..52a16c9ac37423f9d220a2c1abbd85d784d4b5e3 100644 (file)
@@ -209,27 +209,33 @@ endif
 
 PKG_CONFIG_DIR ?= $(XEN_ROOT)/tools/pkg-config
 
-PKG_CONFIG_FILTER = $(foreach l,$(PKG_CONFIG_REMOVE),-e 's!\([ ,]\)$(l),!\1!g' -e 's![ ,]$(l)$$!!g')
-
-$(PKG_CONFIG_DIR)/%.pc: %.pc.in Makefile $(XEN_ROOT)/tools/Rules.mk
+$(PKG_CONFIG_DIR):
        mkdir -p $(PKG_CONFIG_DIR)
-       @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!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
-            -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
-            -e 's!@@cflagslocal@@!$(PKG_CONFIG_CFLAGS_LOCAL)!g' \
-            -e 's!@@libsflag@@\([^ ]*\)!-L\1 -Wl,-rpath-link=\1!g' \
-            $(PKG_CONFIG_FILTER) < $< > $@
-
-%.pc: %.pc.in Makefile $(XEN_ROOT)/tools/Rules.mk
-       @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!@@firmwaredir@@!$(XENFIRMWAREDIR)!g' \
-            -e 's!@@libexecbin@@!$(LIBEXEC_BIN)!g' \
-            -e 's!@@cflagslocal@@!!g' \
-            -e 's!@@libsflag@@!-L!g' \
-            $(PKG_CONFIG_FILTER) < $< > $@
+
+$(PKG_CONFIG_DIR)/%.pc: Makefile $(XEN_ROOT)/tools/Rules.mk $(PKG_CONFIG_DIR)
+       $(file >$@,prefix=$(PKG_CONFIG_PREFIX))
+       $(file >>$@,includedir=$(PKG_CONFIG_INCDIR))
+       $(file >>$@,libdir=$(PKG_CONFIG_LIBDIR))
+       $(foreach var,$(PKG_CONFIG_VARS),$(file >>$@,$(var)))
+       $(file >>$@,)
+       $(file >>$@,Name: $(PKG_CONFIG_NAME))
+       $(file >>$@,Description: $(PKG_CONFIG_DESC))
+       $(file >>$@,Version: $(PKG_CONFIG_VERSION))
+       $(file >>$@,Cflags: -I$${includedir} $(CFLAGS_xeninclude))
+       $(file >>$@,Libs: -L$${libdir} $(PKG_CONFIG_USELIBS) -l$(PKG_CONFIG_LIB))
+       $(file >>$@,Libs.private: $(PKG_CONFIG_LIBSPRIV))
+       $(file >>$@,Requires.private: $(PKG_CONFIG_REQPRIV))
+
+%.pc: Makefile $(XEN_ROOT)/tools/Rules.mk
+       $(file >$@,prefix=$(PKG_CONFIG_PREFIX))
+       $(file >>$@,includedir=$(PKG_CONFIG_INCDIR))
+       $(file >>$@,libdir=$(PKG_CONFIG_LIBDIR))
+       $(foreach var,$(PKG_CONFIG_VARS),$(file >>$@,$(var)))
+       $(file >>$@,)
+       $(file >>$@,Name: $(PKG_CONFIG_NAME))
+       $(file >>$@,Description: $(PKG_CONFIG_DESC))
+       $(file >>$@,Version: $(PKG_CONFIG_VERSION))
+       $(file >>$@,Cflags: -I$${includedir})
+       $(file >>$@,Libs: -L$${libdir} -l$(PKG_CONFIG_LIB))
+       $(file >>$@,Libs.private: $(PKG_CONFIG_LIBSPRIV))
+       $(file >>$@,Requires.private: $(PKG_CONFIG_REQPRIV))
diff --git a/tools/libs/call/xencall.pc.in b/tools/libs/call/xencall.pc.in
deleted file mode 100644 (file)
index 409773e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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,xentoolcore
diff --git a/tools/libs/devicemodel/xendevicemodel.pc.in b/tools/libs/devicemodel/xendevicemodel.pc.in
deleted file mode 100644 (file)
index 8bd04fa..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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: xentoolcore,xentoollog,xencall
diff --git a/tools/libs/evtchn/xenevtchn.pc.in b/tools/libs/evtchn/xenevtchn.pc.in
deleted file mode 100644 (file)
index c74af1e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenevtchn
-Description: The Xenevtchn library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxenevtchn
-Requires.private: xentoollog
diff --git a/tools/libs/foreignmemory/xenforeignmemory.pc.in b/tools/libs/foreignmemory/xenforeignmemory.pc.in
deleted file mode 100644 (file)
index 61c9def..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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,xentoolcore
diff --git a/tools/libs/gnttab/xengnttab.pc.in b/tools/libs/gnttab/xengnttab.pc.in
deleted file mode 100644 (file)
index 4c3beed..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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,xentoolcore
diff --git a/tools/libs/hypfs/xenhypfs.pc.in b/tools/libs/hypfs/xenhypfs.pc.in
deleted file mode 100644 (file)
index ef9fcc8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xenhypfs
-Description: The Xenhypfs library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxenhypfs
-Requires.private: xentoolcore,xentoollog,xencall,zlib
index 8b1ca2aa628999414249ef45b4aaba783504fa18..4679268fc2067ec73238751adf4e0dcf73fee08e 100644 (file)
@@ -25,8 +25,16 @@ ifneq ($(nosharedlibs),y)
 LIB += libxen$(LIBNAME).so
 endif
 
+comma:= ,
+empty:=
+space:= $(empty) $(empty)
 PKG_CONFIG ?= xen$(LIBNAME).pc
+PKG_CONFIG_NAME ?= Xen$(LIBNAME)
+PKG_CONFIG_DESC ?= The $(PKG_CONFIG_NAME) library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxen$(LIBNAME))
+PKG_CONFIG_LIB := xen$(LIBNAME)
+PKG_CONFIG_REQPRIV := $(subst $(space),$(comma),$(strip $(foreach lib,$(USELIBS_$(LIBNAME)),xen$(lib))))
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
index 34b08a42360a1b82a298b2953cf502e51a29256f..5819bbc8ee55c6974da0d07ac84280ea58d1fb7c 100644 (file)
@@ -9,6 +9,7 @@ SRCS-y  += handlereg.c
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
+PKG_CONFIG_DESC := Central support for Xen Hypervisor userland libraries
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_libxentoolcore)/include
 
 $(LIB_OBJS): $(AUTOINCS)
diff --git a/tools/libs/toolcore/xentoolcore.pc.in b/tools/libs/toolcore/xentoolcore.pc.in
deleted file mode 100644 (file)
index 55ff4e2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xentoolcore
-Description: Central support for Xen Hypervisor userland libraries
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxentoolcore
diff --git a/tools/libs/toollog/xentoollog.pc.in b/tools/libs/toollog/xentoollog.pc.in
deleted file mode 100644 (file)
index 554e4d5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xentoollog
-Description: The Xentoollog library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir}
-Libs: @@libsflag@@${libdir} -lxentoollog
index a5441162a07687cc22a0b7848d44542acf659278..e71844797715bbc09d241835e19d96e7de4db7b9 100644 (file)
@@ -23,7 +23,12 @@ CFLAGS += -I../include -I.
 io.o io.opic: CFLAGS += $(CFLAGS_libxenctrl) # for xen_mb et al
 
 PKG_CONFIG := xenvchan.pc
+PKG_CONFIG_NAME := Xenvchan
+PKG_CONFIG_DESC := The Xenvchan library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxenvchan)
+PKG_CONFIG_LIB := xenvchan
+PKG_CONFIG_REQPRIV := xentoollog,xenstore,xenevtchn,xengnttab
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
diff --git a/tools/libvchan/xenvchan.pc.in b/tools/libvchan/xenvchan.pc.in
deleted file mode 100644 (file)
index 6fd1310..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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,xenevtchn,xengnttab
index c1e41a8ee9485d09abe0fab77c6d6af729554f42..315ac0b4f3b39c3dfca2059ed530db751a0c463c 100644 (file)
@@ -158,6 +158,28 @@ $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS): xc_private.h
 PKG_CONFIG := xencontrol.pc xenguest.pc
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 
+xencontrol.pc: PKG_CONFIG_NAME = Xencontrol
+xencontrol.pc: PKG_CONFIG_DESC = The Xencontrol library for Xen hypervisor
+xencontrol.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenctrl)
+xencontrol.pc: PKG_CONFIG_LIB = xenctrl
+xencontrol.pc: PKG_CONFIG_REQPRIV = xenevtchn,xengnttab,xencall,xenforeignmemory,xendevicemodel,xentoollog
+xenguest.pc: PKG_CONFIG_NAME = Xenguest
+xenguest.pc: PKG_CONFIG_DESC = The Xenguest library for Xen hypervisor
+xenguest.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenguest)
+xenguest.pc: PKG_CONFIG_LIB = xenguest
+xenguest.pc: PKG_CONFIG_REQPRIV = xentoollog,xencall,xenforeignmemory,xenevtchn
+
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_NAME = Xencontrol
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_DESC = The Xencontrol library for Xen hypervisor
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenctrl)
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_LIB = xenctrl
+$(PKG_CONFIG_DIR)/xencontrol.pc: PKG_CONFIG_REQPRIV = xenevtchn,xengnttab,xencall,xenforeignmemory,xendevicemodel,xentoollog
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_NAME = Xenguest
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_DESC = The Xenguest library for Xen hypervisor
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenguest)
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_LIB = xenguest
+$(PKG_CONFIG_DIR)/xenguest.pc: PKG_CONFIG_REQPRIV = xentoollog,xencall,xenforeignmemory,xenevtchn
+
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
 $(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix)
diff --git a/tools/libxc/xencontrol.pc.in b/tools/libxc/xencontrol.pc.in
deleted file mode 100644 (file)
index e653ba2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@@prefix@@
-includedir=@@incdir@@
-libdir=@@libdir@@
-
-Name: Xencontrol
-Description: The Xencontrol library for Xen hypervisor
-Version: @@version@@
-Cflags: -I${includedir} @@cflagslocal@@
-Libs: @@libsflag@@${libdir} -lxenctrl
-Requires.private: xenevtchn,xengnttab,xencall,xenforeignmemory,xendevicemodel,xentoollog
diff --git a/tools/libxc/xenguest.pc.in b/tools/libxc/xenguest.pc.in
deleted file mode 100644 (file)
index 225ac0b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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
index c26b3a809320236e45d3980db0c2731df612a796..f61f761e1ea6c2208361c37e62f1d85ac6afb99f 100644 (file)
@@ -195,8 +195,19 @@ PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
+xenlight.pc: PKG_CONFIG_NAME = Xenlight
+xenlight.pc: PKG_CONFIG_DESC = The Xenlight library for Xen hypervisor
 xenlight.pc: PKG_CONFIG_VERSION = $(MAJOR).$(MINOR)
+xenlight.pc: PKG_CONFIG_VARS = xenfirmwaredir=$(XENFIRMWAREDIR) libexec_bin=$(LIBEXEC_BIN)
+xenlight.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenlight)
+xenlight.pc: PKG_CONFIG_LIB = xenlight
+xenlight.pc: PKG_CONFIG_REQPRIV = xentoollog,xenevtchn,xencontrol,xenguest,xenstore,xenhypfs
+xlutil.pc: PKG_CONFIG_NAME = Xlutil
+xlutil.pc: PKG_CONFIG_DESC = The xl utility library for Xen hypervisor
 xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
+xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxlutil)
+xlutil.pc: PKG_CONFIG_LIB = xlutil
+xlutil.pc: PKG_CONFIG_REQPRIV = xenlight
 $(PKG_CONFIG_INST): PKG_CONFIG_PREFIX = $(prefix)
 $(PKG_CONFIG_INST): PKG_CONFIG_INCDIR = $(includedir)
 $(PKG_CONFIG_INST): PKG_CONFIG_LIBDIR = $(libdir)
@@ -204,8 +215,19 @@ endif
 
 PKG_CONFIG_LOCAL := $(foreach pc,$(PKG_CONFIG),$(PKG_CONFIG_DIR)/$(pc))
 
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_NAME = Xenlight
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_DESC = The Xenlight library for Xen hypervisor
 $(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_VERSION = $(MAJOR).$(MINOR)
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_VARS = xenfirmwaredir=$(XENFIRMWAREDIR) libexec_bin=$(LIBEXEC_BIN)
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxenlight)
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_LIB = xenlight
+$(PKG_CONFIG_DIR)/xenlight.pc: PKG_CONFIG_REQPRIV = xentoollog,xenevtchn,xencontrol,xenguest,xenstore,xenhypfs
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_NAME = Xlutil
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_DESC = The xl utility library for Xen hypervisor
 $(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_VERSION = $(XLUMAJOR).$(XLUMINOR)
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_USELIBS = $(SHLIB_libxlutil)
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_LIB = xlutil
+$(PKG_CONFIG_DIR)/xlutil.pc: PKG_CONFIG_REQPRIV = xenlight
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_PREFIX = $(XEN_ROOT)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(CURDIR)
 $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR)
diff --git a/tools/libxl/xenlight.pc.in b/tools/libxl/xenlight.pc.in
deleted file mode 100644 (file)
index 6b351ba..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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,xencontrol,xenguest,xenstore,xenhypfs
diff --git a/tools/libxl/xlutil.pc.in b/tools/libxl/xlutil.pc.in
deleted file mode 100644 (file)
index cdd98fb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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
index b5e623b155522bae85d4b728b36a385347f2ea3d..bdd5a0f469e232cc8f20e4a688305bf261cbf604 100644 (file)
@@ -38,7 +38,12 @@ LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl) -lyajl
 LDLIBS-$(CONFIG_SunOS) += -lkstat
 
 PKG_CONFIG := xenstat.pc
+PKG_CONFIG_NAME := Xenstat
+PKG_CONFIG_DESC := The Xenstat library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxenstat)
+PKG_CONFIG_LIB := xenstat
+PKG_CONFIG_REQPRIV := xencontrol,xenstore
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
diff --git a/tools/xenstat/libxenstat/xenstat.pc.in b/tools/xenstat/libxenstat/xenstat.pc.in
deleted file mode 100644 (file)
index ad00577..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-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
index 0a64ac1571404bd3806f5433074c677517b94b92..574be8d15c31fa3b56e8578c80019a647c21f8c4 100644 (file)
@@ -105,8 +105,7 @@ xs.opic: CFLAGS += -DUSE_PTHREAD
 ifeq ($(CONFIG_Linux),y)
 xs.opic: CFLAGS += -DUSE_DLSYM
 libxenstore.so.$(MAJOR).$(MINOR): APPEND_LDFLAGS += -ldl
-else
-PKG_CONFIG_REMOVE += -ldl
+PKG_CONFIG_LIBSPRIV := -ldl
 endif
 
 libxenstore.so.$(MAJOR).$(MINOR): xs.opic xs_lib.opic
@@ -116,7 +115,12 @@ libxenstore.a: xs.o xs_lib.o
        $(AR) rcs $@ $^
 
 PKG_CONFIG := xenstore.pc
+PKG_CONFIG_NAME := Xenstore
+PKG_CONFIG_DESC := The Xenstore library for Xen hypervisor
 PKG_CONFIG_VERSION := $(MAJOR).$(MINOR)
+PKG_CONFIG_USELIBS := $(SHLIB_libxenstore)
+PKG_CONFIG_LIB := xenstore
+PKG_CONFIG_REQPRIV := xenevtchn,xencontrol,xengnttab,xentoolcore
 
 ifneq ($(CONFIG_LIBXC_MINIOS),y)
 PKG_CONFIG_INST := $(PKG_CONFIG)
diff --git a/tools/xenstore/xenstore.pc.in b/tools/xenstore/xenstore.pc.in
deleted file mode 100644 (file)
index 2f64a6b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-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
-Libs.private: -ldl
-Requires.private: xenevtchn,xencontrol,xengnttab,xentoolcore