From 7fa0f76bb97964745e0cc9e47c59e17ca0a4c51b Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 7 Jun 2006 18:37:06 +0000 Subject: If there is _ZERO_FILESIZE_P, then it's natural to have _NONZERO_FILESIZE_P to test for the opposite condition. --- mk/bsd.pkg.mk | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'mk') 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_}};@} -- cgit v1.2.3