scons clean would throw an error if there was nothing to do. print a message instead.
This commit is contained in:
17
SConstruct
17
SConstruct
@@ -241,13 +241,16 @@ if 'clean' in B.targets:
|
|||||||
do_clean = True
|
do_clean = True
|
||||||
|
|
||||||
if not quickie and do_clean:
|
if not quickie and do_clean:
|
||||||
print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
|
if os.path.exists(B.root_build_dir):
|
||||||
dirs = os.listdir(B.root_build_dir)
|
print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
|
||||||
for dir in dirs:
|
dirs = os.listdir(B.root_build_dir)
|
||||||
if os.path.isdir(B.root_build_dir + dir) == 1:
|
for dir in dirs:
|
||||||
print "clean dir %s"%(B.root_build_dir+dir)
|
if os.path.isdir(B.root_build_dir + dir) == 1:
|
||||||
shutil.rmtree(B.root_build_dir+dir)
|
print "clean dir %s"%(B.root_build_dir+dir)
|
||||||
print B.bc.OKGREEN+'...done'+B.bc.ENDC
|
shutil.rmtree(B.root_build_dir+dir)
|
||||||
|
print B.bc.OKGREEN+'...done'+B.bc.ENDC
|
||||||
|
else:
|
||||||
|
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
|
||||||
Exit()
|
Exit()
|
||||||
|
|
||||||
if not os.path.isdir ( B.root_build_dir):
|
if not os.path.isdir ( B.root_build_dir):
|
||||||
|
Reference in New Issue
Block a user