rt-thread-official/bsp/ht32/ht32f12366/SConscript

16 lines
955 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# for module compiling
import os #包含os库
Import('RTT_ROOT') #导入RTT_ROOT对象RTT_ROOT代表的是RT-Thread源码包
from building import * #把building模块的所有内容都导入到当前模块中
cwd = GetCurrentDir() #获取当前路径并将该路径信息保存到变量cwd中
objs = [] #创建一个list型变量objs
list = os.listdir(cwd) #得到当前目录下的所有子目录并保存到变量list中
for d in list: #for循环用d记录循环的次数直到寻遍所有路径
path = os.path.join(cwd, d) #根据d获取到不同的路径
if os.path.isfile(os.path.join(path, 'SConscript')): #如果该路径下存在名为SConscript的文件
objs = objs + SConscript(os.path.join(d, 'SConscript')) #将路径中SConscript文件内的源码读取到objs中
Return('objs') #将objs返回出去