WAF - Pre/Post Processing

Q

Is it possible to include pre and post processing into the waf scripts?

A
waf script
def prebuild(bld):
   print os.listdir(os.getcwd() + "\\build\\" + bld.get_conditions())
   print 'before the build is started'

def postbuild(bld):
   print os.listdir(os.getcwd() + "\\build\\" + bld.get_conditions())
   print 'after the build is complete'

def build(bld):
   bld.add_pre_fun(prebuild)
   bld.add_post_fun(postbuild)
   bld.autorecurse()