distclean target for waf to remove old build artifacts
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/edd37726 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/edd37726 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/edd37726 Branch: refs/heads/4.0 Commit: edd3772643df88df7032d00a81163e6398394a3d Parents: 39472bc Author: Prasanna Santhanam <[email protected]> Authored: Thu Sep 20 12:40:37 2012 +0530 Committer: Edison Su <[email protected]> Committed: Tue Sep 25 15:04:46 2012 -0700 ---------------------------------------------------------------------- wscript | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/edd37726/wscript ---------------------------------------------------------------------- diff --git a/wscript b/wscript index f1c9b62..ff38ed2 100644 --- a/wscript +++ b/wscript @@ -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)
