Compare commits

...
2 Commits
Author SHA1 Message Date
josh 0de1e8e970 v1.4.1 2014-04-17 12:03:29 -04:00
josh 6f20a1da3f bugfix: support invoking builders with no sources and a build root defined 2014-04-17 12:03:09 -04:00
3 changed files with 16 additions and 2 deletions

No files matched your search

+1 -1
View File
@@ -258,7 +258,7 @@ module Rscons
unless vars.nil? or vars.is_a?(Hash) or vars.is_a?(VarSet)
raise "Unexpected construction variable set: #{vars.inspect}"
end
sources = [sources] unless sources.is_a?(Array)
sources = Array(sources)
add_target(target, @builders[method.to_s], sources, vars, rest)
else
super
+1 -1
View File
@@ -1,4 +1,4 @@
module Rscons
# gem version
VERSION = "1.4.0"
VERSION = "1.4.1"
end
+14
View File
@@ -484,4 +484,18 @@ EOF
File.read("simplepp.cc").should =~ /# \d+ "simple.cc"/
`./simple`.should == "This is a simple C++ program\n"
end
it "supports invoking builders with no sources and a build_root defined" do
class TestBuilder < Rscons::Builder
def run(target, sources, cache, env, vars)
target
end
end
test_dir("simple")
Rscons::Environment.new do |env|
env.build_root = "build"
env.add_builder(TestBuilder.new)
env.TestBuilder("file")
end
end
end