summaryrefslogtreecommitdiff
path: root/mk/package
diff options
context:
space:
mode:
authorjoerg <joerg>2010-03-08 13:51:24 +0000
committerjoerg <joerg>2010-03-08 13:51:24 +0000
commit5b4d74801c9f34b401b7afe94fc0da2c32b062e3 (patch)
treef48a0409c7fddcfec77c9bd5105a7a1d33e94509 /mk/package
parent1755d3820211d41c82b77a61228f1b85fd3a5a85 (diff)
downloadpkgsrc-5b4d74801c9f34b401b7afe94fc0da2c32b062e3.tar.gz
Add a new package-clean target to remove the binary package again.
Diffstat (limited to 'mk/package')
-rw-r--r--mk/package/bsd.package.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/mk/package/bsd.package.mk b/mk/package/bsd.package.mk
index d1c68327081..57b7868cdeb 100644
--- a/mk/package/bsd.package.mk
+++ b/mk/package/bsd.package.mk
@@ -1,11 +1,11 @@
-# $NetBSD: bsd.package.mk,v 1.13 2010/02/25 01:03:44 joerg Exp $
+# $NetBSD: bsd.package.mk,v 1.14 2010/03/08 13:51:24 joerg Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and provides all
# variables and targets related to binary packages.
#
# The following are the "public" targets provided by this module:
#
-# package, repackage
+# package, repackage, package-clean
_COOKIE.package= ${WRKDIR}/.package_done
@@ -28,6 +28,18 @@ repackage: package-eat-cookie package
.endif
######################################################################
+### package-clean (PUBLIC)
+######################################################################
+### package-clean removes the binary package that has been created
+### by the "package" phase.
+### Also remove the cookie, so that the "package" target can be
+### invoked again.
+###
+.PHONY: package-clean
+package-clean: package-eat-cookie
+ ${RUN} ${RM} -f ${PKGFILE}
+
+######################################################################
### package-eat-cookie (PRIVATE)
######################################################################
### package-eat-cookie removes the state files associated with the "package"