pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Rename the install phase to stage-install. Introduc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7ab8a44be031
branches:  trunk
changeset: 572374:7ab8a44be031
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Feb 24 22:53:34 2010 +0000

description:
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:

 mk/bsd.makevars.mk        |   6 +++---
 mk/bsd.pkg.barrier.mk     |   5 +++--
 mk/help/destdir.help      |   4 ++--
 mk/install/bsd.install.mk |  30 +++++++++++++++++++++++-------
 mk/install/install.mk     |  18 +++++++++---------
 mk/package/package.mk     |   4 ++--
 6 files changed, 42 insertions(+), 25 deletions(-)

diffs (186 lines):

diff -r efd74c8658bf -r 7ab8a44be031 mk/bsd.makevars.mk
--- a/mk/bsd.makevars.mk        Wed Feb 24 22:51:37 2010 +0000
+++ b/mk/bsd.makevars.mk        Wed Feb 24 22:53:34 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.makevars.mk,v 1.4 2006/07/10 22:59:27 jlam Exp $
+# $NetBSD: bsd.makevars.mk,v 1.5 2010/02/24 22:53:34 joerg Exp $
 #
 # This Makefile fragment is included by bsd.prefs.mk to set all of
 # the variables saved through MAKEVARS.  Typical usage is:
@@ -20,8 +20,8 @@
 #
 
 _ALL_PHASES=           fetch tools extract patch                       \
-                       wrapper configure build install package
-_REV_ALL_PHASES=       package install build configure wrapper         \
+                       wrapper configure build stage-install package
+_REV_ALL_PHASES=       package stage-install build configure wrapper   \
                        patch extract tools fetch
 
 # Try including the *.makevars.mk files in reverse order so that the
diff -r efd74c8658bf -r 7ab8a44be031 mk/bsd.pkg.barrier.mk
--- a/mk/bsd.pkg.barrier.mk     Wed Feb 24 22:51:37 2010 +0000
+++ b/mk/bsd.pkg.barrier.mk     Wed Feb 24 22:53:34 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.barrier.mk,v 1.17 2009/05/16 01:27:30 joerg Exp $
+# $NetBSD: bsd.pkg.barrier.mk,v 1.18 2010/02/24 22:53:34 joerg Exp $
 
 _COOKIE.barrier=       ${WRKDIR}/.barrier_cookie
 
@@ -22,12 +22,13 @@
 _BARRIER_POST_TARGETS+=        build build-env
 _BARRIER_POST_TARGETS+=        test
 _BARRIER_POST_TARGETS+=        all
-_BARRIER_POST_TARGETS+=        install
+_BARRIER_POST_TARGETS+=        stage-install
 _BARRIER_POST_TARGETS+=        reinstall
 _BARRIER_POST_TARGETS+=        replace
 _BARRIER_POST_TARGETS+=        package
 _BARRIER_POST_TARGETS+=        repackage
 _BARRIER_POST_TARGETS+=        package-install
+_BARRIER_POST_TARGETS+=        install
 
 .for _target_ in ${_BARRIER_POST_TARGETS}
 .  if make(${_target_})
diff -r efd74c8658bf -r 7ab8a44be031 mk/help/destdir.help
--- a/mk/help/destdir.help      Wed Feb 24 22:51:37 2010 +0000
+++ b/mk/help/destdir.help      Wed Feb 24 22:53:34 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: destdir.help,v 1.4 2009/05/09 14:59:08 joerg Exp $
+# $NetBSD: destdir.help,v 1.5 2010/02/24 22:53:34 joerg Exp $
 #
 # ===
 # Warning: This file is still under construction. Don't rely on it.
@@ -40,7 +40,7 @@
 #
 # === Implementation notes ===
 #
-# In the "install" phase, the variable DESTDIR is set in the make(1)
+# In the "stage-install" phase, the variable DESTDIR is set in the make(1)
 # environment of the default "do-install" target. Additionally, the
 # variable is passed in the INSTALL_MAKE_FLAGS to override potential
 # "DESTDIR=" entries in the Makefiles.
diff -r efd74c8658bf -r 7ab8a44be031 mk/install/bsd.install.mk
--- a/mk/install/bsd.install.mk Wed Feb 24 22:51:37 2010 +0000
+++ b/mk/install/bsd.install.mk Wed Feb 24 22:53:34 2010 +0000
@@ -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 @@
 ######################################################################
 ### 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 -r efd74c8658bf -r 7ab8a44be031 mk/install/install.mk
--- a/mk/install/install.mk     Wed Feb 24 22:51:37 2010 +0000
+++ b/mk/install/install.mk     Wed Feb 24 22:53:34 2010 +0000
@@ -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+=     ${_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 @@
 _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
diff -r efd74c8658bf -r 7ab8a44be031 mk/package/package.mk
--- a/mk/package/package.mk     Wed Feb 24 22:51:37 2010 +0000
+++ b/mk/package/package.mk     Wed Feb 24 22:53:34 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.21 2009/06/09 08:40:28 joerg Exp $
+# $NetBSD: package.mk,v 1.22 2010/02/24 22:53:34 joerg Exp $
 #
 # This file provides the code for the "package" phase.
 #
@@ -16,7 +16,7 @@
 .if make(replace) && ${_USE_DESTDIR} == "no"
 _PACKAGE_TARGETS+=     replace
 .else
-_PACKAGE_TARGETS+=     install
+_PACKAGE_TARGETS+=     stage-install
 .endif
 _PACKAGE_TARGETS+=     acquire-package-lock
 _PACKAGE_TARGETS+=     ${_COOKIE.package}



Home | Main Index | Thread Index | Old Index