From d7d4e5e79a7563cd53abadcea23c3767322ccbbc Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 23 Oct 2006 14:33:01 +0000 Subject: [PATCH] generic BULK_DO fragment that can do anything, invoked right before clean. can be used to run targets that may fail without impacting further stuff, or to collect stats on anything. For instance BULK_DO= mkdir -p ${PORTSDIR}/config/${FULLPKGPATH}; \ cp -f ${WRKBUILD}/config.{log,status} ${PORTSDIR}/config/${FULLPKGPATH} || true; \ cd ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all && perl ${PORTSDIR}/infrastructure/package/check-modes ${PKGNAMES} || true --- infrastructure/mk/bsd.port.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/infrastructure/mk/bsd.port.mk b/infrastructure/mk/bsd.port.mk index dda107ebd10..1dcc15828bc 100644 --- a/infrastructure/mk/bsd.port.mk +++ b/infrastructure/mk/bsd.port.mk @@ -1,6 +1,6 @@ #-*- mode: Makefile; tab-width: 4; -*- # ex:ts=4 sw=4 filetype=make: -# $OpenBSD: bsd.port.mk,v 1.790 2006/10/23 13:42:50 espie Exp $ +# $OpenBSD: bsd.port.mk,v 1.791 2006/10/23 14:33:01 espie Exp $ # $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $ # $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $ # @@ -77,6 +77,7 @@ RECURSIVE_FETCH_LIST?= Yes WRKOBJDIR?= FAKEOBJDIR?= BULK_TARGETS?= +BULK_DO?= FORCE_UPDATE?=No PKGNAMES=${FULLPKGNAME} # All variables relevant to the port's description @@ -135,6 +136,7 @@ WRKOBJDIR_${PKGPATH}?= ${WRKOBJDIR} FAKEOBJDIR_${PKGPATH}?= ${FAKEOBJDIR} BULK_${PKGPATH}?= ${BULK} BULK_TARGETS_${PKGPATH}?= ${BULK_TARGETS} +BULK_DO_${PKGPATH}?= ${BULK_DO} CLEANDEPENDS_${PKGPATH}?= ${CLEANDEPENDS} # Commands and command settings. @@ -1771,6 +1773,9 @@ ${_BULK_COOKIE}: @${ECHO_MSG} "===> Running ${_i}" @cd ${.CURDIR} && exec ${MAKE} ${_i} ${BULK_FLAGS} .endfor +.if !empty(BULK_DO_${PKGPATH}) + @${BULK_DO_${PKGPATH}} +.endif @cd ${.CURDIR} && exec ${SUDO} ${MAKE} _internal-clean @${_MAKE_COOKIE} $@