mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
Use shutil rather then rm -rf command.
This commit is contained in:
parent
eeda704462
commit
d8fd4fe725
1 changed files with 3 additions and 1 deletions
4
make.py
4
make.py
|
@ -5,6 +5,7 @@ import os
|
||||||
import argparse
|
import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
import struct
|
import struct
|
||||||
|
import shutil
|
||||||
|
|
||||||
from mibuild.tools import write_to_file
|
from mibuild.tools import write_to_file
|
||||||
from migen.util.misc import autotype
|
from migen.util.misc import autotype
|
||||||
|
@ -136,7 +137,8 @@ CPU type: {}
|
||||||
actions["build-headers"] = True
|
actions["build-headers"] = True
|
||||||
|
|
||||||
if actions["clean"]:
|
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", "libcompiler-rt"), "clean"])
|
||||||
subprocess.check_call(["make", "-C", os.path.join("software", "libbase"), "clean"])
|
subprocess.check_call(["make", "-C", os.path.join("software", "libbase"), "clean"])
|
||||||
subprocess.check_call(["make", "-C", os.path.join("software", "libnet"), "clean"])
|
subprocess.check_call(["make", "-C", os.path.join("software", "libnet"), "clean"])
|
||||||
|
|
Loading…
Reference in a new issue