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 __HOLE__, e:
				if e.errno != errno.ENOENT:
					Logs.warn('file %r cannot be removed' % f)

		# remove the local waf cache
		if not commands and f.startswith('.waf'):
			shutil.rmtree(f, ignore_errors=True)

# FIXME waf 1.6 a unique ctx parameter, and remove the optional appname and version
dataset/ETHPy150Open appcelerator-archive/poc-nodejs-desktop/Resources/nodejs/builds/linux/node/lib/node/wafadmin/Scripting.py/distclean