summaryrefslogtreecommitdiff
path: root/mk/package/package.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-07-06 22:08:32 +0000
committerjlam <jlam@pkgsrc.org>2006-07-06 22:08:32 +0000
commite6fa682ce011632ee78a2e1f06ddac9b767f938e (patch)
tree607fe264a55f0893e0b68c2a4bee1da930fb64d3 /mk/package/package.mk
parent9bb51b2c0eebd8e62d7b7ff400dd707052593f67 (diff)
downloadpkgsrc-e6fa682ce011632ee78a2e1f06ddac9b767f938e.tar.gz
The "replace" target does conceptually the same thing as the "install"
target in that it installs the currently-built software into the filesystem. In that case where "replace" is specified as a target on the command line, make "replace" and not "install" be the source target for "package". Also, place the "replace" target between the "install" and "package" targets in _BARRIER_POST_TARGETS as it should be legal to do those steps in that order (but not in another order). These changes make the following work: make replace package In this example, the currently installed package will be replaced and the newly-installed software will be packaged, all within the same make process.
Diffstat (limited to 'mk/package/package.mk')
-rw-r--r--mk/package/package.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/package/package.mk b/mk/package/package.mk
index 204fc7b1599..5a70008711c 100644
--- a/mk/package/package.mk
+++ b/mk/package/package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.11 2006/07/05 22:21:03 jlam Exp $
+# $NetBSD: package.mk,v 1.12 2006/07/06 22:08:32 jlam Exp $
######################################################################
### package (PUBLIC)
@@ -7,7 +7,11 @@
### acquire elevated privileges just-in-time.
###
_PACKAGE_TARGETS+= check-vulnerable
+.if make(replace)
+_PACKAGE_TARGETS+= replace
+.else
_PACKAGE_TARGETS+= install
+.endif
_PACKAGE_TARGETS+= acquire-package-lock
_PACKAGE_TARGETS+= ${_PACKAGE_COOKIE}
_PACKAGE_TARGETS+= release-package-lock