diff options
author | jlam <jlam@pkgsrc.org> | 2007-08-31 16:30:11 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2007-08-31 16:30:11 +0000 |
commit | 1bffbe5e1d3fda573498db4253d9039b115f1e46 (patch) | |
tree | 08bab4291fbc18e7aa8f02c132328ec75a243c0b /mk/checksum/checksum.mk | |
parent | 9d378f69384c1596f568cd9ef7a222ab586d84f2 (diff) | |
download | pkgsrc-1bffbe5e1d3fda573498db4253d9039b115f1e46.tar.gz |
Introduce a new target "checksum-phase" which is used as a dependency
target by pkgsrc. This new target computes checksums only up until
the extract phase is complete.
The "checksum" target is now a target that can always be run by the
user at any time, regardless of the presence of the work directory.
These changes were proposed in PR pkg/36603 by Robert Elz.
Diffstat (limited to 'mk/checksum/checksum.mk')
-rw-r--r-- | mk/checksum/checksum.mk | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mk/checksum/checksum.mk b/mk/checksum/checksum.mk index 8b7e50f03b2..6e950103a49 100644 --- a/mk/checksum/checksum.mk +++ b/mk/checksum/checksum.mk @@ -1,4 +1,4 @@ -# $NetBSD: checksum.mk,v 1.10 2007/08/24 03:30:54 jlam Exp $ +# $NetBSD: checksum.mk,v 1.11 2007/08/31 16:30:11 jlam Exp $ # # See bsd.checksum.mk for helpful comments. # @@ -10,12 +10,6 @@ _PATCH_DIGEST_ALGORITHMS?= SHA1 #_CKSUMFILES?= # empty #_IGNOREFILES?= # empty -_CHECKSUM_CMD= \ - ${SETENV} DIGEST=${TOOLS_DIGEST:Q} CAT=${TOOLS_CAT:Q} \ - ECHO=${TOOLS_ECHO:Q} SED=${TOOLS_SED:Q} \ - TEST=${TOOLS_TEST:Q} \ - ${SH} ${PKGSRCDIR}/mk/checksum/checksum \ - # _COOKIE.checksum # The file whose presence determines whether or not the checksum # process is run. @@ -32,10 +26,17 @@ _CHECKSUM_CMD= \ # _COOKIE.checksum= ${_COOKIE.extract} -checksum: do-checksum -do-checksum: +_CHECKSUM_CMD= \ + ${SETENV} DIGEST=${TOOLS_DIGEST:Q} CAT=${TOOLS_CAT:Q} \ + ECHO=${TOOLS_ECHO:Q} SED=${TOOLS_SED:Q} \ + TEST=${TOOLS_TEST:Q} \ + ${SH} ${PKGSRCDIR}/mk/checksum/checksum \ + +checksum checksum-phase: ${RUN} set -e; \ - ${TEST} ! -f ${_COOKIE.checksum} || exit 0; \ + case ${.TARGET:Q} in \ + *-phase) ${TEST} ! -f ${_COOKIE.checksum} || exit 0 ;; \ + esac; \ if cd ${DISTDIR} && ${_CHECKSUM_CMD} ${DISTINFO_FILE} ${_CKSUMFILES}; then \ ${TRUE}; \ else \ |