pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk pkg_info -Q does not print a newline if a variable ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ca80ecdf4ac0
branches: trunk
changeset: 532106:ca80ecdf4ac0
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Aug 11 16:25:16 2007 +0000
description:
pkg_info -Q does not print a newline if a variable isn't defined at all
in the installed package's +BUILD_INFO. Therefore, an empty line is
printed in advance to avoid a warning by make(1). Fixes PR 36588.
diffstat:
mk/pkg-build-options.mk | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diffs (52 lines):
diff -r a7a31d50f411 -r ca80ecdf4ac0 mk/pkg-build-options.mk
--- a/mk/pkg-build-options.mk Sat Aug 11 15:22:31 2007 +0000
+++ b/mk/pkg-build-options.mk Sat Aug 11 16:25:16 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pkg-build-options.mk,v 1.3 2007/05/07 09:26:40 rillig Exp $
+# $NetBSD: pkg-build-options.mk,v 1.4 2007/08/11 16:25:16 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
@@ -7,6 +7,8 @@
# Parameters:
# pkgbase
# The basename of the package.
+# pkgpath
+# The directory in which the source package lives.
#
# Returns:
# PKG_BUILD_OPTIONS.${pkgbase}
@@ -23,6 +25,7 @@
. for b in ${pkgbase}
. if !defined(PKG_BUILD_OPTIONS.${b})
PKG_BUILD_OPTIONS.${b} != \
+ echo ""; \
${PKG_INFO} -Q PKG_OPTIONS ${pkgbase} 2>/dev/null \
|| { cd ${BUILDLINK_PKGSRCDIR.${b}} \
&& ${MAKE} ${MAKEFLAGS} show-var VARNAME=PKG_OPTIONS; }
@@ -32,6 +35,25 @@
MAKEVARS+= PKG_BUILD_OPTIONS.${b}
. endfor
+
+.elif defined(bl4_package) && defined(pkgpath)
+. for b in ${bl4_package}
+. if !defined(PKG_BUILD_OPTIONS.${b})
+. if ${pkgpath} == ${PKGPATH}
+PKG_BUILD_OPTIONS.${b} = ${PKG_OPTIONS}
+. else
+PKG_BUILD_OPTIONS.${b} != \
+ ${PKG_INFO} -Q PKG_OPTIONS ${b} 2>/dev/null \
+ || { cd ${PKGSRCDIR}/${pkgpath} \
+ && ${MAKE} ${MAKEFLAGS} show-var VARNAME=PKG_OPTIONS; }
+
+MAKEFLAGS+= PKG_BUILD_OPTIONS.${b}=${PKG_BUILD_OPTIONS.${b}:Q}
+. endif
+. endif
+
+MAKEVARS+= PKG_BUILD_OPTIONS.${b}
+. endfor
+
.else
. for b in ${pkgbase}
PKG_FAIL_REASON+= "[pkg-build-options.mk] This file may only be included from a buildlink3.mk file (pkgbase=${b})."
Home |
Main Index |
Thread Index |
Old Index