diff options
author | joerg <joerg@pkgsrc.org> | 2010-02-24 22:53:34 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2010-02-24 22:53:34 +0000 |
commit | 5eb3c784ff950142b9ffc13b2a61e50aeff310e4 (patch) | |
tree | 6e85c1dd199239b764aebeb9c0afdc61ed2f167c /mk/install | |
parent | f2f638cca8f0018ba376bf288c57536107a6eda5 (diff) | |
download | pkgsrc-5eb3c784ff950142b9ffc13b2a61e50aeff310e4.tar.gz |
Rename the install phase to stage-install. Introduce a new install
target that defaults to either stage-install or package-install,
depending on whether DESTDIR support is active and supported by the
package or not.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/bsd.install.mk | 30 | ||||
-rw-r--r-- | mk/install/install.mk | 18 |
2 files changed, 32 insertions, 16 deletions
diff --git a/mk/install/bsd.install.mk b/mk/install/bsd.install.mk index 7c92902d76d..2486c5da14e 100644 --- a/mk/install/bsd.install.mk +++ b/mk/install/bsd.install.mk @@ -1,11 +1,11 @@ -# $NetBSD: bsd.install.mk,v 1.12 2008/01/04 01:46:27 rillig Exp $ +# $NetBSD: bsd.install.mk,v 1.13 2010/02/24 22:53:34 joerg Exp $ # # This Makefile fragment is included by bsd.pkg.mk and provides all # variables and targets related to installing packages. # # The following are the "public" targets provided this module: # -# install, deinstall, reinstall, replace, undo-replace +# install, stage-install, deinstall, reinstall, replace, undo-replace # # The following targets may be overridden in a package Makefile: # @@ -17,19 +17,35 @@ _COOKIE.install= ${WRKDIR}/.install_done ###################################################################### ### install (PUBLIC) ###################################################################### -### install is a public target to install the package. +### install is a public target to install the package either by +### depending on stage-install (_USE_DESTDIR=no) or package-install +### (_USE_DESTDIR!=no). ### .PHONY: install +.if ${_USE_DESTDIR} == "no" +install: stage-install +.else +install: package-install +.endif + +###################################################################### +### stage-install (PUBLIC) +###################################################################### +### stage-install is a public target to install the package to +### ${PREFIX} (_USE_DESTDIR=no) or to ${DESTDIR}${PREFIX} +### (_USE_DESTDIR!=no) +### +.PHONY: stage-install .if !defined(NO_INSTALL) . include "install.mk" -.elif !target(install) +.else . if exists(${_COOKIE.install}) -install: +stage-install: @${DO_NADA} . elif defined(_PKGSRC_BARRIER) -install: ${_PKGSRC_BUILD_TARGETS} install-cookie +stage-install: ${_PKGSRC_BUILD_TARGETS} install-cookie . else -install: barrier +stage-install: barrier . endif .endif diff --git a/mk/install/install.mk b/mk/install/install.mk index 146fdab105e..978ee07df66 100644 --- a/mk/install/install.mk +++ b/mk/install/install.mk @@ -1,11 +1,11 @@ -# $NetBSD: install.mk,v 1.57 2009/10/06 13:34:53 joerg Exp $ +# $NetBSD: install.mk,v 1.58 2010/02/24 22:53:34 joerg Exp $ # # This file provides the code for the "install" phase. # # Public targets: # -# install: -# Installs the package files into LOCALBASE. +# stage-install: +# Installs the package files into LOCALBASE or ${DESTDIR}${LOCALBASE}. # # Interface for other infrastructure components: @@ -62,15 +62,15 @@ _INSTALL_TARGETS+= acquire-install-lock _INSTALL_TARGETS+= ${_COOKIE.install} _INSTALL_TARGETS+= release-install-lock -.PHONY: install -.if !target(install) +.PHONY: stage-install +.if !target(stage-install) . if exists(${_COOKIE.install}) -install: +stage-install: @${DO_NADA} . elif defined(_PKGSRC_BARRIER) -install: ${_INSTALL_TARGETS} +stage-install: ${_INSTALL_TARGETS} . else -install: barrier +stage-install: barrier . endif .endif @@ -94,7 +94,7 @@ ${_COOKIE.install}: real-install _REAL_INSTALL_TARGETS+= install-check-interactive _REAL_INSTALL_TARGETS+= install-check-version _REAL_INSTALL_TARGETS+= install-message -_REAL_INSTALL_TARGETS+= install-vars +_REAL_INSTALL_TARGETS+= stage-install-vars _REAL_INSTALL_TARGETS+= unprivileged-install-hook _REAL_INSTALL_TARGETS+= install-all _REAL_INSTALL_TARGETS+= install-cookie |