summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-07 18:37:06 +0000
committerjlam <jlam>2006-06-07 18:37:06 +0000
commit7fa0f76bb97964745e0cc9e47c59e17ca0a4c51b (patch)
tree51f1265a9ce6b2b75d089029c00fac4d30f6576c /mk
parente70ddc19a35bcee052c60e54534cc661d989b298 (diff)
downloadpkgsrc-7fa0f76bb97964745e0cc9e47c59e17ca0a4c51b.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.mk11
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_}};@}