SConscript 533 B

12345678910111213141516171819202122
  1. import os
  2. from building import *
  3. # get current dir path
  4. cwd = GetCurrentDir()
  5. # init src and inc vars
  6. src = Glob('*.c')
  7. inc = [cwd]
  8. # add group to IDE project
  9. group = DefineGroup('optparse', src, depend = ['PKG_USING_OPTPARSE'], CPPPATH = inc)
  10. # traversal subscript
  11. list = os.listdir(cwd)
  12. if GetDepend('PKG_USING_OPTPARSE'):
  13. for d in list:
  14. path = os.path.join(cwd, d)
  15. if os.path.isfile(os.path.join(path, 'SConscript')):
  16. group = group + SConscript(os.path.join(d, 'SConscript'))
  17. Return('group')