wscript 715 B

123456789101112131415161718192021222324252627282930313233343536
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2010 (ita)
  4. VERSION='0.0.1'
  5. APPNAME='cc_test'
  6. """
  7. """
  8. from waflib import Utils, Build
  9. top = '.'
  10. def options(opt):
  11. opt.load('compiler_c')
  12. def configure(conf):
  13. conf.load('compiler_c')
  14. def read_files(task):
  15. # the real build files must be excluded, else they will get rebuilt
  16. for x in task.generator.bld.bldnode.ant_glob('**', excl='**/*.o app', remove=False):
  17. pass
  18. def build(bld):
  19. bld.post_mode = Build.POST_LAZY
  20. bld(rule='tar xvf ${SRC[0].abspath()}', source='foo.tar')
  21. bld.add_group('foo')
  22. bld(rule=read_files, always=True, name='read_files')
  23. bld.add_group('bar')
  24. bld.program(source='aa/main.c', target='app')
  25. print bld.get_group('bar')