From 377d2c27f2e649f829149d7be80f30912ab95d71 Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 7 Jun 2006 17:44:29 +0000 Subject: Move _ZERO_FILESIZE_P ftom bsd.pkginstall.mk to bsd.pkg.mk so it can more clearly be used in other modules. --- mk/bsd.pkg.mk | 7 ++++++- mk/pkginstall/bsd.pkginstall.mk | 7 +------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'mk') 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_}};@} diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk index b2c48836178..0d81f898211 100644 --- a/mk/pkginstall/bsd.pkginstall.mk +++ b/mk/pkginstall/bsd.pkginstall.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkginstall.mk,v 1.6 2006/06/06 19:49:52 jlam Exp $ +# $NetBSD: bsd.pkginstall.mk,v 1.7 2006/06/07 17:44:29 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and implements the # common INSTALL/DEINSTALL scripts framework. To use the pkginstall @@ -20,11 +20,6 @@ _FUNC_STRIP_PREFIX= \ }' s="$$1" prefix=${PREFIX:Q}/ /dev/null; \ } -# This is a command that exits with a zero status if the given file -# is zero-length. -# -_ZERO_FILESIZE_P= ${AWK} 'END { exit NR ? 1 : 0; }' - _PKGINSTALL_DIR= ${WRKDIR}/.pkginstall # XXX This should not be duplicated from the install module, but we -- cgit v1.2.3