summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-07 17:44:29 +0000
committerjlam <jlam>2006-06-07 17:44:29 +0000
commite70ddc19a35bcee052c60e54534cc661d989b298 (patch)
tree9f816740eb37d39f629635a73c58be277e0393ae /mk/bsd.pkg.mk
parentd898aab87e346dff3820ff2a10d659dcfc28c38b (diff)
downloadpkgsrc-e70ddc19a35bcee052c60e54534cc661d989b298.tar.gz
Move _ZERO_FILESIZE_P ftom bsd.pkginstall.mk to bsd.pkg.mk so it can more
clearly be used in other modules.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 6e4f9c2d1d4..124c85d2e85 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1844 2006/06/07 17:00:03 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1845 2006/06/07 17:44:29 jlam Exp $
#
# This file is in the public domain.
#
@@ -284,6 +284,11 @@ 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= ${AWK} 'END { exit NR ? 1 : 0; }'
+
# Automatically increase process limit where necessary for building.
_ULIMIT_CMD= ${UNLIMIT_RESOURCES:@_lim_@${ULIMIT_CMD_${_lim_}};@}