When using mk, GNU sed, I find that variables do not expand at all.
Problematic code:
VAR=qux
...
build:
sed -i "s|FOO = .*|FOO = $VAR|" bar.file
This seems to run the following:
sed -i "s|FOO = .*|FOO = $VAR|" bar.file
when I want it to run
sed -i "s|FOO = .*|FOO = qux|" bar.file
I have tried using single quotes and double quotes, as other stack exchange posts have mentioned. The only instance I can get $VAR to expand is when there are no quotes around it. Which of course means that sed no longer sees the expression as an expression.