File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 4
4
from six import PY2 , with_metaclass
5
5
6
6
import hashlib
7
- from re import match
7
+ from re import match , IGNORECASE
8
8
9
9
import sh
10
10
import shutil
@@ -642,6 +642,15 @@ class BootstrapNDKRecipe(Recipe):
642
642
643
643
dir_name = None # The name of the recipe build folder in the jni dir
644
644
645
+ def should_build (self , arch ):
646
+ lib_dir = self .get_lib_dir (arch )
647
+ if not exists (lib_dir ):
648
+ return True
649
+ for f in listdir (lib_dir ):
650
+ if match ('lib{name}.so' .format (name = self .name ), f , IGNORECASE ):
651
+ return False
652
+ return True
653
+
645
654
def clean_build (self , arch = None ):
646
655
# we must set python recipe first or `get_recipe_env` will fail
647
656
self .ctx .python_recipe = Recipe .get_recipe (
@@ -666,6 +675,9 @@ def get_build_dir(self, arch):
666
675
'this is necessary' .format (self .name ))
667
676
return join (self .get_build_container_dir (arch ), self .dir_name )
668
677
678
+ def get_lib_dir (self , arch ):
679
+ return join (self .ctx .bootstrap .build_dir , 'obj' , 'local' , arch .arch )
680
+
669
681
def get_jni_dir (self ):
670
682
return join (self .ctx .bootstrap .build_dir , 'jni' )
671
683
You can’t perform that action at this time.
0 commit comments