wscript_build 531 B

12345678910111213141516171819202122
  1. #! /usr/bin/env python
  2. bld.stlib(
  3. source = 'test_staticlib.c',
  4. target = 'my_static_lib')
  5. bld.program(
  6. source = 'main.c',
  7. target = 'test_static_link',
  8. includes = '.',
  9. use = 'my_static_lib')
  10. def r1(self):
  11. import time
  12. time.sleep(1)
  13. self.outputs[0].write('\n')
  14. bld(rule=r1, target='foo.h', before=['c'])
  15. # the default scanner may enforce the build order on generated headers, but it is just
  16. # better and faster to set before=['c', 'cxx'] explicitly
  17. # the dependency processing for 'gccdeps' also requires it