support dependency tree handling in build mode as well