(rule
 (targets s t)
 (action (with-stdout-to "%{targets}" (echo foo))))