---
 make.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/make.py b/make.py
index b0d3967..2d1c51b 100755
--- a/make.py
+++ b/make.py
@@ -5,6 +5,7 @@ import os
 import argparse
 import subprocess
 import struct
+import shutil
 
 from mibuild.tools import write_to_file
 from migen.util.misc import autotype
@@ -136,7 +137,8 @@ CPU type:  {}
         actions["build-headers"] = True
 
     if actions["clean"]:
-        subprocess.check_call("rm -rvf build/*", shell=True) # Need shell for 
the build/* globbing
+        shutil.rmtree("build") # Need shell for the build/* globbing
+        os.mkdir("build")
         subprocess.check_call(["make", "-C", os.path.join("software", 
"libcompiler-rt"), "clean"])
         subprocess.check_call(["make", "-C", os.path.join("software", 
"libbase"), "clean"])
         subprocess.check_call(["make", "-C", os.path.join("software", 
"libnet"), "clean"])
-- 
2.5.0.rc2.392.g76e840b

_______________________________________________
M-Labs devel mailing list
https://ssl.serverraum.org/lists/listinfo/devel

Reply via email to