summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-12-01 00:17:05 +0000
committerrillig <rillig@pkgsrc.org>2005-12-01 00:17:05 +0000
commitbe7bdd3b87977e0851b7270f9568290074b6abb5 (patch)
tree107601d7e65aeab6fab0abb8495e5b5b655c37a6 /mk/bsd.pkg.mk
parenta3990dd4cdc347bb33666bfa88d3779e4bbe58b4 (diff)
downloadpkgsrc-be7bdd3b87977e0851b7270f9568290074b6abb5.tar.gz
The new target do-check-pkg-fail-reason should to be a dependency of
every top level target that is intended to be called by the user or by a package different from the current package. It provides the same action as the "main" targets like "fetch", "expand", "build" before in case PKG_FAIL_REASON is set, that is it prints all PKG_FAIL_REASONs and fails. Fixes PR 32202. Implementation notes: - The target names have the "do-" prefix to not pollute the bsd.pkg.check.mk namespace. - The PKG_SKIP_REASON has no influence on the do-check-pkg-fail-reason target, although both are handled with the same code.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk18
1 files changed, 15 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 19584186e41..fb16131e473 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1769 2005/11/29 22:18:38 reed Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1770 2005/12/01 00:17:05 rillig Exp $
#
# This file is in the public domain.
#
@@ -974,8 +974,9 @@ PKG_SKIP_REASON+= "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
# Now print some error messages that we know we should ignore the pkg
#
. if defined(PKG_FAIL_REASON) || defined(PKG_SKIP_REASON)
+.PHONY: do-check-pkg-fail-or-skip-reason
fetch checksum extract patch configure all build install package \
-update install-depends:
+update install-depends do-check-pkg-fail-or-skip-reason:
. if defined(SKIP_SILENT)
@${DO_NADA}
. else
@@ -989,6 +990,17 @@ update install-depends:
. endif # SKIP
.endif # !NO_SKIP
+.PHONY: do-check-pkg-fail-reason
+do-check-pkg-fail-reason:
+ @${DO_NADA}
+
+# This target should appear as a dependency of every top level target that
+# is intended to be called by the user or by a package different from the
+# current package.
+.if defined(PKG_FAIL_REASON)
+do-check-pkg-fail-reason: do-check-pkg-fail-or-skip-reason
+.endif
+
# Add these defs to the ones dumped into +BUILD_DEFS
BUILD_DEFS+= PKGPATH
BUILD_DEFS+= OPSYS OS_VERSION MACHINE_ARCH MACHINE_GNU_ARCH
@@ -1390,7 +1402,7 @@ do-fetch:
.PHONY: show-depends-dirs
.if !target(show-depends-dirs)
_ALL_DEPENDS= ${DEPENDS} ${BUILD_DEPENDS}
-show-depends-dirs:
+show-depends-dirs: do-check-pkg-fail-reason
@dlist=""; \
depends=${_ALL_DEPENDS:C/^[^:]*://:O:u:Q}; \
for reldir in $$depends; do \