use ensure_resource() for dependencies.
handle when $src_root is already set by consumer.