ensure targets are run only as necessary