porting Slakefile to scripts