summaryrefslogtreecommitdiff
path: root/mk/tools/pkg-config.mk
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2005-10-01 12:55:20 +0000
committerjmmv <jmmv@pkgsrc.org>2005-10-01 12:55:20 +0000
commit6abb86357f38c3d8d9fb2d4f4896159559a8df8f (patch)
treee2f6eb8f6936c57c87ee2ae7196e508ec10b729f /mk/tools/pkg-config.mk
parent710113513912810a7eb2ee9bd861312224d1ac2d (diff)
downloadpkgsrc-6abb86357f38c3d8d9fb2d4f4896159559a8df8f.tar.gz
Generate a log file in the work directory with all calls to pkg-config so
that we can later use them to sanity check the package dependencies. Requires pkg-config 0.19nb1 to work but does no harm with older versions.
Diffstat (limited to 'mk/tools/pkg-config.mk')
-rw-r--r--mk/tools/pkg-config.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/mk/tools/pkg-config.mk b/mk/tools/pkg-config.mk
index e228f0ed6d8..e249e0f5962 100644
--- a/mk/tools/pkg-config.mk
+++ b/mk/tools/pkg-config.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pkg-config.mk,v 1.2 2005/08/16 13:32:00 jlam Exp $
+# $NetBSD: pkg-config.mk,v 1.3 2005/10/01 12:55:20 jmmv Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -40,11 +40,23 @@
# pkg-config wrapper script.
#
_PKG_CONFIG_LIBDIR?= ${BUILDLINK_DIR}/lib/pkgconfig
+_PKG_CONFIG_LOG?= ${WRKDIR}/.pkg-config.log
TOOLS_SCRIPT.pkg-config= \
PKG_CONFIG_LIBDIR=${_PKG_CONFIG_LIBDIR:Q} ${TOOLS_SCRIPT_DFLT.pkg-config}
CONFIGURE_ENV+= PKG_CONFIG=${TOOLS_CMD.pkg-config:Q}
CONFIGURE_ENV+= PKG_CONFIG_LIBDIR=${_PKG_CONFIG_LIBDIR:Q}
+CONFIGURE_ENV+= PKG_CONFIG_LOG=${_PKG_CONFIG_LOG}
MAKE_ENV+= PKG_CONFIG=${TOOLS_CMD.pkg-config:Q}
MAKE_ENV+= PKG_CONFIG_LIBDIR=${_PKG_CONFIG_LIBDIR:Q}
+MAKE_ENV+= PKG_CONFIG_LOG=${_PKG_CONFIG_LOG}
+
+.if !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
+post-build: pkgconfig-post-build
+
+pkgconfig-post-build:
+ @if ${TEST} -f ${_PKG_CONFIG_LOG}; then \
+ ${ECHO} "*** Please use pkgtools/verifypc to sanity check dependencies."; \
+ fi
+.endif