[PATCH 6/8] Document all pkg-config derived metadata variables

Dan Nicholson dbn.lists at gmail.com
Sat Apr 20 07:42:23 PDT 2013

The derived variables pcfiledir, pc_top_builddir and pc_sysrootdir were
lacking in documentation. Rework the "QUERYING PKG-CONFIG'S DEFAULTS"
section to describe these and pc_path.

The example of using "pkg-config --modversion pkg-config" was removed
since it's superfluous to "pkg-config --version".

Freedesktop #62018 (https://bugs.freedesktop.org/show_bug.cgi?id=62018)
 pkg-config.1 | 41 ++++++++++++++++++++++++++++++++++++-----
 1 file changed, 36 insertions(+), 5 deletions(-)

diff --git a/pkg-config.1 b/pkg-config.1
index 427bf76..07c2a15 100644
--- a/pkg-config.1
+++ b/pkg-config.1
@@ -308,17 +308,48 @@ equal to /var/target (same rule apply to -L)
 Replaces the default \fIpkg-config\fP search directory, usually \fI/usr/lib/pkgconfig\fP
 .I pkg-config
-can be used to query itself for the default search path, version number
-and other information, for instance using:
+sets a few metadata variables that can be used in .pc files or queried
+at runtime.
+.I pc_path
+The default search path used by
+.I pkg-config
+when searching for .pc files. This can be used in a query for the
+.I pkg-config
+module itself itself:
   $ pkg-config --variable pc_path pkg-config
+.I pcfiledir
+The installed location of the .pc file. This can be used to query the
+location of the .pc file for a particular module, but it can also be
+used to make .pc files relocatable. For instance:
-  $ pkg-config --modversion pkg-config
+.I pc_sysrootdir
+The sysroot directory set by the user. When the sysroot directory has
+not been set, this value is
+.IR / .
+See the
+environment variable for more details.
+.I pc_top_builddir
+Location of the user's top build directory when calling
+.IR pkg-config.
+This is useful to dynamically set paths in uninstalled .pc files. See
+environment variable for more details.
 .I pkg-config

More information about the pkg-config mailing list