pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk If there is _ZERO_FILESIZE_P, then it's natural to ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1c5c981edb1f
branches: trunk
changeset: 514099:1c5c981edb1f
user: jlam <jlam%pkgsrc.org@localhost>
date: Wed Jun 07 18:37:06 2006 +0000
description:
If there is _ZERO_FILESIZE_P, then it's natural to have _NONZERO_FILESIZE_P
to test for the opposite condition.
diffstat:
mk/bsd.pkg.mk | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (26 lines):
diff -r c2d28a2dd8aa -r 1c5c981edb1f mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Wed Jun 07 17:44:29 2006 +0000
+++ b/mk/bsd.pkg.mk Wed Jun 07 18:37:06 2006 +0000
@@ -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 @@
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_}};@}
Home |
Main Index |
Thread Index |
Old Index