SConscript 439 B

12345678910111213141516171819202122
  1. import os
  2. import shutil
  3. from building import *
  4. # get current dir path
  5. cwd = GetCurrentDir()
  6. # traversal subscript
  7. objs = []
  8. list = os.listdir(cwd)
  9. for d in list:
  10. path = os.path.join(cwd, d)
  11. if os.path.isfile(os.path.join(path, 'SConscript')):
  12. objs = objs + SConscript(os.path.join(d, 'SConscript'))
  13. #delate non-used files
  14. try:
  15. shutil.rmtree(os.path.join(cwd,'rt-thread-3.1.3'))
  16. except:
  17. pass
  18. Return('objs')