diff options
author | rillig <rillig@pkgsrc.org> | 2007-08-11 16:25:16 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-08-11 16:25:16 +0000 |
commit | 3b06ad5673b704644d2dfea44483f0c616daf824 (patch) | |
tree | 5f3f5ca0bcbbf834f7400b169bd3252063b99bcc /mk/pkg-build-options.mk | |
parent | f386576cb106936f591a4cf519c3aacf47773c4b (diff) | |
download | pkgsrc-3b06ad5673b704644d2dfea44483f0c616daf824.tar.gz |
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 (limited to 'mk/pkg-build-options.mk')
-rw-r--r-- | mk/pkg-build-options.mk | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/mk/pkg-build-options.mk b/mk/pkg-build-options.mk index f877ed5ad12..a143bfc9c91 100644 --- a/mk/pkg-build-options.mk +++ b/mk/pkg-build-options.mk @@ -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 @@ MAKEFLAGS+= PKG_BUILD_OPTIONS.${b}=${PKG_BUILD_OPTIONS.${b}:Q} 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})." |