Changed waf build script for waf 1.7 and associated code

--HG--
branch : waf1.7