Hello!

With rake, I often find myself doing something like that:

  file "custom.iso" => "custom.dir" do |t|
    begin
      sh "mkisofs -r -V My Install CD' -cache-inodes" +
        " -J -l -b isolinux/isolinux.bin" +
        " -c isolinux/boot.cat -no-emul-boot" +
        " -boot-load-size 4 -boot-info-table" +
        " -o #{t.name} #{custom.dir}"

    rescue
      sh "rm #{t.name}"
      raise

    end
  end

to avoid a broken target lying around.

I wonder whether I am missing something here.  Shouldn't rake remove t.name?
I mean, once rake has started to build a target, it is pretty much sure that
the target _have_ to be rebuilt.  Thus there's no rason to let a half-baked
target lying around should the build of that target fail.

AFAICS, make removes the target if it fails to build it, too.

What am I missing here?  Any suggestions?