diff options
author | rillig <rillig@pkgsrc.org> | 2020-05-01 06:42:32 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-05-01 06:42:32 +0000 |
commit | 5a0a1754339f313834f2eb581a8a3a65a8e5ba65 (patch) | |
tree | 4c9c0b08697901569916bb455d89eb778a22635e /mk | |
parent | 9ceee6cc4c07cf20c7865420fa5527d8f99eea26 (diff) | |
download | pkgsrc-5a0a1754339f313834f2eb581a8a3a65a8e5ba65.tar.gz |
mk/subst.mk: switch command substitution back to backticks
To work properly, the $(...) should have been $$(...).
In pkgsrc the command substitution is usually done via `backticks`, for
compatibility with /bin/sh from Solaris. To fix the shell parse errors,
the special characters are properly escaped inside the command
substitution.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/subst.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/subst.mk b/mk/subst.mk index 403c9416c9e..c5d62eaa901 100644 --- a/mk/subst.mk +++ b/mk/subst.mk @@ -1,4 +1,4 @@ -# $NetBSD: subst.mk,v 1.89 2020/04/30 23:52:30 joerg Exp $ +# $NetBSD: subst.mk,v 1.90 2020/05/01 06:42:32 rillig Exp $ # # The subst framework replaces text in one or more files in the WRKSRC # directory. Packages can define several ``classes'' of replacements. @@ -200,7 +200,7 @@ ${_SUBST_COOKIE.${class}}: ${SUBST_FILTER_CMD.${class}} < "$$file" > "$$tmpfile"; \ ${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") \ + && found=`LC_ALL=C ${SED} -n ${SUBST_SED.${class}:C,^['"]?s.*,&p,:C,[\\`"],\\\\&,g} "$$file"` \ && [ -n "$$found" ] && { \ changed=yes; \ continue; \ |