diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 4 | ||||
-rw-r--r-- | mk/bsd.pkg.patch.mk | 13 |
2 files changed, 14 insertions, 3 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 897141b02e0..50cb04be8ef 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1666 2005/05/16 18:01:12 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1667 2005/05/17 06:31:00 jlam Exp $ # # This file is in the public domain. # @@ -2871,7 +2871,7 @@ test-message: extract-cookie: ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} >> ${EXTRACT_COOKIE} patch-cookie: - ${_PKG_SILENT}${_PKG_DEBUG} ${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE} + ${_PKG_SILENT}${_PKG_DEBUG}${_GENERATE_PATCH_COOKIE} tools-cookie: ${_PKG_SILENT}${_PKG_DEBUG} ${TOUCH} ${TOUCH_FLAGS} ${TOOLS_COOKIE} wrapper-cookie: diff --git a/mk/bsd.pkg.patch.mk b/mk/bsd.pkg.patch.mk index e955ce3cb30..8ab7e08a3be 100644 --- a/mk/bsd.pkg.patch.mk +++ b/mk/bsd.pkg.patch.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.patch.mk,v 1.6 2005/05/17 05:00:06 jlam Exp $ +# $NetBSD: bsd.pkg.patch.mk,v 1.7 2005/05/17 06:31:00 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and defines the # relevant variables and targets for the "patch" phase. @@ -181,6 +181,15 @@ if ${TEST} -n ${PKG_OPTIONS:Q}"" || \ ${ECHO} "=========================================================================="; \ fi; exit 1 +_PATCH_COOKIE_TMP= ${PATCH_COOKIE}.tmp +_GENERATE_PATCH_COOKIE= \ + if ${TEST} -f ${_PATCH_COOKIE_TMP:Q}; then \ + ${CAT} ${_PATCH_COOKIE_TMP:Q} >> ${PATCH_COOKIE:Q}; \ + ${RM} -f ${_PATCH_COOKIE_TMP:Q}; \ + else \ + ${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE:Q}; \ + fi + apply-distribution-patches: @${ECHO_MSG} "${_PKGSRC_IN}> Applying distribution patches for ${PKGNAME}" .for i in ${PATCHFILES} @@ -189,6 +198,7 @@ apply-distribution-patches: ${PATCH_DIST_CAT.${i:S/=/--/}} | \ ${PATCH} ${PATCH_DIST_ARGS.${i:S/=/--/}} \ || { ${ECHO} "Patch ${i} failed"; ${_PKGSRC_PATCH_FAIL}; } + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${i:Q} >> ${_PATCH_COOKIE_TMP:Q} .endfor _PKGSRC_PATCHES= # empty @@ -253,6 +263,7 @@ apply-pkgsrc-patches: ${PATCH} -v >/dev/null 2>&1 && fuzz=${PATCH_FUZZ_FACTOR:Q}; \ ${PATCH} $$fuzz ${PATCH_ARGS} < $$i || \ ${ECHO_MSG} "Patch $$i failed"; \ + ${ECHO} "$$i" >> ${_PATCH_COOKIE_TMP:Q}; \ done; \ if ${TEST} -n "$$fail"; then \ ${ECHO_MSG} "Patching failed due to modified patch file(s): $$fail"; \ |