diff options
author | jlam <jlam> | 2005-05-17 19:08:30 +0000 |
---|---|---|
committer | jlam <jlam> | 2005-05-17 19:08:30 +0000 |
commit | 5c6b464b5913f2a7825244721d8911d4bc76f470 (patch) | |
tree | 1120d5c76a7de17a6af5d4cf7b1b4b99daaae7a8 /mk/bsd.pkg.patch.mk | |
parent | dc6856b809ed78b84e40cc1780d6358302b9c3c5 (diff) | |
download | pkgsrc-5c6b464b5913f2a7825244721d8911d4bc76f470.tar.gz |
Simplify by using a for loop instead of "set -- ...; while ... done".
Also, rename "fuzz" to "fuzz_flags" to clarify that it's a set of flags
and should be used unquoted. Output from rilligd :)
Diffstat (limited to 'mk/bsd.pkg.patch.mk')
-rw-r--r-- | mk/bsd.pkg.patch.mk | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mk/bsd.pkg.patch.mk b/mk/bsd.pkg.patch.mk index 8ab7e08a3be..5f330a316ad 100644 --- a/mk/bsd.pkg.patch.mk +++ b/mk/bsd.pkg.patch.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.patch.mk,v 1.7 2005/05/17 06:31:00 jlam Exp $ +# $NetBSD: bsd.pkg.patch.mk,v 1.8 2005/05/17 19:08:30 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and defines the # relevant variables and targets for the "patch" phase. @@ -212,10 +212,9 @@ _PKGSRC_PATCHES+= ${LOCALPATCHES}/${PKGPATH}/patch-* apply-pkgsrc-patches: @${ECHO_MSG} "${_PKGSRC_IN}> Applying pkgsrc patches for ${PKGNAME}" ${_PKG_SILENT}${_PKG_DEBUG} \ - set -- `${ECHO} ${_PKGSRC_PATCHES:Q}`; \ fail=; \ - while ${TEST} $$# -gt 0; do \ - i="$$1"; shift; \ + patches=${_PKGSRC_PATCHES:Q}; \ + for i in $$patches; do \ ${TEST} -f "$$i" || continue; \ case "$$i" in \ *.orig|*.rej|*~) \ @@ -260,8 +259,10 @@ apply-pkgsrc-patches: esac; \ ${ECHO_PATCH_MSG} "${_PKGSRC_IN}> Applying pkgsrc patch $$i"; \ fuzz=; \ - ${PATCH} -v >/dev/null 2>&1 && fuzz=${PATCH_FUZZ_FACTOR:Q}; \ - ${PATCH} $$fuzz ${PATCH_ARGS} < $$i || \ + if ${PATCH} -v >/dev/null 2>&1; then \ + fuzz_flags=${PATCH_FUZZ_FACTOR:Q}; \ + fi; \ + ${PATCH} $$fuzz_flags ${PATCH_ARGS} < $$i || \ ${ECHO_MSG} "Patch $$i failed"; \ ${ECHO} "$$i" >> ${_PATCH_COOKIE_TMP:Q}; \ done; \ |