diff options
author | obache <obache@pkgsrc.org> | 2011-03-21 04:52:18 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-03-21 04:52:18 +0000 |
commit | fd13e7fd193a62bdfbc5040d5b3060a93794232c (patch) | |
tree | fcf2e94bdf2eb9e02b86f9693f65e250291973d3 /mk/install | |
parent | 164e8f47022f02fb61642aa58961a2feb5ebc286 (diff) | |
download | pkgsrc-fd13e7fd193a62bdfbc5040d5b3060a93794232c.tar.gz |
Introduce DESTDIR_VARNAME package-settable variable.
A variable name that should be set as staged installation location
presented as ${DESTDIR} at installation phase.
"DESTDIR" is set by default.
for packages using different variable for staged installation prefix,
and/or using DESTDIR variable for different purpose.
Diffstat (limited to 'mk/install')
-rw-r--r-- | mk/install/install.mk | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mk/install/install.mk b/mk/install/install.mk index fd14d25baf4..13b43c6c39e 100644 --- a/mk/install/install.mk +++ b/mk/install/install.mk @@ -1,4 +1,4 @@ -# $NetBSD: install.mk,v 1.59 2010/02/25 01:03:44 joerg Exp $ +# $NetBSD: install.mk,v 1.60 2011/03/21 04:52:18 obache Exp $ # # This file provides the code for the "install" phase. # @@ -49,6 +49,10 @@ # When this variable is set to "yes", all directories mentioned # in the PLIST files will be created like in INSTALLATION_DIRS. # +# DESTDIR_VARNAME +# A variable name that should be set as staged installation location +# presented as ${DESTDIR} at install phase. +# "DESTDIR" is set by default. ###################################################################### ### install (PUBLIC) @@ -307,9 +311,10 @@ install-dirs-from-PLIST: INSTALL_DIRS?= ${BUILD_DIRS} INSTALL_MAKE_FLAGS?= # none INSTALL_TARGET?= install ${USE_IMAKE:D${NO_INSTALL_MANPAGES:D:Uinstall.man}} -.if ${_USE_DESTDIR} != "no" -INSTALL_ENV+= DESTDIR=${DESTDIR:Q} -INSTALL_MAKE_FLAGS+= DESTDIR=${DESTDIR:Q} +DESTDIR_VARNAME?= "DESTDIR" +.if ${_USE_DESTDIR} != "no" && !empty(DESTDIR_VARNAME) +INSTALL_ENV+= ${DESTDIR_VARNAME}=${DESTDIR:Q} +INSTALL_MAKE_FLAGS+= ${DESTDIR_VARNAME}=${DESTDIR:Q} .endif .if !target(do-install) |