build: improve the wscript generator