diff options
author | rillig <rillig@pkgsrc.org> | 2007-03-07 21:27:59 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-03-07 21:27:59 +0000 |
commit | 30481ac1be3631cc8833d2e4e766457e82593d16 (patch) | |
tree | d373526ed5dad3871507afabf14a44f6baa70022 | |
parent | abd1fd8aecf537e761c48f7fb4c27f8ab95e73ff (diff) | |
download | pkgsrc-30481ac1be3631cc8833d2e4e766457e82593d16.tar.gz |
Fixed the quoting for SUBST_VARS.*. Now every character gets replaced
properly. The regression test passes.
-rw-r--r-- | mk/subst.mk | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mk/subst.mk b/mk/subst.mk index d9d61094303..24c06e99a6c 100644 --- a/mk/subst.mk +++ b/mk/subst.mk @@ -1,4 +1,4 @@ -# $NetBSD: subst.mk,v 1.43 2007/02/05 08:39:23 rillig Exp $ +# $NetBSD: subst.mk,v 1.44 2007/03/07 21:27:59 rillig Exp $ # # This Makefile fragment implements a general text replacement facility. # Package makefiles define a ``class'', for each of which a particular @@ -63,8 +63,11 @@ _SUBST_BACKUP_SUFFIX= .subst.sav .for _class_ in ${SUBST_CLASSES} _SUBST_COOKIE.${_class_}= ${WRKDIR}/.subst_${_class_}_done +SUBST_FILTER_CMD.${_class_}?= ${SED} ${SUBST_SED.${_class_}} SUBST_VARS.${_class_}?= # none -SUBST_FILTER_CMD.${_class_}?= ${SED} ${SUBST_SED.${_class_}} ${SUBST_VARS.${_class_}:@v@-e 's,\@${v}\@,'${${v}:Q}',g' @} +. for v in ${SUBST_VARS.${_class_}} +SUBST_FILTER_CMD.${_class_} += -e s,@${v}@,${${v}:S|\\|\\\\|gW:S|,|\\,|gW:S|&|\\\&|gW:Q},g +. endfor SUBST_POSTCMD.${_class_}?= ${RM} -f "$$tmpfile" SUBST_SKIP_TEXT_CHECK.${_class_}?= no |