distclean target for waf to remove old build artifacts

This commit is contained in:
Prasanna Santhanam 2012-09-20 12:40:37 +05:30
parent fb813c84e1
commit 0b0d57255c

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)