pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Due to the special handling of pkgtools/digest in p...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5f7db4f46286
branches: trunk
changeset: 471223:5f7db4f46286
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Mar 22 04:07:15 2004 +0000
description:
Due to the special handling of pkgtools/digest in pkgsrc (it must be
installed before the normal dependency checks), on a system without
any packages installed, we can run into the problem where digest won't
install because it has already been installed as part of installing
a build dependency. This can happen if, e.g., PKGSRC_COMPILER is set
to "ccache gcc", and you try to build devel/gmake.
Change the way that the uptodate-digest target installs pkgtools/digest
by ensuring that pkgtools/digest is deinstalled just before installing
it.
diffstat:
mk/bsd.pkg.mk | 29 ++++++++++++++++++-----------
1 files changed, 18 insertions(+), 11 deletions(-)
diffs (64 lines):
diff -r c5d18d46a709 -r 5f7db4f46286 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Mon Mar 22 03:58:00 2004 +0000
+++ b/mk/bsd.pkg.mk Mon Mar 22 04:07:15 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1425 2004/03/19 00:03:55 danw Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1426 2004/03/22 04:07:15 jlam Exp $
#
# This file is in the public domain.
#
@@ -763,6 +763,17 @@
MESSAGE_SUBST_SED= ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/}
.endif
+# If pkgsrc is supposed to ensure that tests are run before installation
+# of the package, then the build targets should be "build test", otherwise
+# just "build" suffices. _PKGSRC_BUILD_TARGETS is used in the "all",
+# "install", and "uptodate-digest" targets.
+#
+.if !empty(PKGSRC_RUN_TEST:M[yY][eE][sS])
+_PKGSRC_BUILD_TARGETS= build test
+.else
+_PKGSRC_BUILD_TARGETS= build
+.endif
+
# Latest version of digest(1) required for pkgsrc
DIGEST_REQD= 20010302
@@ -778,6 +789,10 @@
if [ -f ${DIGEST} ]; then \
${MAKE} ${MAKEFLAGS} deinstall; \
fi; \
+ ${MAKE} ${MAKEFLAGS} ${_PKGSRC_BUILD_TARGETS}; \
+ if [ -f ${DIGEST} ]; then \
+ ${MAKE} ${MAKEFLAGS} deinstall; \
+ fi; \
${MAKE} ${MAKEFLAGS} ${DEPENDS_TARGET}; \
${MAKE} ${MAKEFLAGS} clean; } \
fi
@@ -1520,11 +1535,7 @@
.PHONY: all
.if !target(all)
-. if ${PKGSRC_RUN_TEST} == "YES" || ${PKGSRC_RUN_TEST} == "yes"
-all: test
-. else
-all: build
-. endif
+all: ${_PKGSRC_BUILD_TARGETS}
.endif
.if !defined(DEPENDS_TARGET)
@@ -3190,11 +3201,7 @@
.PHONY: install
.if !target(install)
-. if ${PKGSRC_RUN_TEST} == "YES" || ${PKGSRC_RUN_TEST} == "yes"
-install: uptodate-pkgtools build test ${INSTALL_COOKIE}
-. else
-install: uptodate-pkgtools build ${INSTALL_COOKIE}
-. endif
+install: uptodate-pkgtools ${_PKGSRC_BUILD_TARGETS} ${INSTALL_COOKIE}
.endif
.PHONY: package
Home |
Main Index |
Thread Index |
Old Index