diff options
author | rillig <rillig@pkgsrc.org> | 2007-03-07 01:06:11 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-03-07 01:06:11 +0000 |
commit | aaec60bbdb492ba573ad028884673fcc74fa456d (patch) | |
tree | f152fbc59d1478a0c8c848eab6122cb3e975492d /mk/checksum | |
parent | fb5cf662be888db6f7dbeca7e30ec61a60d909dc (diff) | |
download | pkgsrc-aaec60bbdb492ba573ad028884673fcc74fa456d.tar.gz |
Removed many redundant comments and restructured the code, so that it
becomes a little shorter.
Diffstat (limited to 'mk/checksum')
-rw-r--r-- | mk/checksum/bsd.checksum.mk | 68 | ||||
-rw-r--r-- | mk/checksum/checksum.mk | 34 |
2 files changed, 41 insertions, 61 deletions
diff --git a/mk/checksum/bsd.checksum.mk b/mk/checksum/bsd.checksum.mk index 32b540e102d..7f142406197 100644 --- a/mk/checksum/bsd.checksum.mk +++ b/mk/checksum/bsd.checksum.mk @@ -1,47 +1,45 @@ -# $NetBSD: bsd.checksum.mk,v 1.4 2006/09/19 00:03:44 rillig Exp $ +# $NetBSD: bsd.checksum.mk,v 1.5 2007/03/07 01:06:11 rillig Exp $ # # This Makefile fragment is included by bsd.pkg.mk and defines the # relevant variables and targets for the "checksum" phase. # -# The following are the "public" targets provided by this module: +# Public targets for pkgsrc users: # -# checksum, makesum, makepatchsum, distinfo +# checksum: +# Check that the distfiles have the correct checksums. If they +# aren't yet fetched, fetch them. +# +# Public targets for pkgsrc developers: +# +# makesum: +# Add or update the checksums of the distfiles to ${DISTINFO_FILE}. +# +# See also: patchsum +# +# makepatchsum, mps: +# Add or update the checksums of the patches to ${DISTINFO_FILE}. +# +# makedistinfo, distinfo, mdi: +# Create or update the checksums in ${DISTINFO_FILE}. +# +# Package-settable variables: +# +# NO_CHECKSUM +# When defined, no checksums are generated for patches or +# distfiles. +# +# Default value: undefined # -###################################################################### -### checksum, makesum, makepatchsum (PUBLIC) -###################################################################### -### checksum is a public target to checksum the fetched distfiles -### for the package. -### -### makesum is a public target to add checksums of the distfiles for -### the package to ${DISTINFO_FILE}. -### -### makepatchsum is a public target to add checksums of the patches -### for the package to ${DISTINFO_FILE}. -### +.PHONY: checksum makesum makepatchsum mps mdi makedistinfo distinfo + +checksum makesum: fetch +makedistinfo distinfo mdi: makepatchsum makesum +mps: makepatchsum + .if defined(NO_CHECKSUM) -.PHONY: checksum makesum makepatchsum -. if !target(checksum) -checksum: fetch - @${DO_NADA} -. endif -makesum makepatchsum: +checksum makesum makepatchsum mps mdi makedistinfo distinfo: @${DO_NADA} .else . include "${PKGSRCDIR}/mk/checksum/checksum.mk" .endif - -###################################################################### -### distinfo (PUBLIC) -###################################################################### -### distinfo is a public target to create ${DISTINFO_FILE}. -### -.PHONY: distinfo -distinfo: makepatchsum makesum - @${DO_NADA} - -# Some short aliases for "makepatchsum" and "distinfo". -.PHONY: mps mdi makedistinfo -mps: makepatchsum -mdi makedistinfo: distinfo diff --git a/mk/checksum/checksum.mk b/mk/checksum/checksum.mk index d2185605b29..8a01e258d92 100644 --- a/mk/checksum/checksum.mk +++ b/mk/checksum/checksum.mk @@ -1,4 +1,7 @@ -# $NetBSD: checksum.mk,v 1.3 2007/02/20 09:53:23 rillig Exp $ +# $NetBSD: checksum.mk,v 1.4 2007/03/07 01:06:11 rillig Exp $ +# +# See bsd.checksum.mk for helpful comments. +# _DIGEST_ALGORITHMS?= SHA1 RMD160 _PATCH_DIGEST_ALGORITHMS?= SHA1 @@ -11,12 +14,6 @@ DO_CHECKSUM_REPEATEDLY?= no #_CKSUMFILES?= # empty #_IGNOREFILES?= # empty -###################################################################### -### checksum (PUBLIC) -###################################################################### -### checksum is a public target to checksum the fetched distfiles -### for the package. -### _CHECKSUM_CMD= \ ${SETENV} DIGEST=${TOOLS_DIGEST:Q} CAT=${TOOLS_CAT:Q} \ ECHO=${TOOLS_ECHO:Q} TEST=${TOOLS_TEST:Q} \ @@ -25,10 +22,9 @@ _CHECKSUM_CMD= \ _COOKIE.checksum= ${WRKDIR}/.checksum_done .PHONY: checksum -.if !target(checksum) -checksum: fetch ${_COOKIE.checksum} +checksum: ${_COOKIE.checksum} ${_COOKIE.checksum}: -. 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 \ @@ -42,17 +38,9 @@ ${_COOKIE.checksum}: ${ERROR_MSG} "\"${MAKE} NO_CHECKSUM=yes [other args]\"."; \ exit 1; \ fi -. endfor -.endif +.endfor -###################################################################### -### makesum (PUBLIC) -###################################################################### -### makesum is a public target to add checksums of the distfiles for -### the package to ${DISTINFO_FILE}. -### -.PHONY: makesum -makesum: fetch +makesum: ${_PKG_SILENT}${_PKG_DEBUG}set -e; \ newfile=${DISTINFO_FILE}.$$$$; \ if ${TEST} -f ${DISTINFO_FILE}; then \ @@ -91,12 +79,6 @@ makesum: fetch ${MV} -f $$newfile ${DISTINFO_FILE}; \ fi -###################################################################### -### makepatchsum (PUBLIC) -###################################################################### -### makepatchsum is a public target to add checksums of the patches -### for the package to ${DISTINFO_FILE}. -### makepatchsum: ${_PKG_SILENT}${_PKG_DEBUG}set -e; \ newfile=${DISTINFO_FILE}.$$$$; \ |