即使已经满足先决条件,是否有任何方法可以强制在 Rake 中执行任务?
我正在寻找 GNU/make 的 --always-make 选项的等效项(http://www.gnu.org/software/make/manual/make.html#Options-Summary)
示例 Rakefile:
file "myfile.txt" do
system "touch myfile.txt"
puts "myfile.txt created"
end
--always-make 选项如何工作:
# executing the rule for the first time creates a file:
$: rake myfile.txt
myfile.txt created
# executing the rule a second time returns no output
# because myfile.txt already exists and is up to date
$: rake myfile.txt
# if the --always-make option is on,
# the file is remade even if the prerequisites are met
$: rake myfile.txt --always-make
myfile.txt created
我正在运行 Rake 版本 0.9.2.2,但在 --help 和手册页中找不到任何选项。