thank @yetist, he provided scons-alike python script to me ;)