diff --git a/build_tests/typical/phonies.rb b/build_tests/typical/phonies.rb new file mode 100644 index 0000000..718e7f6 --- /dev/null +++ b/build_tests/typical/phonies.rb @@ -0,0 +1,15 @@ +class Custom < Rscons::Builder + def run(options) + print_run_message("#{name} #{target}", nil) + true + end +end + +env do |env| + env.add_builder(Custom) + env.Custom("t3", :phony1) + env.Custom(:phony1, "t2") + env.Custom("t2", :phony2) + env.Custom(:phony2, "t1") + env.Custom("t1", []) +end diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index 293a808..f787afd 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -1347,6 +1347,14 @@ EOF %r{Checker simple.exe}, ]) end + + it "supports phony targets as dependencies" do + test_dir "typical" + result = run_rscons(args: %w[-f phonies.rb]) + expect(result.stderr).to eq "" + expect(result.status).to eq 0 + expect(result.stdout).to match /t1.*phony2.*t2.*phony1.*t3/m + end end context "Environment#clear_targets" do