summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrh <rh>2000-10-22 08:22:24 +0000
committerrh <rh>2000-10-22 08:22:24 +0000
commit213d4cabdc0ac7ebc204999dceaa8a840793c218 (patch)
tree6fa2bef04c683fa7c65087a94c497568e41693dd /mk
parent6cd360b0b8e66d99a3795170c492ae8119eac69d (diff)
downloadpkgsrc-213d4cabdc0ac7ebc204999dceaa8a840793c218.tar.gz
Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. This
allows the user to set DEPENDS_TARGET=update, which will now automatically update all outdated prerequisite packages.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk22
1 files changed, 18 insertions, 4 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 6b83e573526..a46e84f86df 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.589 2000/10/19 02:30:05 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.590 2000/10/22 08:22:24 rh Exp $
#
# This file is in the public domain.
#
@@ -1099,12 +1099,24 @@ all: build
.if make(package)
DEPENDS_TARGET= package
.elif make(update)
-DEPENDS_TARGET= install
+DEPENDS_TARGET= update
.else
DEPENDS_TARGET= reinstall
.endif
.endif
+.if !defined(UPDATE_TARGET)
+.if ${DEPENDS_TARGET} == "update"
+.if make(package)
+UPDATE_TARGET= package
+.else
+UPDATE_TARGET= install
+.endif
+.else
+UPDATE_TARGET= ${DEPENDS_TARGET}
+.endif
+.endif
+
################################################################
# The following are used to create easy dummy targets for
# disabling some bit of default target behavior you don't want.
@@ -2061,7 +2073,8 @@ update:
${MAKE} ${MAKEFLAGS} deinstall DEINSTALLDEPENDS=ALL
.endif
${_PKG_SILENT}${_PKG_DEBUG} \
- ${MAKE} ${MAKEFLAGS} ${DEPENDS_TARGET} KEEP_WRKDIR=YES
+ ${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} KEEP_WRKDIR=YES \
+ DEPENDS_TARGET=${DEPENDS_TARGET}
${_PKG_SILENT}${_PKG_DEBUG} \
[ ! -s ${DDIR} ] || for dep in `${CAT} ${DDIR}` ; do \
(if cd ../.. && cd "$${dep}" ; then \
@@ -2070,7 +2083,8 @@ update:
"${REINSTALL}" != "NO" ] ; then \
${MAKE} ${MAKEFLAGS} deinstall; \
fi && \
- ${MAKE} ${MAKEFLAGS} ${DEPENDS_TARGET}; \
+ ${MAKE} ${MAKEFLAGS} ${UPDATE_TARGET} \
+ DEPENDS_TARGET=${DEPENDS_TARGET} ; \
else \
${ECHO_MSG} "${_PKGSRC_IN}> Skipping removed directory $${dep}";\
fi) ; \