Remove targets right before executing rule actions, and only if doing so.
Remove targets right before executing rule actions, and only if doing so.

Signed-off-by: mefyl <a639889f268ed9eb2c872c19b8505dfe978f8da6@gruntech.org>

dra27/jbuilder,janestreet/jbuilder,dra27/jbuilder,janestreet/jbuilder,dra27/jbuilder,janestreet/jbuilder,dra27/jbuilder,dra27/jbuilder,janestreet/jbuilder,janestreet/jbuilder,janestreet/jbuilder,dra27/jbuilder