Skip to content

Commit

Permalink
Add go-gobject-gen binary as a dependency to all gogobject tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
nsf committed Mar 3, 2012
1 parent 51c98ec commit f738f9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions waftools/gogobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ class gogobject(Task):

@extension('.go.in')
def gogobject_hook(self, node):
tg = self.bld.get_tgen_by_name('go-gobject-gen')
ggg = tg.link_task.outputs[0]

if not self.env.GGG:
tg = self.bld.get_tgen_by_name('go-gobject-gen')
ggg = tg.link_task.outputs[0]
self.env.GGG = ggg.abspath()

go_out = node.change_ext('')
c_out = go_out.change_ext('.gen.c')
h_out = go_out.change_ext('.gen.h')
task = self.create_task('gogobject', node, [go_out, c_out, h_out])
task.dep_nodes = [ggg]
return task

0 comments on commit f738f9d

Please sign in to comment.