gen Action do puts "running action" if var[:act_verbose] end task :do_nothing file "auto.rf" do |t| open(t.name, "w") { |f| f << <<-EOF task "auto.t" do |t| sys.touch t.name end EOF } end file "version.t" do |t| open(t.name, "w") { |f| f.puts "1.0" } end gen Action do rac.build "version.t" end auto_t_task = source "auto.rf" rac.abort unless auto_t_task.name == "auto.t" task :clean do sys.rm_f %w(auto.t auto.rf version.t) sys.rm_rf %w(basedir.t) end gen Directory, "tmp.t" task "tmp.t/Rantfile" => "tmp.t" do |t| open(t.name, "w") { |f| f << <<-EOF file "test.t" do |t| sys.touch t.name end EOF } end task :subdir_tmp do subdirs %w(tmp.t) end task :build_test_t do |t| rac.build "tmp.t/test.t" # just ensure we're NOT in the tmp.t directory #STDERR.puts Dir.pwd test(?d, "tmp.t") or t.fail end desc "Make some path (basedir.t/a/b)." gen Directory, "basedir.t", "a/b" # vim: ft=ruby