pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/checksum Check whether the checksum target is defin...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dc5ac3170d29
branches:  trunk
changeset: 516079:dc5ac3170d29
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Jul 13 18:40:33 2006 +0000

description:
Check whether the checksum target is defined before defining one.
This fixes problems where a package sets PKG_*_REASON, which causes
bsd.pkg.mk to define its own "checksum" replacement, which causes a
"duplicate script" make error to occur.

diffstat:

 mk/checksum/checksum.mk |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a4e30db681e6 -r dc5ac3170d29 mk/checksum/checksum.mk
--- a/mk/checksum/checksum.mk   Thu Jul 13 18:23:14 2006 +0000
+++ b/mk/checksum/checksum.mk   Thu Jul 13 18:40:33 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: checksum.mk,v 1.1 2006/07/13 14:02:34 jlam Exp $
+# $NetBSD: checksum.mk,v 1.2 2006/07/13 18:40:33 jlam Exp $
 
 _DIGEST_ALGORITHMS?=           SHA1 RMD160
 _PATCH_DIGEST_ALGORITHMS?=     SHA1
@@ -19,8 +19,9 @@
        ${SH} ${PKGSRCDIR}/mk/checksum/checksum                         \
 
 .PHONY: checksum
+.if !target(checksum)
 checksum: fetch
-.for _alg_ in ${_DIGEST_ALGORITHMS}
+.  for _alg_ in ${_DIGEST_ALGORITHMS}
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        if cd ${DISTDIR} && ${_CHECKSUM_CMD} -a ${_alg_:Q}              \
                ${DISTINFO_FILE} ${_CKSUMFILES}; then                   \
@@ -31,7 +32,8 @@
                ${ERROR_MSG} "\"${MAKE} NO_CHECKSUM=yes [other args]\"."; \
                exit 1;                                                 \
        fi
-.endfor
+.  endfor
+.endif
 
 ######################################################################
 ### makesum (PUBLIC)



Home | Main Index | Thread Index | Old Index