소스 검색

[tools] fix the list in list issue when use LOCAL_* options

Bernard Xiong 9 년 전
부모
커밋
804e23a3aa
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      tools/building.py

+ 13 - 0
tools/building.py

@@ -480,6 +480,19 @@ def BuildLibInstallAction(target, source, env):
             break
 
 def DoBuilding(target, objects):
+
+    # merge all objects into one list
+    def one_list(l):
+        lst = []
+        for item in l:
+            if type(item) == type([]):
+                lst += one_list(item)
+            else:
+                lst.append(item)
+        return lst
+
+    objects = one_list(objects)
+
     # remove source files with local flags setting
     for group in Projects:
         if group.has_key('LOCAL_CCFLAGS') or group.has_key('LOCAL_CPPPATH') or group.has_key('LOCAL_CPPDEFINES'):