Your environment looks fine, except I would suggest setting HOME to a valid directory because lots of unixish programs (including cvs) use it.
I don't understand what's causing the sed break, and have no time right now to see if it happens here, but it's odd that you're going into config/mkdepend. Setting COMPILER_DEPEND=1 should keep you out of it. h~
