summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoragc <agc>2014-12-06 23:28:18 +0000
committeragc <agc>2014-12-06 23:28:18 +0000
commit2749d2b55d582dd1ce1d60c0c53744c90c132800 (patch)
treee86ab408005cca44835c5061c73c1f0abc353165 /mk
parentc6ae3ba3845293b63ba9cefe451dae14da62154d (diff)
downloadpkgsrc-2749d2b55d582dd1ce1d60c0c53744c90c132800.tar.gz
Add a new definition, PKGSRC_KEEP_BIN_PKGS, which defaults to "no".
This definition controls whether the binary package which is built during package installation will be copied to pkgsrc/packages/All. To retain binary packages in pkgsrc/packages/All, set PKGSRC_KEEP_BIN_PKGS=yes in environment or MAKECONF. If this is not set, binary packages will not be preserved after their WRKDIR is removed. This may not be what you want. To preserve the status quo since 2013/05/22, and just delete the binary package after it's built, the default for PKGSRC_KEEP_BIN_PKGS is "no", or it can be explicitly set. As reviewed on tech-pkg.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk10
-rw-r--r--mk/install/bsd.install.mk6
-rw-r--r--mk/install/replace.mk6
3 files changed, 17 insertions, 5 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index d87df1fbf5a..bfdd1e93f16 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.350 2014/11/29 06:03:02 obache Exp $
+# $NetBSD: bsd.prefs.mk,v 1.351 2014/12/06 23:28:18 agc Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -525,6 +525,14 @@ _MAKE_INSTALL_AS_ROOT= no
DESTDIR=
.endif
+# controls whether binary packages are preserved in pkgsrc/packages/All
+# default is no (to preserve settings since 2013/05/23, prior to that it
+# was yes)
+_KEEP_BIN_PKGS?= no
+.if !empty(PKGSRC_KEEP_BIN_PKGS:M[Yy][Ee][Ss])
+_KEEP_BIN_PKGS= yes
+.endif
+
_MAKE_CLEAN_AS_ROOT?= no
# Whether to run the clean target as root.
_MAKE_INSTALL_AS_ROOT?= yes
diff --git a/mk/install/bsd.install.mk b/mk/install/bsd.install.mk
index 014f2f65e25..21a7790e37b 100644
--- a/mk/install/bsd.install.mk
+++ b/mk/install/bsd.install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install.mk,v 1.14 2013/05/23 13:18:56 obache Exp $
+# $NetBSD: bsd.install.mk,v 1.15 2014/12/06 23:28:18 agc Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and provides all
# variables and targets related to installing packages.
@@ -24,8 +24,10 @@ _COOKIE.install= ${WRKDIR}/.install_done
.PHONY: install
.if ${_USE_DESTDIR} == "no"
install: stage-install
-.else
+.elif ${_KEEP_BIN_PKGS} == "no"
install: stage-package-install
+.else
+install: package-install
.endif
######################################################################
diff --git a/mk/install/replace.mk b/mk/install/replace.mk
index 41a1ab6c929..308a578d69f 100644
--- a/mk/install/replace.mk
+++ b/mk/install/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.15 2013/05/23 13:18:56 obache Exp $
+# $NetBSD: replace.mk,v 1.16 2014/12/06 23:28:18 agc Exp $
#
# Public targets:
#
@@ -27,8 +27,10 @@
.if ${_USE_DESTDIR} == "no"
_REPLACE_TARGETS+= ${_PKGSRC_BUILD_TARGETS}
-.else
+.elif ${_KEEP_BIN_PKGS} == "no"
_REPLACE_TARGETS+= stage-package-create
+.else
+_REPLACE_TARGETS+= package
.endif
_REPLACE_TARGETS+= replace-message
_REPLACE_TARGETS+= unprivileged-install-hook