Finish bmake support

Obtainned from:	master