summaryrefslogtreecommitdiff
path: root/mk/install/replace.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-06-05 17:41:11 +0000
committerjlam <jlam@pkgsrc.org>2006-06-05 17:41:11 +0000
commite3f0f1869fab80b87a12c5819925281415699ee2 (patch)
treecb985f3cb407fad54efc46217099126b1955727d /mk/install/replace.mk
parentdeab97f9bd12ef89e434ec6d19998ca0b57021ae (diff)
downloadpkgsrc-e3f0f1869fab80b87a12c5819925281415699ee2.tar.gz
Allow overrides of the public targets, e.g. "install", "package", etc.
if PKG_SKIP_REASON or PKG_FAIL_REASON is defined. This commit adds !target(...) guards around those target definitions to avoid "duplicate target definition" warnings.
Diffstat (limited to 'mk/install/replace.mk')
-rw-r--r--mk/install/replace.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/install/replace.mk b/mk/install/replace.mk
index 76aaa977258..843a5c84842 100644
--- a/mk/install/replace.mk
+++ b/mk/install/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.2 2006/06/05 17:21:55 jlam Exp $
+# $NetBSD: replace.mk,v 1.3 2006/06/05 17:41:11 jlam Exp $
######################################################################
### replace (PUBLIC)
@@ -11,7 +11,9 @@ _REPLACE_TARGETS+= replace-message
_REPLACE_TARGETS+= unprivileged-install-hook
.PHONY: replace su-replace
+.if !target(replace)
replace: ${_REPLACE_TARGETS} su-target
+.endif
replace-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Replacing for ${PKGNAME}"
@@ -27,7 +29,9 @@ MAKEFLAGS.su-replace= _UPDATE_RUNNING=yes
### "replace" target. It will acquire elevated privileges just-in-time.
###
.PHONY: undo-replace su-undo-replace
+.if !target(undo-replace)
undo-replace: undo-replace-message su-target
+.endif
undo-replace-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Undoing replacement for ${PKGNAME}"