software/bios: move romboot after serialboot and netboot
[litex.git] / make.py
diff --git a/make.py b/make.py
index 2d1c51b3ffaf28ebf6e816232faf40fadcc052a6..b0d3967d7d4babcbf887a8bfc80b5e42dc1e57fe 100755 (executable)
--- a/make.py
+++ b/make.py
@@ -5,7 +5,6 @@ import os
 import argparse
 import subprocess
 import struct
-import shutil
 
 from mibuild.tools import write_to_file
 from migen.util.misc import autotype
@@ -137,8 +136,7 @@ CPU type:  {}
         actions["build-headers"] = True
 
     if actions["clean"]:
-        shutil.rmtree("build") # Need shell for the build/* globbing
-        os.mkdir("build")
+        subprocess.check_call("rm -rvf build/*", shell=True) # Need shell for the build/* globbing
         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"])