pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sun Mar 15 10:33:42 UTC 2020

Modified Files:
        pkgsrc/mk: pkg-build-options.mk

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


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/mk/pkg-build-options.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/pkg-build-options.mk
diff -u pkgsrc/mk/pkg-build-options.mk:1.15 pkgsrc/mk/pkg-build-options.mk:1.16
--- pkgsrc/mk/pkg-build-options.mk:1.15 Sat Mar 14 13:28:38 2020
+++ pkgsrc/mk/pkg-build-options.mk      Sun Mar 15 10:33:42 2020
@@ -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 @@ MAKEFLAGS+=   PKG_BUILD_OPTIONS.${b}=${PKG
 MAKEVARS+=     PKG_BUILD_OPTIONS.${b}
 .  endfor
 .endif
+
+.undef pkgbase # prepare for the next invocation



Home | Main Index | Thread Index | Old Index