maybe that’s where the problem come from, you must keep “–prefix $prefix”
(part of my fault, my summary was not very clear, i have rewrited it)