File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -2044,6 +2044,13 @@ def src_dir(self):
20442044 def newestOutput (self ):
20452045 return None
20462046
2047+ def needsBuild (self , newestInput ):
2048+ if self .args .force :
2049+ return True , 'forced build'
2050+ if not os .path .exists (self .subject .get_output_root ()):
2051+ return True , 'inexisting output dir'
2052+ return False , 'unimplemented'
2053+
20472054 def clean (self , forBuild = False ):
20482055 if forBuild == "reallyForBuild" :
20492056 try :
@@ -2093,8 +2100,12 @@ def clean(self, forBuild=False):
20932100 result = 0
20942101 if not forBuild :
20952102 try :
2096- shutil .rmtree (self ._dev_headers_dir ())
2097- except BaseException :
2103+ mx .logv ('Cleaning {0}...' .format (self ._dev_headers_dir ()))
2104+ shutil .rmtree (self ._dev_headers_dir (), ignore_errors = True )
2105+ mx .logv ('Cleaning {0}...' .format (self .subject .get_output_root ()))
2106+ shutil .rmtree (self .subject .get_output_root (), ignore_errors = True )
2107+ except BaseException as e :
2108+ mx .logv ('Error while cleaning: {0}' .format (e ))
20982109 result = 1
20992110 return max (result , super ().clean (forBuild = forBuild ))
21002111
You can’t perform that action at this time.
0 commit comments