invoke the builder's run() method

This commit is contained in:
Josh Holtrop 2013-06-16 22:17:56 -04:00
parent 15515d4696
commit 3b8763a424
3 changed files with 10 additions and 0 deletions

View File

@ -6,5 +6,8 @@ module Rscons
'CPPFLAGS' => [],
'OBJSUFFIX' => '.o',
}
def run(env, sources)
end
end
end

View File

@ -7,5 +7,8 @@ module Rscons
'LDFLAGS' => [],
'LIBS' => [],
}
def run(env, sources)
end
end
end

View File

@ -21,6 +21,7 @@ module Rscons
end
def add_builder(builder_class)
@builders[builder_class.to_s.split(':').last] = builder_class
var_defs = builder_class.const_get('VARIABLE_DEFAULTS')
if var_defs
var_defs.each_pair do |var, val|
@ -45,6 +46,9 @@ module Rscons
def method_missing(method, *args)
if @builders.has_key?(method.to_s)
# TODO: build sources if necessary
builder = @builders[method.to_s].new
builder.run(self, args.first)
end
end
end