Usually these variables can be passed to make rather than `inreplace`d:

```rb
system "make", "BINDIR=#{prefix}", "ETCDIR=#{etc}", ...
```

can you see if that is sufficient here?