code: def distclean(ctx=None):
  	'''removes the build directory'''
  	global commands
  	lst=os.listdir('.')
  	for f in lst:
  		if f==Options.lockfile:
  			try:
  				proj=Environment.Environment(f)
  			except:
  				Logs.warn('could not read %r'%f)
  				continue
  			try:
  				shutil.rmtree(proj[BLDDIR])
  			except IOError:
  				pass
  			except OSError,e:
  				if e.errno!=errno.ENOENT:
  					Logs.warn('project %r cannot be removed'%proj[BLDDIR])
  			try:
  				os.remove(f)
  			except OSError,e:
  				if e.errno!=errno.ENOENT:
  					Logs.warn('file %r cannot be removed'%f)
  		if not commands and f.startswith('.waf'):
  			shutil.rmtree(f,ignore_errors=Truef distclean(ctx=None):
  	'''removes the build directory'''
  	global commands
  	lst=os.listdir('.')
  	for f in lst:
  		if f==Options.lockfile:
  			try:
  				proj=Environment.Environment(f)
  			except:
  				Logs.warn('could not read %r'%f)
  				continue
  			try:
  				shutil.rmtree(proj[BLDDIR])
  			except IOError:
  				pass
  			except OSError,e:
  				if e.errno!=errno.ENOENT:
  					Logs.warn('project %r cannot be removed'%proj[BLDDIR])
  			try:
  				os.remove(f)
  			except OSError,e:
  				if e.errno!=errno.ENOENT:
  					Logs.warn('file %r cannot be removed'%f)
  		if not commands and f.startswith('.waf'):
  			shutil.rmtree(f,ignore_errors=True)
docs: removes the build directory