diff options
author | jlam <jlam@pkgsrc.org> | 2006-06-05 17:41:11 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-06-05 17:41:11 +0000 |
commit | e3f0f1869fab80b87a12c5819925281415699ee2 (patch) | |
tree | cb985f3cb407fad54efc46217099126b1955727d /mk/package | |
parent | deab97f9bd12ef89e434ec6d19998ca0b57021ae (diff) | |
download | pkgsrc-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/package')
-rw-r--r-- | mk/package/bsd.package.mk | 10 | ||||
-rw-r--r-- | mk/package/package.mk | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/mk/package/bsd.package.mk b/mk/package/bsd.package.mk index d37a9433dc8..6d631010daf 100644 --- a/mk/package/bsd.package.mk +++ b/mk/package/bsd.package.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.package.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $ +# $NetBSD: bsd.package.mk,v 1.2 2006/06/05 17:41:11 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and provides all # variables and targets related to binary packages. @@ -17,11 +17,13 @@ _PACKAGE_COOKIE= ${WRKDIR}/.package_done ### .if defined(NO_PACKAGE) .PHONY: package +. if !target(package) package: install -. if defined(SKIP_SILENT) +. if defined(SKIP_SILENT) @${DO_NADA} -. else +. else @${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} may not be packaged: "${NO_PACKAGE:Q}"." +. endif . endif .else . include "${PKGSRCDIR}/mk/package/package.mk" @@ -33,7 +35,9 @@ package: install ### repackage is a special target to re-run the package target. ### .PHONY: repackage +.if !target(repackage) repackage: package-clean package +.endif ###################################################################### ### package-clean (PRIVATE) diff --git a/mk/package/package.mk b/mk/package/package.mk index 58617b7eef8..b22a77eefe1 100644 --- a/mk/package/package.mk +++ b/mk/package/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.1 2006/06/03 23:11:42 jlam Exp $ +# $NetBSD: package.mk,v 1.2 2006/06/05 17:41:11 jlam Exp $ _PACKAGE_COOKIE= ${WRKDIR}/.package_done @@ -14,7 +14,9 @@ _PACKAGE_TARGETS+= ${_PACKAGE_COOKIE} _PACKAGE_TARGETS+= release-package-lock .PHONY: package +.if !target(package) package: ${_PACKAGE_TARGETS} +.endif .PHONY: acquire-package-lock release-package-lock acquire-package-lock: acquire-lock |