
import "var/numbers"

var "v1" => "default_1.t"
var["v2"] = "default_2.t"
var.restrict :count, :Integer, 1..10
var :num, 1.1 .. 11.11

task :default => [var[:v1], var[:v2]]

file var[:v1] do |t|
    sys.touch t.name
end

file var[:v2] do |t|
    sys.touch t.name
end

task :show_count do |t|
    puts "count #{var :count}"
end

task :show_num do
    puts "num #{var :num}"
end

task :source_err do
    source "source_err.rf.t"
end

file "source_err.rf.t" do |t|
    open(t.name, "w") { |f|
	f << <<-EOF

	var[:count] = 11
	EOF
    }
end

task :clean do
    sys.rm_f sys["*.t"]
end

# vim:ft=ruby
