diff options
author | jlam <jlam@pkgsrc.org> | 2006-06-07 18:37:06 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-06-07 18:37:06 +0000 |
commit | 68229b135c809b20b9644921654b87b7eadbeac0 (patch) | |
tree | 51f1265a9ce6b2b75d089029c00fac4d30f6576c /mk | |
parent | 377d2c27f2e649f829149d7be80f30912ab95d71 (diff) | |
download | pkgsrc-68229b135c809b20b9644921654b87b7eadbeac0.tar.gz |
If there is _ZERO_FILESIZE_P, then it's natural to have _NONZERO_FILESIZE_P
to test for the opposite condition.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 124c85d2e85..33814ca3f01 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1845 2006/06/07 17:44:29 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1846 2006/06/07 18:37:06 jlam Exp $ # # This file is in the public domain. # @@ -284,10 +284,13 @@ BUILD_DEFS+= PKG_OPTIONS PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty." .endif -# This is a command that exits with a zero status if the given file -# is zero-length, e.g. if ${_ZERO_FILESIZE_P} $$file; then ...; fi +# ZERO_FILESIZE_P exits with a successful return code if the given file +# has zero length. +# NONZERO_FILESIZE_P exits with a successful return code if the given file +# has nonzero length. # -_ZERO_FILESIZE_P= ${AWK} 'END { exit NR ? 1 : 0; }' +_ZERO_FILESIZE_P= ${AWK} 'END { exit (NR > 0) ? 1 : 0; }' +_NONZERO_FILESIZE_P= ${AWK} 'END { exit (NR > 0) ? 0 : 1; }' # Automatically increase process limit where necessary for building. _ULIMIT_CMD= ${UNLIMIT_RESOURCES:@_lim_@${ULIMIT_CMD_${_lim_}};@} |