P
Phil Tomson
Here's my rakefile:
#begin rakefile
task :default => [ :sim_jtag_tb ] do
puts "done..."
end
task :sim_jtag_tb => [ :build_jtag_tb ] do
puts "simulate it..."
system("ncsim -gui jtag_tb:jtag_tb_behavior")
end
task :build_jtag_tb => [ :build_jtag, :build_jtag_driver ] do
puts "build jtag_tb"
raise "jtag_tb_c build failed " unless system("ncvhdl -linedebug
jtag_tb_c.vhd")
raise "jtag_tb_c build failed " unless system("ncelab
jtag_tb:jtag_tb_behavior -access +r+w")
end
task :build_jtag_driver do
puts "build jtag_driver"
raise "build_jtag_driver failed" unless system("ncvhdl -linedebug
jtag_driver.vhd")
end
task :build_jtag do
puts "build jtag..."
raise "build_jtag failed" unless system("ncvhdl -linedebug jtag.vhd")
end
#end of rakefile
If I don't want to run certain tasks if the file the task is to work on
already is up-to-date (like how make works) how do I tell Rake to not
execute a particular task if the files being worked on are up-to-date? Is
there some built-in way of doing this (by listing the dependent files) or
do you have to do that yourself?
Also, notice the 'raise "blah" system("command")' that I'm doing above. I
want the whole thing to just die if one of the dependencies couldn't be
built (as in make) - is there some builtin method for doing this as well?
Are these things just handled 'ideomatically' in Rake now (as opposed
to their being built-in methods for them)?
Phil
#begin rakefile
task :default => [ :sim_jtag_tb ] do
puts "done..."
end
task :sim_jtag_tb => [ :build_jtag_tb ] do
puts "simulate it..."
system("ncsim -gui jtag_tb:jtag_tb_behavior")
end
task :build_jtag_tb => [ :build_jtag, :build_jtag_driver ] do
puts "build jtag_tb"
raise "jtag_tb_c build failed " unless system("ncvhdl -linedebug
jtag_tb_c.vhd")
raise "jtag_tb_c build failed " unless system("ncelab
jtag_tb:jtag_tb_behavior -access +r+w")
end
task :build_jtag_driver do
puts "build jtag_driver"
raise "build_jtag_driver failed" unless system("ncvhdl -linedebug
jtag_driver.vhd")
end
task :build_jtag do
puts "build jtag..."
raise "build_jtag failed" unless system("ncvhdl -linedebug jtag.vhd")
end
#end of rakefile
If I don't want to run certain tasks if the file the task is to work on
already is up-to-date (like how make works) how do I tell Rake to not
execute a particular task if the files being worked on are up-to-date? Is
there some built-in way of doing this (by listing the dependent files) or
do you have to do that yourself?
Also, notice the 'raise "blah" system("command")' that I'm doing above. I
want the whole thing to just die if one of the dependencies couldn't be
built (as in make) - is there some builtin method for doing this as well?
Are these things just handled 'ideomatically' in Rake now (as opposed
to their being built-in methods for them)?
Phil