Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-08-31 23:17:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-08-31 23:17:22 +0400
commit4cb953e60ede6ecff4af55679936ceb6126a2a0f (patch)
tree3a705ef8c519ab9d9c982f129b927db20dd31e64 /SConstruct
parent8ec207efcb69a3a04e847745f77d9f33fd518f20 (diff)
scons clean would throw an error if there was nothing to do. print a message instead.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct17
1 files changed, 10 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct
index 0ef167eb9a8..2cacb91d103 100644
--- a/SConstruct
+++ b/SConstruct
@@ -241,13 +241,16 @@ if 'clean' in B.targets:
do_clean = True
if not quickie and do_clean:
- print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
- dirs = os.listdir(B.root_build_dir)
- for dir in dirs:
- if os.path.isdir(B.root_build_dir + dir) == 1:
- print "clean dir %s"%(B.root_build_dir+dir)
- shutil.rmtree(B.root_build_dir+dir)
- print B.bc.OKGREEN+'...done'+B.bc.ENDC
+ if os.path.exists(B.root_build_dir):
+ print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
+ dirs = os.listdir(B.root_build_dir)
+ for dir in dirs:
+ if os.path.isdir(B.root_build_dir + dir) == 1:
+ print "clean dir %s"%(B.root_build_dir+dir)
+ 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()
if not os.path.isdir ( B.root_build_dir):