distclean target for waf to remove old build artifacts

This commit is contained in:
Prasanna Santhanam 2012-09-20 12:40:37 +05:30 committed by Edison Su
parent 39472bc599
commit edd3772643
1 changed files with 8 additions and 0 deletions

View File

@ -83,6 +83,14 @@ for pattern in ["**/.project","**/.classpath","**/.pydevproject"]: Node.exclude_
# Support functions
def distclean(ctx):
"""Clear the build artifacts"""
for root, folder, files in os.walk(blddir):
for f in files:
path = os.path.join(root, f)
print "Removing artifact %s"%path
os.remove(path)
def inspectobj(x):
"""Look inside an object"""
for m in dir(x): print m,": ",getattr(x,m)