summaryrefslogtreecommitdiff
path: root/mk/checksum
diff options
context:
space:
mode:
authorjlam <jlam>2006-07-13 18:40:33 +0000
committerjlam <jlam>2006-07-13 18:40:33 +0000
commitbaf6b354ca63da511224d6d2e18baba32fedad07 (patch)
treeaf0eeecdcc01c3fb8ed2fc33a2ce704ab28d6903 /mk/checksum
parent31a022b4d623ad20ae4eac4b248779aa9490e81b (diff)
downloadpkgsrc-baf6b354ca63da511224d6d2e18baba32fedad07.tar.gz
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 (limited to 'mk/checksum')
-rw-r--r--mk/checksum/checksum.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/mk/checksum/checksum.mk b/mk/checksum/checksum.mk
index 6215738d5e6..c215afd9ba4 100644
--- a/mk/checksum/checksum.mk
+++ b/mk/checksum/checksum.mk
@@ -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 @@ _CHECKSUM_CMD= \
${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 @@ checksum: fetch
${ERROR_MSG} "\"${MAKE} NO_CHECKSUM=yes [other args]\"."; \
exit 1; \
fi
-.endfor
+. endfor
+.endif
######################################################################
### makesum (PUBLIC)