diff options
author | rillig <rillig@pkgsrc.org> | 2020-06-11 18:04:41 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-06-11 18:04:41 +0000 |
commit | eee12c7640fbd60d352d9c0f1c1602feabe97f30 (patch) | |
tree | bc449ff1f5d3b2dc87fc50ec21606d78ac88f6d6 /mk/subst.mk | |
parent | 0e198c3f949480366d143978fb115756360d6359 (diff) | |
download | pkgsrc-eee12c7640fbd60d352d9c0f1c1602feabe97f30.tar.gz |
mk/subst.mk: always remove temporary file
Fixes PR pkg/55364.
Diffstat (limited to 'mk/subst.mk')
-rw-r--r-- | mk/subst.mk | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mk/subst.mk b/mk/subst.mk index 7307f87ea90..b0b873e3785 100644 --- a/mk/subst.mk +++ b/mk/subst.mk @@ -1,4 +1,4 @@ -# $NetBSD: subst.mk,v 1.95 2020/06/03 10:56:46 gdt Exp $ +# $NetBSD: subst.mk,v 1.96 2020/06/11 18:04:41 rillig Exp $ # # The subst framework replaces text in one or more files in the WRKSRC # directory. Packages can define several ``classes'' of replacements. @@ -204,11 +204,9 @@ ${_SUBST_COOKIE.${class}}: ${CMP} -s "$$tmpfile" "$$file" && { \ ${AWK} -f ${PKGSRCDIR}/mk/scripts/subst-identity.awk -- ${SUBST_SED.${class}} \ && found=$$(LC_ALL=C ${SED} -n ${SUBST_SED.${class}:C,^['"]?s.*,&p,} "$$file") \ - && [ -n "$$found" ] && { \ - changed=yes; \ - continue; \ - }; \ - ${_SUBST_WARN.${class}} "Nothing changed in \"$$file\"."; \ + && [ -n "$$found" ] \ + && changed=yes \ + || ${_SUBST_WARN.${class}} "Nothing changed in \"$$file\"."; \ ${RM} -f "$$tmpfile"; \ continue; \ }; \ |