12345678910111213141516171819202122232425262728293031323334353637383940 |
- bld.shlib(
-
- features = 'c cshlib',
- target = 'hello-world',
-
- source = 'hello.vala',
- gir = 'hello-1.0',
-
-
- pkg_name = 'hello'
- )
- bld(features = 'c cstlib foreign_generator',
- source = '',
- target = 'hello-world',
- name = 'hello-world-static',
- srcgen = 'hello-world',
- use = 'GTK GLIB',
- )
- from waflib import TaskGen
- @TaskGen.feature('foreign_generator')
- @TaskGen.before('apply_link')
- def call_me_static(self):
- for x in self.to_list(getattr(self, 'srcgen')):
- tg = self.bld.get_tgen_by_name(x)
- if not tg:
- self.bld.fatal('No task generator by the name %r' % x)
- tg.post()
- for tsk in tg.tasks:
- for out in tsk.outputs:
- if out.name.endswith('.c'):
- self.create_compiled_task('c', out)
- if not self.compiled_tasks:
- self.fatal('No source file for %r? this is unexpected' % self.name)
|