pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk mk/pkg-build-options: fail immediately if pkgbase i...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c9c6f10c6d79
branches:  trunk
changeset: 413021:c9c6f10c6d79
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Mar 15 10:33:42 2020 +0000

description:
mk/pkg-build-options: fail immediately if pkgbase is not set

diffstat:

 mk/pkg-build-options.mk |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 916cb04ff838 -r c9c6f10c6d79 mk/pkg-build-options.mk
--- a/mk/pkg-build-options.mk   Sun Mar 15 10:31:59 2020 +0000
+++ b/mk/pkg-build-options.mk   Sun Mar 15 10:33:42 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pkg-build-options.mk,v 1.15 2020/03/14 13:28:38 wiz Exp $
+# $NetBSD: pkg-build-options.mk,v 1.16 2020/03/15 10:33:42 rillig Exp $
 #
 # This procedure determines the PKG_OPTIONS that have been in effect
 # when the package ${pkgbase} has been built. When the package is not
@@ -21,6 +21,12 @@
 # Keywords: options pkg-build-options PKG_BUILD_OPTIONS
 #
 
+.if !defined(pkgbase)
+.  for including in ${.INCLUDEDFROMDIR}/${.INCLUDEDFROMFILE}
+PKG_FAIL_REASON+=      "[pkg-build-options.mk] ${including}: pkgbase must be set"
+.  endfor
+.endif
+
 .include "bsd.fast.prefs.mk"
 
 # For the check for inclusion from non-buildlink3.mk, it is irrelevant
@@ -63,3 +69,5 @@
 MAKEVARS+=     PKG_BUILD_OPTIONS.${b}
 .  endfor
 .endif
+
+.undef pkgbase # prepare for the next invocation



Home | Main Index | Thread Index | Old Index