From 6de649f6c67cf4823c4bb880dbec7c7397e773c2 Mon Sep 17 00:00:00 2001 From: Marc Jansen Date: Tue, 5 Feb 2013 12:10:31 +0100 Subject: [PATCH] (Re)add a reallylean target to the build. Previously we had both a `clean` and `reallyclean` in our Makefile; both got lost when we switched to a python build. A clean 'target' can be invoked by calling the build script with the '-c' flag: ./build.py -c This commit readds the `reallyclean` target and lets it clean up a little more than the Makefiles `clean` or `reallyclean` did. More files are deleted, but only if these are being ignored inside of the repository (e.g. through .gitignore files). --- build.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.py b/build.py index 3349b31c0c..b47ebc8b9a 100755 --- a/build.py +++ b/build.py @@ -348,5 +348,16 @@ def find_fixme(t): print print "A total number of", totalcount, "TODO/FIXME was found" +@target('reallyclean') +def reallyclean(t): + """Removes untracked files and folders from previous builds.""" + # -X => only clean up files that are usually ignored e.g. + # through .gitignore + # -d => also consider directories for deletion + # -f => if git configuration variable clean.requireForce != false, + # git clean will refuse to run unless given -f or -n. + t.run('%(GIT)s', 'clean', '-X', '-d', '-f', '.') + + if __name__ == '__main__': main()