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 @@ -2037,6 +2037,13 @@ def src_dir(self):
20372037 def newestOutput (self ):
20382038 return None
20392039
2040+ def needsBuild (self , newestInput ):
2041+ if self .args .force :
2042+ return True , 'forced build'
2043+ if not os .path .exists (self .subject .get_output_root ()):
2044+ return True , 'inexisting output dir'
2045+ return False , 'unimplemented'
2046+
20402047 def clean (self , forBuild = False ):
20412048 if forBuild == "reallyForBuild" :
20422049 try :
@@ -2086,8 +2093,12 @@ def clean(self, forBuild=False):
20862093 result = 0
20872094 if not forBuild :
20882095 try :
2089- shutil .rmtree (self ._dev_headers_dir ())
2090- except BaseException :
2096+ mx .logv ('Cleaning {0}...' .format (self ._dev_headers_dir ()))
2097+ shutil .rmtree (self ._dev_headers_dir (), ignore_errors = True )
2098+ mx .logv ('Cleaning {0}...' .format (self .subject .get_output_root ()))
2099+ shutil .rmtree (self .subject .get_output_root (), ignore_errors = True )
2100+ except BaseException as e :
2101+ mx .logv ('Error while cleaning: {0}' .format (e ))
20912102 result = 1
20922103 return max (result , super ().clean (forBuild = forBuild ))
20932104
You can’t perform that action at this time.
0 commit comments